From 6de87322a52310b4ea8223b7110f12662eea3005 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Thu, 8 Jun 2023 01:53:59 +0000 Subject: [PATCH 1/2] feat: [migrationcenter] new module for migrationcenter --- gapic-libraries-bom/pom.xml | 7 + java-migrationcenter/.OwlBot.yaml | 36 + java-migrationcenter/.repo-metadata.json | 16 + java-migrationcenter/README.md | 225 + .../google-cloud-migrationcenter-bom/pom.xml | 44 + .../google-cloud-migrationcenter/pom.xml | 113 + .../v1/MigrationCenterClient.java | 7857 +++++++ .../v1/MigrationCenterSettings.java | 1052 + .../migrationcenter/v1/gapic_metadata.json | 168 + .../migrationcenter/v1/package-info.java | 43 + .../GrpcMigrationCenterCallableFactory.java | 113 + .../v1/stub/GrpcMigrationCenterStub.java | 2156 ++ ...ttpJsonMigrationCenterCallableFactory.java | 105 + .../v1/stub/HttpJsonMigrationCenterStub.java | 3760 ++++ .../v1/stub/MigrationCenterStub.java | 508 + .../v1/stub/MigrationCenterStubSettings.java | 3255 +++ .../v1/MigrationCenterClientHttpJsonTest.java | 4782 +++++ .../v1/MigrationCenterClientTest.java | 4299 ++++ .../migrationcenter/v1/MockLocations.java | 59 + .../migrationcenter/v1/MockLocationsImpl.java | 105 + .../v1/MockMigrationCenter.java | 59 + .../v1/MockMigrationCenterImpl.java | 1066 + .../pom.xml | 45 + .../v1/MigrationCenterGrpc.java | 5886 ++++++ java-migrationcenter/owlbot.py | 36 + java-migrationcenter/pom.xml | 53 + .../clirr-ignored-differences.xml | 19 + .../pom.xml | 37 + .../v1/AddAssetsToGroupRequest.java | 1331 ++ .../v1/AddAssetsToGroupRequestOrBuilder.java | 168 + .../v1/AggregateAssetsValuesRequest.java | 1339 ++ ...AggregateAssetsValuesRequestOrBuilder.java | 132 + .../v1/AggregateAssetsValuesResponse.java | 957 + ...ggregateAssetsValuesResponseOrBuilder.java | 77 + .../cloud/migrationcenter/v1/Aggregation.java | 3992 ++++ .../v1/AggregationOrBuilder.java | 193 + .../migrationcenter/v1/AggregationResult.java | 5222 +++++ .../v1/AggregationResultOrBuilder.java | 100 + .../cloud/migrationcenter/v1/Asset.java | 3435 ++++ .../cloud/migrationcenter/v1/AssetFrame.java | 2444 +++ .../v1/AssetFrameOrBuilder.java | 298 + .../cloud/migrationcenter/v1/AssetList.java | 744 + .../v1/AssetListOrBuilder.java | 84 + .../cloud/migrationcenter/v1/AssetName.java | 223 + .../migrationcenter/v1/AssetOrBuilder.java | 488 + .../v1/AssetPerformanceData.java | 1066 + .../v1/AssetPerformanceDataOrBuilder.java | 101 + .../cloud/migrationcenter/v1/AssetView.java | 181 + .../v1/AwsEc2PlatformDetails.java | 807 + .../v1/AwsEc2PlatformDetailsOrBuilder.java | 75 + .../v1/AzureVmPlatformDetails.java | 989 + .../v1/AzureVmPlatformDetailsOrBuilder.java | 100 + .../v1/BatchDeleteAssetsRequest.java | 1073 + .../v1/BatchDeleteAssetsRequestOrBuilder.java | 136 + .../v1/BatchUpdateAssetsRequest.java | 1218 ++ .../v1/BatchUpdateAssetsRequestOrBuilder.java | 121 + .../v1/BatchUpdateAssetsResponse.java | 963 + .../BatchUpdateAssetsResponseOrBuilder.java | 82 + .../cloud/migrationcenter/v1/BiosDetails.java | 1603 ++ .../v1/BiosDetailsOrBuilder.java | 185 + .../migrationcenter/v1/CommitmentPlan.java | 200 + .../v1/ComputeEngineMigrationTarget.java | 721 + ...ComputeEngineMigrationTargetOrBuilder.java | 60 + .../v1/ComputeEnginePreferences.java | 886 + .../v1/ComputeEnginePreferencesOrBuilder.java | 89 + .../v1/ComputeEngineShapeDescriptor.java | 1093 + ...ComputeEngineShapeDescriptorOrBuilder.java | 114 + .../migrationcenter/v1/CpuUsageSample.java | 539 + .../v1/CpuUsageSampleOrBuilder.java | 39 + .../v1/CreateGroupRequest.java | 1399 ++ .../v1/CreateGroupRequestOrBuilder.java | 177 + .../v1/CreateImportDataFileRequest.java | 1386 ++ .../CreateImportDataFileRequestOrBuilder.java | 169 + .../v1/CreateImportJobRequest.java | 1376 ++ .../v1/CreateImportJobRequestOrBuilder.java | 169 + .../v1/CreatePreferenceSetRequest.java | 1419 ++ .../CreatePreferenceSetRequestOrBuilder.java | 179 + .../v1/CreateReportConfigRequest.java | 1410 ++ .../CreateReportConfigRequestOrBuilder.java | 177 + .../v1/CreateReportRequest.java | 1403 ++ .../v1/CreateReportRequestOrBuilder.java | 177 + .../v1/CreateSourceRequest.java | 1403 ++ .../v1/CreateSourceRequestOrBuilder.java | 177 + .../v1/DailyResourceUsageAggregation.java | 6200 ++++++ ...ailyResourceUsageAggregationOrBuilder.java | 206 + .../v1/DeleteAssetRequest.java | 905 + .../v1/DeleteAssetRequestOrBuilder.java | 103 + .../v1/DeleteGroupRequest.java | 905 + .../v1/DeleteGroupRequestOrBuilder.java | 103 + .../v1/DeleteImportDataFileRequest.java | 912 + .../DeleteImportDataFileRequestOrBuilder.java | 103 + .../v1/DeleteImportJobRequest.java | 1006 + .../v1/DeleteImportJobRequestOrBuilder.java | 118 + .../v1/DeletePreferenceSetRequest.java | 911 + .../DeletePreferenceSetRequestOrBuilder.java | 103 + .../v1/DeleteReportConfigRequest.java | 1010 + .../DeleteReportConfigRequestOrBuilder.java | 118 + .../v1/DeleteReportRequest.java | 905 + .../v1/DeleteReportRequestOrBuilder.java | 103 + .../v1/DeleteSourceRequest.java | 905 + .../v1/DeleteSourceRequestOrBuilder.java | 103 + .../cloud/migrationcenter/v1/DiskEntry.java | 2241 ++ .../migrationcenter/v1/DiskEntryList.java | 936 + .../v1/DiskEntryListOrBuilder.java | 77 + .../v1/DiskEntryOrBuilder.java | 223 + .../migrationcenter/v1/DiskPartition.java | 1625 ++ .../migrationcenter/v1/DiskPartitionList.java | 941 + .../v1/DiskPartitionListOrBuilder.java | 77 + .../v1/DiskPartitionOrBuilder.java | 186 + .../migrationcenter/v1/DiskUsageSample.java | 535 + .../v1/DiskUsageSampleOrBuilder.java | 38 + .../cloud/migrationcenter/v1/ErrorFrame.java | 1758 ++ .../migrationcenter/v1/ErrorFrameName.java | 260 + .../v1/ErrorFrameOrBuilder.java | 195 + .../migrationcenter/v1/ErrorFrameView.java | 179 + .../migrationcenter/v1/ExecutionReport.java | 898 + .../v1/ExecutionReportOrBuilder.java | 86 + .../v1/FileValidationReport.java | 1718 ++ .../v1/FileValidationReportOrBuilder.java | 168 + .../migrationcenter/v1/FitDescriptor.java | 779 + .../v1/FitDescriptorOrBuilder.java | 50 + .../v1/FrameViolationEntry.java | 809 + .../v1/FrameViolationEntryOrBuilder.java | 75 + .../cloud/migrationcenter/v1/Frames.java | 936 + .../migrationcenter/v1/FramesOrBuilder.java | 77 + .../cloud/migrationcenter/v1/FstabEntry.java | 1359 ++ .../migrationcenter/v1/FstabEntryList.java | 937 + .../v1/FstabEntryListOrBuilder.java | 77 + .../v1/FstabEntryOrBuilder.java | 152 + .../v1/GenericPlatformDetails.java | 639 + .../v1/GenericPlatformDetailsOrBuilder.java | 54 + .../migrationcenter/v1/GetAssetRequest.java | 786 + .../v1/GetAssetRequestOrBuilder.java | 79 + .../v1/GetErrorFrameRequest.java | 814 + .../v1/GetErrorFrameRequestOrBuilder.java | 89 + .../migrationcenter/v1/GetGroupRequest.java | 638 + .../v1/GetGroupRequestOrBuilder.java | 54 + .../v1/GetImportDataFileRequest.java | 643 + .../v1/GetImportDataFileRequestOrBuilder.java | 54 + .../v1/GetImportJobRequest.java | 814 + .../v1/GetImportJobRequestOrBuilder.java | 85 + .../v1/GetPreferenceSetRequest.java | 639 + .../v1/GetPreferenceSetRequestOrBuilder.java | 54 + .../v1/GetReportConfigRequest.java | 639 + .../v1/GetReportConfigRequestOrBuilder.java | 54 + .../migrationcenter/v1/GetReportRequest.java | 788 + .../v1/GetReportRequestOrBuilder.java | 79 + .../v1/GetSettingsRequest.java | 639 + .../v1/GetSettingsRequestOrBuilder.java | 54 + .../migrationcenter/v1/GetSourceRequest.java | 638 + .../v1/GetSourceRequestOrBuilder.java | 54 + .../cloud/migrationcenter/v1/Group.java | 1887 ++ .../cloud/migrationcenter/v1/GroupName.java | 223 + .../migrationcenter/v1/GroupOrBuilder.java | 234 + .../v1/GuestConfigDetails.java | 1767 ++ .../v1/GuestConfigDetailsOrBuilder.java | 180 + .../v1/GuestInstalledApplication.java | 1436 ++ .../v1/GuestInstalledApplicationList.java | 966 + ...uestInstalledApplicationListOrBuilder.java | 78 + .../GuestInstalledApplicationOrBuilder.java | 160 + .../migrationcenter/v1/GuestOsDetails.java | 1494 ++ .../v1/GuestOsDetailsOrBuilder.java | 170 + .../v1/GuestRuntimeDetails.java | 2419 +++ .../v1/GuestRuntimeDetailsOrBuilder.java | 286 + .../cloud/migrationcenter/v1/HostsEntry.java | 900 + .../migrationcenter/v1/HostsEntryList.java | 937 + .../v1/HostsEntryListOrBuilder.java | 77 + .../v1/HostsEntryOrBuilder.java | 101 + .../migrationcenter/v1/ImportDataFile.java | 1961 ++ .../v1/ImportDataFileName.java | 269 + .../v1/ImportDataFileOrBuilder.java | 208 + .../cloud/migrationcenter/v1/ImportError.java | 897 + .../v1/ImportErrorOrBuilder.java | 75 + .../cloud/migrationcenter/v1/ImportJob.java | 3348 +++ .../migrationcenter/v1/ImportJobFormat.java | 256 + .../migrationcenter/v1/ImportJobName.java | 223 + .../v1/ImportJobOrBuilder.java | 392 + .../migrationcenter/v1/ImportJobView.java | 183 + .../migrationcenter/v1/ImportRowError.java | 1406 ++ .../v1/ImportRowErrorOrBuilder.java | 143 + .../cloud/migrationcenter/v1/Insight.java | 845 + .../cloud/migrationcenter/v1/InsightList.java | 1263 ++ .../v1/InsightListOrBuilder.java | 125 + .../migrationcenter/v1/InsightOrBuilder.java | 68 + .../cloud/migrationcenter/v1/LicenseType.java | 181 + .../migrationcenter/v1/ListAssetsRequest.java | 1430 ++ .../v1/ListAssetsRequestOrBuilder.java | 168 + .../v1/ListAssetsResponse.java | 1395 ++ .../v1/ListAssetsResponseOrBuilder.java | 153 + .../v1/ListErrorFramesRequest.java | 1095 + .../v1/ListErrorFramesRequestOrBuilder.java | 124 + .../v1/ListErrorFramesResponse.java | 1399 ++ .../v1/ListErrorFramesResponseOrBuilder.java | 153 + .../migrationcenter/v1/ListGroupsRequest.java | 1282 ++ .../v1/ListGroupsRequestOrBuilder.java | 143 + .../v1/ListGroupsResponse.java | 1395 ++ .../v1/ListGroupsResponseOrBuilder.java | 153 + .../v1/ListImportDataFilesRequest.java | 1324 ++ .../ListImportDataFilesRequestOrBuilder.java | 153 + .../v1/ListImportDataFilesResponse.java | 1425 ++ .../ListImportDataFilesResponseOrBuilder.java | 156 + .../v1/ListImportJobsRequest.java | 1457 ++ .../v1/ListImportJobsRequestOrBuilder.java | 174 + .../v1/ListImportJobsResponse.java | 1398 ++ .../v1/ListImportJobsResponseOrBuilder.java | 153 + .../v1/ListPreferenceSetsRequest.java | 1108 + .../ListPreferenceSetsRequestOrBuilder.java | 119 + .../v1/ListPreferenceSetsResponse.java | 1416 ++ .../ListPreferenceSetsResponseOrBuilder.java | 153 + .../v1/ListReportConfigsRequest.java | 1286 ++ .../v1/ListReportConfigsRequestOrBuilder.java | 143 + .../v1/ListReportConfigsResponse.java | 1412 ++ .../ListReportConfigsResponseOrBuilder.java | 153 + .../v1/ListReportsRequest.java | 1432 ++ .../v1/ListReportsRequestOrBuilder.java | 168 + .../v1/ListReportsResponse.java | 1395 ++ .../v1/ListReportsResponseOrBuilder.java | 153 + .../v1/ListSourcesRequest.java | 1282 ++ .../v1/ListSourcesRequestOrBuilder.java | 143 + .../v1/ListSourcesResponse.java | 1395 ++ .../v1/ListSourcesResponseOrBuilder.java | 153 + .../migrationcenter/v1/LocationName.java | 192 + .../v1/MachineArchitectureDetails.java | 2124 ++ .../MachineArchitectureDetailsOrBuilder.java | 220 + .../migrationcenter/v1/MachineDetails.java | 2998 +++ .../v1/MachineDetailsOrBuilder.java | 337 + .../v1/MachineDiskDetails.java | 893 + .../v1/MachineDiskDetailsOrBuilder.java | 86 + .../v1/MachineNetworkDetails.java | 1262 ++ .../v1/MachineNetworkDetailsOrBuilder.java | 137 + .../v1/MachinePreferences.java | 1005 + .../v1/MachinePreferencesOrBuilder.java | 88 + .../migrationcenter/v1/MachineSeries.java | 638 + .../v1/MachineSeriesOrBuilder.java | 54 + .../migrationcenter/v1/MemoryUsageSample.java | 536 + .../v1/MemoryUsageSampleOrBuilder.java | 38 + .../v1/MigrationCenterProto.java | 3502 ++++ .../migrationcenter/v1/MigrationInsight.java | 1159 ++ .../v1/MigrationInsightOrBuilder.java | 113 + .../v1/NetworkAdapterDetails.java | 1073 + .../v1/NetworkAdapterDetailsOrBuilder.java | 110 + .../v1/NetworkAdapterList.java | 956 + .../v1/NetworkAdapterListOrBuilder.java | 77 + .../migrationcenter/v1/NetworkAddress.java | 1497 ++ .../v1/NetworkAddressList.java | 942 + .../v1/NetworkAddressListOrBuilder.java | 77 + .../v1/NetworkAddressOrBuilder.java | 150 + .../migrationcenter/v1/NetworkConnection.java | 1815 ++ .../v1/NetworkConnectionList.java | 948 + .../v1/NetworkConnectionListOrBuilder.java | 77 + .../v1/NetworkConnectionOrBuilder.java | 189 + .../v1/NetworkUsageSample.java | 638 + .../v1/NetworkUsageSampleOrBuilder.java | 53 + .../cloud/migrationcenter/v1/NfsExport.java | 900 + .../migrationcenter/v1/NfsExportList.java | 936 + .../v1/NfsExportListOrBuilder.java | 77 + .../v1/NfsExportOrBuilder.java | 101 + .../migrationcenter/v1/OpenFileDetails.java | 1170 ++ .../v1/OpenFileDetailsOrBuilder.java | 125 + .../migrationcenter/v1/OpenFileList.java | 945 + .../v1/OpenFileListOrBuilder.java | 77 + .../v1/OperatingSystemFamily.java | 187 + .../migrationcenter/v1/OperationMetadata.java | 1829 ++ .../v1/OperationMetadataOrBuilder.java | 218 + .../migrationcenter/v1/PerformanceSample.java | 1764 ++ .../v1/PerformanceSampleOrBuilder.java | 200 + .../v1/PersistentDiskType.java | 206 + .../v1/PhysicalPlatformDetails.java | 639 + .../v1/PhysicalPlatformDetailsOrBuilder.java | 54 + .../migrationcenter/v1/PlatformDetails.java | 2039 ++ .../v1/PlatformDetailsOrBuilder.java | 203 + .../migrationcenter/v1/PreferenceSet.java | 1856 ++ .../migrationcenter/v1/PreferenceSetName.java | 227 + .../v1/PreferenceSetOrBuilder.java | 218 + .../migrationcenter/v1/RegionPreferences.java | 772 + .../v1/RegionPreferencesOrBuilder.java | 92 + .../v1/RemoveAssetsFromGroupRequest.java | 1334 ++ ...RemoveAssetsFromGroupRequestOrBuilder.java | 167 + .../cloud/migrationcenter/v1/Report.java | 2450 +++ .../v1/ReportAssetFramesRequest.java | 1089 + .../v1/ReportAssetFramesRequestOrBuilder.java | 114 + .../v1/ReportAssetFramesResponse.java | 435 + .../ReportAssetFramesResponseOrBuilder.java | 24 + .../migrationcenter/v1/ReportConfig.java | 3062 +++ .../migrationcenter/v1/ReportConfigName.java | 227 + .../v1/ReportConfigOrBuilder.java | 244 + .../cloud/migrationcenter/v1/ReportName.java | 260 + .../migrationcenter/v1/ReportOrBuilder.java | 267 + .../migrationcenter/v1/ReportSummary.java | 17060 ++++++++++++++++ .../v1/ReportSummaryOrBuilder.java | 123 + .../cloud/migrationcenter/v1/ReportView.java | 209 + .../v1/RunImportJobRequest.java | 905 + .../v1/RunImportJobRequestOrBuilder.java | 103 + .../migrationcenter/v1/RunningProcess.java | 1416 ++ .../v1/RunningProcessList.java | 942 + .../v1/RunningProcessListOrBuilder.java | 77 + .../v1/RunningProcessOrBuilder.java | 171 + .../migrationcenter/v1/RunningService.java | 1798 ++ .../v1/RunningServiceList.java | 942 + .../v1/RunningServiceListOrBuilder.java | 77 + .../v1/RunningServiceOrBuilder.java | 163 + .../v1/RuntimeNetworkInfo.java | 969 + .../v1/RuntimeNetworkInfoOrBuilder.java | 95 + .../cloud/migrationcenter/v1/Settings.java | 805 + .../migrationcenter/v1/SettingsName.java | 192 + .../migrationcenter/v1/SettingsOrBuilder.java | 75 + .../v1/SizingOptimizationStrategy.java | 213 + .../cloud/migrationcenter/v1/Source.java | 2623 +++ .../cloud/migrationcenter/v1/SourceName.java | 223 + .../migrationcenter/v1/SourceOrBuilder.java | 284 + .../v1/UpdateAssetRequest.java | 1325 ++ .../v1/UpdateAssetRequestOrBuilder.java | 168 + .../v1/UpdateGroupRequest.java | 1313 ++ .../v1/UpdateGroupRequestOrBuilder.java | 165 + .../v1/UpdateImportJobRequest.java | 1330 ++ .../v1/UpdateImportJobRequestOrBuilder.java | 168 + .../v1/UpdatePreferenceSetRequest.java | 1338 ++ .../UpdatePreferenceSetRequestOrBuilder.java | 168 + .../v1/UpdateSettingsRequest.java | 1330 ++ .../v1/UpdateSettingsRequestOrBuilder.java | 168 + .../v1/UpdateSourceRequest.java | 1329 ++ .../v1/UpdateSourceRequestOrBuilder.java | 168 + .../migrationcenter/v1/UploadFileInfo.java | 1259 ++ .../v1/UploadFileInfoOrBuilder.java | 154 + .../v1/ValidateImportJobRequest.java | 909 + .../v1/ValidateImportJobRequestOrBuilder.java | 103 + .../migrationcenter/v1/ValidationReport.java | 1473 ++ .../v1/ValidationReportOrBuilder.java | 135 + .../v1/VirtualMachinePreferences.java | 1447 ++ .../VirtualMachinePreferencesOrBuilder.java | 176 + .../migrationcenter/v1/VmwareDiskConfig.java | 1657 ++ .../v1/VmwareDiskConfigOrBuilder.java | 115 + .../v1/VmwarePlatformDetails.java | 1542 ++ .../v1/VmwarePlatformDetailsOrBuilder.java | 177 + .../migrationcenter/v1/migrationcenter.proto | 4005 ++++ .../AsyncAddAssetsToGroup.java | 54 + .../AsyncAddAssetsToGroupLRO.java | 55 + .../SyncAddAssetsToGroup.java | 50 + .../SyncAddAssetsToGroupGroupname.java | 42 + .../SyncAddAssetsToGroupString.java | 42 + .../AsyncAggregateAssetsValues.java | 53 + .../SyncAggregateAssetsValues.java | 49 + .../AsyncBatchDeleteAssets.java | 53 + .../SyncBatchDeleteAssets.java | 49 + ...tchDeleteAssetsLocationnameListstring.java | 45 + ...SyncBatchDeleteAssetsStringListstring.java | 45 + .../AsyncBatchUpdateAssets.java | 53 + .../SyncBatchUpdateAssets.java | 49 + ...etsLocationnameListupdateassetrequest.java | 47 + ...ateAssetsStringListupdateassetrequest.java | 47 + .../SyncCreateSetCredentialsProvider.java | 45 + .../SyncCreateSetCredentialsProvider1.java | 41 + .../create/SyncCreateSetEndpoint.java | 42 + .../creategroup/AsyncCreateGroup.java | 53 + .../creategroup/AsyncCreateGroupLRO.java | 54 + .../creategroup/SyncCreateGroup.java | 49 + ...yncCreateGroupLocationnameGroupString.java | 44 + .../SyncCreateGroupStringGroupString.java | 44 + .../AsyncCreateImportDataFile.java | 54 + .../AsyncCreateImportDataFileLRO.java | 54 + .../SyncCreateImportDataFile.java | 49 + ...FileImportjobnameImportdatafileString.java | 47 + ...ortDataFileStringImportdatafileString.java | 47 + .../createimportjob/AsyncCreateImportJob.java | 54 + .../AsyncCreateImportJobLRO.java | 54 + .../createimportjob/SyncCreateImportJob.java | 49 + ...eImportJobLocationnameImportjobString.java | 45 + ...cCreateImportJobStringImportjobString.java | 45 + .../AsyncCreatePreferenceSet.java | 54 + .../AsyncCreatePreferenceSetLRO.java | 54 + .../SyncCreatePreferenceSet.java | 49 + ...nceSetLocationnamePreferencesetString.java | 47 + ...referenceSetStringPreferencesetString.java | 47 + .../createreport/AsyncCreateReport.java | 55 + .../createreport/AsyncCreateReportLRO.java | 55 + .../createreport/SyncCreateReport.java | 50 + ...ateReportReportconfignameReportString.java | 44 + .../SyncCreateReportStringReportString.java | 44 + .../AsyncCreateReportConfig.java | 54 + .../AsyncCreateReportConfigLRO.java | 54 + .../SyncCreateReportConfig.java | 49 + ...tConfigLocationnameReportconfigString.java | 45 + ...eReportConfigStringReportconfigString.java | 45 + .../createsource/AsyncCreateSource.java | 54 + .../createsource/AsyncCreateSourceLRO.java | 54 + .../createsource/SyncCreateSource.java | 49 + ...cCreateSourceLocationnameSourceString.java | 44 + .../SyncCreateSourceStringSourceString.java | 44 + .../deleteasset/AsyncDeleteAsset.java | 50 + .../deleteasset/SyncDeleteAsset.java | 47 + .../deleteasset/SyncDeleteAssetAssetname.java | 42 + .../deleteasset/SyncDeleteAssetString.java | 42 + .../deletegroup/AsyncDeleteGroup.java | 50 + .../deletegroup/AsyncDeleteGroupLRO.java | 52 + .../deletegroup/SyncDeleteGroup.java | 47 + .../deletegroup/SyncDeleteGroupGroupname.java | 42 + .../deletegroup/SyncDeleteGroupString.java | 42 + .../AsyncDeleteImportDataFile.java | 54 + .../AsyncDeleteImportDataFileLRO.java | 55 + .../SyncDeleteImportDataFile.java | 50 + ...eleteImportDataFileImportdatafilename.java | 43 + .../SyncDeleteImportDataFileString.java | 44 + .../deleteimportjob/AsyncDeleteImportJob.java | 52 + .../AsyncDeleteImportJobLRO.java | 53 + .../deleteimportjob/SyncDeleteImportJob.java | 48 + .../SyncDeleteImportJobImportjobname.java | 42 + .../SyncDeleteImportJobString.java | 42 + .../AsyncDeletePreferenceSet.java | 52 + .../AsyncDeletePreferenceSetLRO.java | 53 + .../SyncDeletePreferenceSet.java | 48 + ...cDeletePreferenceSetPreferencesetname.java | 42 + .../SyncDeletePreferenceSetString.java | 42 + .../deletereport/AsyncDeleteReport.java | 53 + .../deletereport/AsyncDeleteReportLRO.java | 54 + .../deletereport/SyncDeleteReport.java | 49 + .../SyncDeleteReportReportname.java | 42 + .../deletereport/SyncDeleteReportString.java | 43 + .../AsyncDeleteReportConfig.java | 52 + .../AsyncDeleteReportConfigLRO.java | 53 + .../SyncDeleteReportConfig.java | 48 + ...yncDeleteReportConfigReportconfigname.java | 42 + .../SyncDeleteReportConfigString.java | 42 + .../deletesource/AsyncDeleteSource.java | 51 + .../deletesource/AsyncDeleteSourceLRO.java | 52 + .../deletesource/SyncDeleteSource.java | 47 + .../SyncDeleteSourceSourcename.java | 42 + .../deletesource/SyncDeleteSourceString.java | 42 + .../getasset/AsyncGetAsset.java | 51 + .../getasset/SyncGetAsset.java | 48 + .../getasset/SyncGetAssetAssetname.java | 42 + .../getasset/SyncGetAssetString.java | 42 + .../geterrorframe/AsyncGetErrorFrame.java | 54 + .../geterrorframe/SyncGetErrorFrame.java | 50 + .../SyncGetErrorFrameErrorframename.java | 43 + .../SyncGetErrorFrameString.java | 43 + .../getgroup/AsyncGetGroup.java | 49 + .../getgroup/SyncGetGroup.java | 46 + .../getgroup/SyncGetGroupGroupname.java | 42 + .../getgroup/SyncGetGroupString.java | 42 + .../AsyncGetImportDataFile.java | 53 + .../SyncGetImportDataFile.java | 49 + ...ncGetImportDataFileImportdatafilename.java | 43 + .../SyncGetImportDataFileString.java | 44 + .../getimportjob/AsyncGetImportJob.java | 52 + .../getimportjob/SyncGetImportJob.java | 48 + .../SyncGetImportJobImportjobname.java | 42 + .../getimportjob/SyncGetImportJobString.java | 42 + .../getlocation/AsyncGetLocation.java | 45 + .../getlocation/SyncGetLocation.java | 42 + .../AsyncGetPreferenceSet.java | 51 + .../SyncGetPreferenceSet.java | 47 + ...SyncGetPreferenceSetPreferencesetname.java | 42 + .../SyncGetPreferenceSetString.java | 42 + .../getreport/AsyncGetReport.java | 53 + .../getreport/SyncGetReport.java | 50 + .../getreport/SyncGetReportReportname.java | 42 + .../getreport/SyncGetReportString.java | 43 + .../getreportconfig/AsyncGetReportConfig.java | 50 + .../getreportconfig/SyncGetReportConfig.java | 46 + .../SyncGetReportConfigReportconfigname.java | 42 + .../SyncGetReportConfigString.java | 42 + .../getsettings/AsyncGetSettings.java | 49 + .../getsettings/SyncGetSettings.java | 46 + .../SyncGetSettingsSettingsname.java | 42 + .../getsettings/SyncGetSettingsString.java | 42 + .../getsource/AsyncGetSource.java | 49 + .../getsource/SyncGetSource.java | 46 + .../getsource/SyncGetSourceSourcename.java | 42 + .../getsource/SyncGetSourceString.java | 42 + .../listassets/AsyncListAssets.java | 57 + .../listassets/AsyncListAssetsPaged.java | 65 + .../listassets/SyncListAssets.java | 54 + .../SyncListAssetsLocationname.java | 44 + .../listassets/SyncListAssetsString.java | 44 + .../listerrorframes/AsyncListErrorFrames.java | 56 + .../AsyncListErrorFramesPaged.java | 64 + .../listerrorframes/SyncListErrorFrames.java | 52 + .../SyncListErrorFramesSourcename.java | 44 + .../SyncListErrorFramesString.java | 44 + .../listgroups/AsyncListGroups.java | 55 + .../listgroups/AsyncListGroupsPaged.java | 63 + .../listgroups/SyncListGroups.java | 52 + .../SyncListGroupsLocationname.java | 44 + .../listgroups/SyncListGroupsString.java | 44 + .../AsyncListImportDataFiles.java | 56 + .../AsyncListImportDataFilesPaged.java | 64 + .../SyncListImportDataFiles.java | 53 + .../SyncListImportDataFilesImportjobname.java | 45 + .../SyncListImportDataFilesString.java | 45 + .../listimportjobs/AsyncListImportJobs.java | 58 + .../AsyncListImportJobsPaged.java | 66 + .../listimportjobs/SyncListImportJobs.java | 54 + .../SyncListImportJobsLocationname.java | 44 + .../SyncListImportJobsString.java | 44 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 62 + .../listlocations/SyncListLocations.java | 50 + .../AsyncListPreferenceSets.java | 55 + .../AsyncListPreferenceSetsPaged.java | 63 + .../SyncListPreferenceSets.java | 51 + .../SyncListPreferenceSetsLocationname.java | 44 + .../SyncListPreferenceSetsString.java | 44 + .../AsyncListReportConfigs.java | 56 + .../AsyncListReportConfigsPaged.java | 64 + .../SyncListReportConfigs.java | 52 + .../SyncListReportConfigsLocationname.java | 44 + .../SyncListReportConfigsString.java | 44 + .../listreports/AsyncListReports.java | 59 + .../listreports/AsyncListReportsPaged.java | 66 + .../listreports/SyncListReports.java | 55 + .../SyncListReportsReportconfigname.java | 44 + .../listreports/SyncListReportsString.java | 44 + .../listsources/AsyncListSources.java | 56 + .../listsources/AsyncListSourcesPaged.java | 63 + .../listsources/SyncListSources.java | 52 + .../SyncListSourcesLocationname.java | 44 + .../listsources/SyncListSourcesString.java | 44 + .../AsyncRemoveAssetsFromGroup.java | 54 + .../AsyncRemoveAssetsFromGroupLRO.java | 55 + .../SyncRemoveAssetsFromGroup.java | 50 + .../SyncRemoveAssetsFromGroupGroupname.java | 42 + .../SyncRemoveAssetsFromGroupString.java | 42 + .../AsyncReportAssetFrames.java | 53 + .../SyncReportAssetFrames.java | 49 + .../runimportjob/AsyncRunImportJob.java | 51 + .../runimportjob/AsyncRunImportJobLRO.java | 52 + .../runimportjob/SyncRunImportJob.java | 47 + .../SyncRunImportJobImportjobname.java | 42 + .../runimportjob/SyncRunImportJobString.java | 42 + .../updateasset/AsyncUpdateAsset.java | 51 + .../updateasset/SyncUpdateAsset.java | 48 + .../SyncUpdateAssetAssetFieldmask.java | 43 + .../updategroup/AsyncUpdateGroup.java | 52 + .../updategroup/AsyncUpdateGroupLRO.java | 53 + .../updategroup/SyncUpdateGroup.java | 48 + .../SyncUpdateGroupGroupFieldmask.java | 43 + .../updateimportjob/AsyncUpdateImportJob.java | 53 + .../AsyncUpdateImportJobLRO.java | 53 + .../updateimportjob/SyncUpdateImportJob.java | 48 + ...SyncUpdateImportJobImportjobFieldmask.java | 43 + .../AsyncUpdatePreferenceSet.java | 53 + .../AsyncUpdatePreferenceSetLRO.java | 53 + .../SyncUpdatePreferenceSet.java | 48 + ...tePreferenceSetPreferencesetFieldmask.java | 44 + .../updatesettings/AsyncUpdateSettings.java | 53 + .../AsyncUpdateSettingsLRO.java | 53 + .../updatesettings/SyncUpdateSettings.java | 48 + .../SyncUpdateSettingsSettingsFieldmask.java | 43 + .../updatesource/AsyncUpdateSource.java | 53 + .../updatesource/AsyncUpdateSourceLRO.java | 53 + .../updatesource/SyncUpdateSource.java | 48 + .../SyncUpdateSourceSourceFieldmask.java | 43 + .../AsyncValidateImportJob.java | 51 + .../AsyncValidateImportJobLRO.java | 52 + .../SyncValidateImportJob.java | 47 + .../SyncValidateImportJobImportjobname.java | 42 + .../SyncValidateImportJobString.java | 42 + .../getasset/SyncGetAsset.java | 49 + .../getasset/SyncGetAsset.java | 49 + pom.xml | 1 + versions.txt | 3 + 561 files changed, 284292 insertions(+) create mode 100644 java-migrationcenter/.OwlBot.yaml create mode 100644 java-migrationcenter/.repo-metadata.json create mode 100644 java-migrationcenter/README.md create mode 100644 java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml create mode 100644 java-migrationcenter/google-cloud-migrationcenter/pom.xml create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterClient.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterSettings.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/gapic_metadata.json create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/package-info.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/GrpcMigrationCenterCallableFactory.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/GrpcMigrationCenterStub.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/HttpJsonMigrationCenterCallableFactory.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/HttpJsonMigrationCenterStub.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/MigrationCenterStub.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/MigrationCenterStubSettings.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MigrationCenterClientHttpJsonTest.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MigrationCenterClientTest.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockLocations.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockLocationsImpl.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockMigrationCenter.java create mode 100644 java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockMigrationCenterImpl.java create mode 100644 java-migrationcenter/grpc-google-cloud-migrationcenter-v1/pom.xml create mode 100644 java-migrationcenter/grpc-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterGrpc.java create mode 100644 java-migrationcenter/owlbot.py create mode 100644 java-migrationcenter/pom.xml create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/clirr-ignored-differences.xml create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/pom.xml create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AddAssetsToGroupRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AddAssetsToGroupRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Aggregation.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationResult.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationResultOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Asset.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetFrame.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetFrameOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetName.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetPerformanceData.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetPerformanceDataOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetView.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AwsEc2PlatformDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AwsEc2PlatformDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AzureVmPlatformDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AzureVmPlatformDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchDeleteAssetsRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchDeleteAssetsRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BiosDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BiosDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CommitmentPlan.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineMigrationTarget.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineMigrationTargetOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEnginePreferences.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEnginePreferencesOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineShapeDescriptor.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineShapeDescriptorOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CpuUsageSample.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CpuUsageSampleOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateGroupRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateGroupRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportDataFileRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportDataFileRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportJobRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportJobRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreatePreferenceSetRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreatePreferenceSetRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportConfigRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportConfigRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateSourceRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateSourceRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DailyResourceUsageAggregation.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DailyResourceUsageAggregationOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteAssetRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteAssetRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteGroupRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteGroupRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportDataFileRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportDataFileRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportJobRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportJobRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeletePreferenceSetRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeletePreferenceSetRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportConfigRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportConfigRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteSourceRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteSourceRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntry.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartition.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskUsageSample.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskUsageSampleOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrame.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameName.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameView.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ExecutionReport.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ExecutionReportOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FileValidationReport.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FileValidationReportOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FitDescriptor.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FitDescriptorOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FrameViolationEntry.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FrameViolationEntryOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Frames.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FramesOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntry.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GenericPlatformDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GenericPlatformDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetAssetRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetAssetRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetErrorFrameRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetErrorFrameRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetGroupRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetGroupRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportDataFileRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportDataFileRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportJobRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportJobRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetPreferenceSetRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetPreferenceSetRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportConfigRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportConfigRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSettingsRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSettingsRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSourceRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSourceRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Group.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GroupName.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GroupOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestConfigDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestConfigDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplication.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestOsDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestOsDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestRuntimeDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestRuntimeDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntry.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFile.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFileName.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFileOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportError.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportErrorOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJob.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobFormat.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobName.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobView.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportRowError.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportRowErrorOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Insight.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/LicenseType.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/LocationName.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineArchitectureDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineArchitectureDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDiskDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDiskDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineNetworkDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineNetworkDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachinePreferences.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachinePreferencesOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineSeries.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineSeriesOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MemoryUsageSample.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MemoryUsageSampleOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterProto.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationInsight.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationInsightOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddress.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnection.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkUsageSample.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkUsageSampleOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExport.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperatingSystemFamily.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperationMetadata.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperationMetadataOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PerformanceSample.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PerformanceSampleOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PersistentDiskType.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PhysicalPlatformDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PhysicalPlatformDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PlatformDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PlatformDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSet.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSetName.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSetOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RegionPreferences.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RegionPreferencesOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RemoveAssetsFromGroupRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RemoveAssetsFromGroupRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Report.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesResponse.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesResponseOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfig.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfigName.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfigOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportName.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportSummary.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportSummaryOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportView.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunImportJobRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunImportJobRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcess.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningService.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceList.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceListOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RuntimeNetworkInfo.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RuntimeNetworkInfoOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Settings.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SettingsName.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SettingsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SizingOptimizationStrategy.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Source.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SourceName.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SourceOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateAssetRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateAssetRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateGroupRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateGroupRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateImportJobRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateImportJobRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdatePreferenceSetRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdatePreferenceSetRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSettingsRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSettingsRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSourceRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSourceRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UploadFileInfo.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UploadFileInfoOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidateImportJobRequest.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidateImportJobRequestOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidationReport.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidationReportOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VirtualMachinePreferences.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VirtualMachinePreferencesOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwareDiskConfig.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwareDiskConfigOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwarePlatformDetails.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwarePlatformDetailsOrBuilder.java create mode 100644 java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/proto/google/cloud/migrationcenter/v1/migrationcenter.proto create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/AsyncAddAssetsToGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/AsyncAddAssetsToGroupLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroupGroupname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroupString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/aggregateassetsvalues/AsyncAggregateAssetsValues.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/aggregateassetsvalues/SyncAggregateAssetsValues.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/AsyncBatchDeleteAssets.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssets.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssetsLocationnameListstring.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssetsStringListstring.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/AsyncBatchUpdateAssets.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssets.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssetsLocationnameListupdateassetrequest.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssetsStringListupdateassetrequest.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetEndpoint.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/AsyncCreateGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/AsyncCreateGroupLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroupLocationnameGroupString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroupStringGroupString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/AsyncCreateImportDataFile.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/AsyncCreateImportDataFileLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFile.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFileImportjobnameImportdatafileString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFileStringImportdatafileString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/AsyncCreateImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/AsyncCreateImportJobLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJobLocationnameImportjobString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJobStringImportjobString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/AsyncCreatePreferenceSet.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/AsyncCreatePreferenceSetLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSet.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSetLocationnamePreferencesetString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSetStringPreferencesetString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/AsyncCreateReport.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/AsyncCreateReportLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReport.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReportReportconfignameReportString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReportStringReportString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/AsyncCreateReportConfig.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/AsyncCreateReportConfigLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfig.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfigLocationnameReportconfigString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfigStringReportconfigString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/AsyncCreateSource.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/AsyncCreateSourceLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSource.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSourceLocationnameSourceString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSourceStringSourceString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/AsyncDeleteAsset.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAsset.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAssetAssetname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAssetString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/AsyncDeleteGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/AsyncDeleteGroupLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroupGroupname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroupString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/AsyncDeleteImportDataFile.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/AsyncDeleteImportDataFileLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFile.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFileImportdatafilename.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFileString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/AsyncDeleteImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/AsyncDeleteImportJobLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJobImportjobname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJobString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/AsyncDeletePreferenceSet.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/AsyncDeletePreferenceSetLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSet.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSetPreferencesetname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSetString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/AsyncDeleteReport.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/AsyncDeleteReportLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReport.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReportReportname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReportString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/AsyncDeleteReportConfig.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/AsyncDeleteReportConfigLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfig.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfigReportconfigname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfigString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/AsyncDeleteSource.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/AsyncDeleteSourceLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSource.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSourceSourcename.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSourceString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/AsyncGetAsset.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAsset.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAssetAssetname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAssetString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/AsyncGetErrorFrame.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrame.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrameErrorframename.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrameString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/AsyncGetGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroupGroupname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroupString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/AsyncGetImportDataFile.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFile.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFileImportdatafilename.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFileString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/AsyncGetImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJobImportjobname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJobString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getlocation/AsyncGetLocation.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getlocation/SyncGetLocation.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/AsyncGetPreferenceSet.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSet.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSetPreferencesetname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSetString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/AsyncGetReport.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReport.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReportReportname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReportString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/AsyncGetReportConfig.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfig.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfigReportconfigname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfigString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/AsyncGetSettings.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettings.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettingsSettingsname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettingsString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/AsyncGetSource.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSource.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSourceSourcename.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSourceString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/AsyncListAssets.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/AsyncListAssetsPaged.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssets.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssetsLocationname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssetsString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/AsyncListErrorFrames.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/AsyncListErrorFramesPaged.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFrames.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFramesSourcename.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFramesString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/AsyncListGroups.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/AsyncListGroupsPaged.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroups.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroupsLocationname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroupsString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/AsyncListImportDataFiles.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/AsyncListImportDataFilesPaged.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFiles.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFilesImportjobname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFilesString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/AsyncListImportJobs.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/AsyncListImportJobsPaged.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobs.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobsLocationname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobsString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/AsyncListLocations.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/AsyncListLocationsPaged.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/SyncListLocations.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/AsyncListPreferenceSets.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/AsyncListPreferenceSetsPaged.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSets.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSetsLocationname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSetsString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/AsyncListReportConfigs.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/AsyncListReportConfigsPaged.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigs.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigsLocationname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigsString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/AsyncListReports.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/AsyncListReportsPaged.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReports.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReportsReportconfigname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReportsString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/AsyncListSources.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/AsyncListSourcesPaged.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSources.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSourcesLocationname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSourcesString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/AsyncRemoveAssetsFromGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/AsyncRemoveAssetsFromGroupLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroupGroupname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroupString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/reportassetframes/AsyncReportAssetFrames.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/reportassetframes/SyncReportAssetFrames.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/AsyncRunImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/AsyncRunImportJobLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJobImportjobname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJobString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/AsyncUpdateAsset.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/SyncUpdateAsset.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/SyncUpdateAssetAssetFieldmask.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/AsyncUpdateGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/AsyncUpdateGroupLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/SyncUpdateGroup.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/SyncUpdateGroupGroupFieldmask.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/AsyncUpdateImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/AsyncUpdateImportJobLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/SyncUpdateImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/SyncUpdateImportJobImportjobFieldmask.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/AsyncUpdatePreferenceSet.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/AsyncUpdatePreferenceSetLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/SyncUpdatePreferenceSet.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/SyncUpdatePreferenceSetPreferencesetFieldmask.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/AsyncUpdateSettings.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/AsyncUpdateSettingsLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/SyncUpdateSettings.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/SyncUpdateSettingsSettingsFieldmask.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/AsyncUpdateSource.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/AsyncUpdateSourceLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/SyncUpdateSource.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/SyncUpdateSourceSourceFieldmask.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/AsyncValidateImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/AsyncValidateImportJobLRO.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJob.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJobImportjobname.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJobString.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcentersettings/getasset/SyncGetAsset.java create mode 100644 java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/stub/migrationcenterstubsettings/getasset/SyncGetAsset.java diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index 66d162c562fb..0b7744d50122 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -658,6 +658,13 @@ pom import + + com.google.cloud + google-cloud-migrationcenter-bom + 0.0.1-SNAPSHOT + pom + import + com.google.cloud google-cloud-monitoring-dashboard-bom diff --git a/java-migrationcenter/.OwlBot.yaml b/java-migrationcenter/.OwlBot.yaml new file mode 100644 index 000000000000..653bc889f6d1 --- /dev/null +++ b/java-migrationcenter/.OwlBot.yaml @@ -0,0 +1,36 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +deep-remove-regex: +- "/java-migrationcenter/grpc-google-.*/src" +- "/java-migrationcenter/proto-google-.*/src" +- "/java-migrationcenter/google-.*/src" +- "/java-migrationcenter/samples/snippets/generated" + +deep-preserve-regex: +- "/java-migrationcenter/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/migrationcenter/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-migrationcenter/$1/proto-google-cloud-migrationcenter-$1/src" +- source: "/google/cloud/migrationcenter/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-migrationcenter/$1/grpc-google-cloud-migrationcenter-$1/src" +- source: "/google/cloud/migrationcenter/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-migrationcenter/$1/google-cloud-migrationcenter/src" +- source: "/google/cloud/migrationcenter/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-migrationcenter/$1/samples/snippets/generated" + + +api-name: migrationcenter \ No newline at end of file diff --git a/java-migrationcenter/.repo-metadata.json b/java-migrationcenter/.repo-metadata.json new file mode 100644 index 000000000000..c0e0790acf5c --- /dev/null +++ b/java-migrationcenter/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "migrationcenter", + "name_pretty": "Migration Center API", + "product_documentation": "https://cloud.google.com/migration-center/docs/migration-center-overview", + "api_description": "Google Cloud Migration Center is a unified platform that helps you accelerate your end-to-end cloud journey from your current on-premises or cloud environments to Google Cloud", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-migrationcenter/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-migrationcenter", + "repo_short": "java-migrationcenter", + "distribution_name": "com.google.cloud:google-cloud-migrationcenter", + "api_id": "migrationcenter.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-migrationcenter/README.md b/java-migrationcenter/README.md new file mode 100644 index 000000000000..e691f71b69f7 --- /dev/null +++ b/java-migrationcenter/README.md @@ -0,0 +1,225 @@ +# Google Migration Center API Client for Java + +Java idiomatic client for [Migration Center API][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.16.0 + pom + import + + + + + + + com.google.cloud + google-cloud-migrationcenter + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + + +```xml + + com.google.cloud + google-cloud-migrationcenter + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-migrationcenter:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-migrationcenter" % "0.0.0" +``` + + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Migration Center API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Migration Center API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Migration Center API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Migration Center API. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-migrationcenter` library. See the [Quickstart](#quickstart) section +to add `google-cloud-migrationcenter` as a dependency in your code. + +## About Migration Center API + + +[Migration Center API][product-docs] Google Cloud Migration Center is a unified platform that helps you accelerate your end-to-end cloud journey from your current on-premises or cloud environments to Google Cloud + +See the [Migration Center API client library docs][javadocs] to learn how to +use this Migration Center API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Migration Center API uses gRPC for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/migration-center/docs/migration-center-overview +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-migrationcenter/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java11.html +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-migrationcenter.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-migrationcenter/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/java-migrationcenter/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-migrationcenter/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-migrationcenter/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=migrationcenter.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml b/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml new file mode 100644 index 000000000000..256931b1793a --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + com.google.cloud + google-cloud-migrationcenter-bom + 0.0.1-SNAPSHOT + pom + + + com.google.cloud + google-cloud-pom-parent + 1.13.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Migration Center API BOM + + BOM for Migration Center API + + + + true + + + + + + com.google.cloud + google-cloud-migrationcenter + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-migrationcenter-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-migrationcenter-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-migrationcenter/google-cloud-migrationcenter/pom.xml b/java-migrationcenter/google-cloud-migrationcenter/pom.xml new file mode 100644 index 000000000000..daf32030c684 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + com.google.cloud + google-cloud-migrationcenter + 0.0.1-SNAPSHOT + jar + Google Migration Center API + Migration Center API Google Cloud Migration Center is a unified platform that helps you accelerate your end-to-end cloud journey from your current on-premises or cloud environments to Google Cloud + + com.google.cloud + google-cloud-migrationcenter-parent + 0.0.1-SNAPSHOT + + + google-cloud-migrationcenter + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-migrationcenter-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + grpc-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api.grpc + grpc-google-iam-v1 + + + org.threeten + threetenbp + + + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-migrationcenter-v1 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + \ No newline at end of file diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterClient.java b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterClient.java new file mode 100644 index 000000000000..ac36b7910163 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterClient.java @@ -0,0 +1,7857 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.stub.MigrationCenterStub; +import com.google.cloud.migrationcenter.v1.stub.MigrationCenterStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service describing handlers for resources. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ *   AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
+ *   Asset response = migrationCenterClient.getAsset(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the MigrationCenterClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of MigrationCenterSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MigrationCenterSettings migrationCenterSettings =
+ *     MigrationCenterSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * MigrationCenterClient migrationCenterClient =
+ *     MigrationCenterClient.create(migrationCenterSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MigrationCenterSettings migrationCenterSettings =
+ *     MigrationCenterSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * MigrationCenterClient migrationCenterClient =
+ *     MigrationCenterClient.create(migrationCenterSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MigrationCenterSettings migrationCenterSettings =
+ *     MigrationCenterSettings.newHttpJsonBuilder().build();
+ * MigrationCenterClient migrationCenterClient =
+ *     MigrationCenterClient.create(migrationCenterSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class MigrationCenterClient implements BackgroundResource { + private final MigrationCenterSettings settings; + private final MigrationCenterStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of MigrationCenterClient with default settings. */ + public static final MigrationCenterClient create() throws IOException { + return create(MigrationCenterSettings.newBuilder().build()); + } + + /** + * Constructs an instance of MigrationCenterClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final MigrationCenterClient create(MigrationCenterSettings settings) + throws IOException { + return new MigrationCenterClient(settings); + } + + /** + * Constructs an instance of MigrationCenterClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(MigrationCenterSettings). + */ + public static final MigrationCenterClient create(MigrationCenterStub stub) { + return new MigrationCenterClient(stub); + } + + /** + * Constructs an instance of MigrationCenterClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected MigrationCenterClient(MigrationCenterSettings settings) throws IOException { + this.settings = settings; + this.stub = ((MigrationCenterStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected MigrationCenterClient(MigrationCenterStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final MigrationCenterSettings getSettings() { + return settings; + } + + public MigrationCenterStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the assets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Asset element : migrationCenterClient.listAssets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListAssetsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssetsPagedResponse listAssets(LocationName parent) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the assets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Asset element : migrationCenterClient.listAssets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListAssetsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssetsPagedResponse listAssets(String parent) { + ListAssetsRequest request = ListAssetsRequest.newBuilder().setParent(parent).build(); + return listAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the assets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(AssetView.forNumber(0))
+   *           .build();
+   *   for (Asset element : migrationCenterClient.listAssets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) { + return listAssetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the assets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(AssetView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.listAssetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Asset element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAssetsPagedCallable() { + return stub.listAssetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the assets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(AssetView.forNumber(0))
+   *           .build();
+   *   while (true) {
+   *     ListAssetsResponse response = migrationCenterClient.listAssetsCallable().call(request);
+   *     for (Asset element : response.getAssetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAssetsCallable() { + return stub.listAssetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
+   *   Asset response = migrationCenterClient.getAsset(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Asset getAsset(AssetName name) { + GetAssetRequest request = + GetAssetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAsset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString();
+   *   Asset response = migrationCenterClient.getAsset(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Asset getAsset(String name) { + GetAssetRequest request = GetAssetRequest.newBuilder().setName(name).build(); + return getAsset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetAssetRequest request =
+   *       GetAssetRequest.newBuilder()
+   *           .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
+   *           .setView(AssetView.forNumber(0))
+   *           .build();
+   *   Asset response = migrationCenterClient.getAsset(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Asset getAsset(GetAssetRequest request) { + return getAssetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetAssetRequest request =
+   *       GetAssetRequest.newBuilder()
+   *           .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
+   *           .setView(AssetView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.getAssetCallable().futureCall(request);
+   *   // Do something.
+   *   Asset response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAssetCallable() { + return stub.getAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of an asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   Asset asset = Asset.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Asset response = migrationCenterClient.updateAsset(asset, updateMask);
+   * }
+   * }
+ * + * @param asset Required. The resource being updated. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. The values specified in the `update_mask` field are + * relative to the resource, not the full request. A field will be overwritten if it is in the + * mask. A single * value in the mask lets you to overwrite all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Asset updateAsset(Asset asset, FieldMask updateMask) { + UpdateAssetRequest request = + UpdateAssetRequest.newBuilder().setAsset(asset).setUpdateMask(updateMask).build(); + return updateAsset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of an asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateAssetRequest request =
+   *       UpdateAssetRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAsset(Asset.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Asset response = migrationCenterClient.updateAsset(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Asset updateAsset(UpdateAssetRequest request) { + return updateAssetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of an asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateAssetRequest request =
+   *       UpdateAssetRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAsset(Asset.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.updateAssetCallable().futureCall(request);
+   *   // Do something.
+   *   Asset response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAssetCallable() { + return stub.updateAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a list of assets. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   List requests = new ArrayList<>();
+   *   BatchUpdateAssetsResponse response =
+   *       migrationCenterClient.batchUpdateAssets(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. Parent value for batch asset update. + * @param requests Required. The request message specifying the resources to update. A maximum of + * 1000 assets can be modified in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchUpdateAssetsResponse batchUpdateAssets( + LocationName parent, List requests) { + BatchUpdateAssetsRequest request = + BatchUpdateAssetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllRequests(requests) + .build(); + return batchUpdateAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a list of assets. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   List requests = new ArrayList<>();
+   *   BatchUpdateAssetsResponse response =
+   *       migrationCenterClient.batchUpdateAssets(parent, requests);
+   * }
+   * }
+ * + * @param parent Required. Parent value for batch asset update. + * @param requests Required. The request message specifying the resources to update. A maximum of + * 1000 assets can be modified in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchUpdateAssetsResponse batchUpdateAssets( + String parent, List requests) { + BatchUpdateAssetsRequest request = + BatchUpdateAssetsRequest.newBuilder().setParent(parent).addAllRequests(requests).build(); + return batchUpdateAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a list of assets. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   BatchUpdateAssetsRequest request =
+   *       BatchUpdateAssetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchUpdateAssetsResponse response = migrationCenterClient.batchUpdateAssets(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchUpdateAssetsResponse batchUpdateAssets(BatchUpdateAssetsRequest request) { + return batchUpdateAssetsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a list of assets. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   BatchUpdateAssetsRequest request =
+   *       BatchUpdateAssetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.batchUpdateAssetsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchUpdateAssetsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchUpdateAssetsCallable() { + return stub.batchUpdateAssetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
+   *   migrationCenterClient.deleteAsset(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAsset(AssetName name) { + DeleteAssetRequest request = + DeleteAssetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteAsset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString();
+   *   migrationCenterClient.deleteAsset(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAsset(String name) { + DeleteAssetRequest request = DeleteAssetRequest.newBuilder().setName(name).build(); + deleteAsset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteAssetRequest request =
+   *       DeleteAssetRequest.newBuilder()
+   *           .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   migrationCenterClient.deleteAsset(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAsset(DeleteAssetRequest request) { + deleteAssetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteAssetRequest request =
+   *       DeleteAssetRequest.newBuilder()
+   *           .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.deleteAssetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAssetCallable() { + return stub.deleteAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes list of Assets. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   List names = new ArrayList<>();
+   *   migrationCenterClient.batchDeleteAssets(parent, names);
+   * }
+   * }
+ * + * @param parent Required. Parent value for batch asset delete. + * @param names Required. The IDs of the assets to delete. A maximum of 1000 assets can be deleted + * in a batch. Format: projects/{project}/locations/{location}/assets/{name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void batchDeleteAssets(LocationName parent, List names) { + BatchDeleteAssetsRequest request = + BatchDeleteAssetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + batchDeleteAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes list of Assets. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   List names = new ArrayList<>();
+   *   migrationCenterClient.batchDeleteAssets(parent, names);
+   * }
+   * }
+ * + * @param parent Required. Parent value for batch asset delete. + * @param names Required. The IDs of the assets to delete. A maximum of 1000 assets can be deleted + * in a batch. Format: projects/{project}/locations/{location}/assets/{name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void batchDeleteAssets(String parent, List names) { + BatchDeleteAssetsRequest request = + BatchDeleteAssetsRequest.newBuilder().setParent(parent).addAllNames(names).build(); + batchDeleteAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes list of Assets. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   BatchDeleteAssetsRequest request =
+   *       BatchDeleteAssetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   migrationCenterClient.batchDeleteAssets(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void batchDeleteAssets(BatchDeleteAssetsRequest request) { + batchDeleteAssetsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes list of Assets. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   BatchDeleteAssetsRequest request =
+   *       BatchDeleteAssetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.batchDeleteAssetsCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable batchDeleteAssetsCallable() { + return stub.batchDeleteAssetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reports a set of frames. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ReportAssetFramesRequest request =
+   *       ReportAssetFramesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setFrames(Frames.newBuilder().build())
+   *           .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+   *           .build();
+   *   ReportAssetFramesResponse response = migrationCenterClient.reportAssetFrames(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReportAssetFramesResponse reportAssetFrames(ReportAssetFramesRequest request) { + return reportAssetFramesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reports a set of frames. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ReportAssetFramesRequest request =
+   *       ReportAssetFramesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setFrames(Frames.newBuilder().build())
+   *           .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.reportAssetFramesCallable().futureCall(request);
+   *   // Do something.
+   *   ReportAssetFramesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + reportAssetFramesCallable() { + return stub.reportAssetFramesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Aggregates the requested fields based on provided function. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   AggregateAssetsValuesRequest request =
+   *       AggregateAssetsValuesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .addAllAggregations(new ArrayList())
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   AggregateAssetsValuesResponse response = migrationCenterClient.aggregateAssetsValues(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AggregateAssetsValuesResponse aggregateAssetsValues( + AggregateAssetsValuesRequest request) { + return aggregateAssetsValuesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Aggregates the requested fields based on provided function. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   AggregateAssetsValuesRequest request =
+   *       AggregateAssetsValuesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .addAllAggregations(new ArrayList())
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.aggregateAssetsValuesCallable().futureCall(request);
+   *   // Do something.
+   *   AggregateAssetsValuesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + aggregateAssetsValuesCallable() { + return stub.aggregateAssetsValuesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ImportJob importJob = ImportJob.newBuilder().build();
+   *   String importJobId = "importJobId1449444627";
+   *   ImportJob response =
+   *       migrationCenterClient.createImportJobAsync(parent, importJob, importJobId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param importJob Required. The resource being created. + * @param importJobId Required. ID of the import job. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createImportJobAsync( + LocationName parent, ImportJob importJob, String importJobId) { + CreateImportJobRequest request = + CreateImportJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setImportJob(importJob) + .setImportJobId(importJobId) + .build(); + return createImportJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ImportJob importJob = ImportJob.newBuilder().build();
+   *   String importJobId = "importJobId1449444627";
+   *   ImportJob response =
+   *       migrationCenterClient.createImportJobAsync(parent, importJob, importJobId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param importJob Required. The resource being created. + * @param importJobId Required. ID of the import job. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createImportJobAsync( + String parent, ImportJob importJob, String importJobId) { + CreateImportJobRequest request = + CreateImportJobRequest.newBuilder() + .setParent(parent) + .setImportJob(importJob) + .setImportJobId(importJobId) + .build(); + return createImportJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateImportJobRequest request =
+   *       CreateImportJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setImportJobId("importJobId1449444627")
+   *           .setImportJob(ImportJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ImportJob response = migrationCenterClient.createImportJobAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createImportJobAsync( + CreateImportJobRequest request) { + return createImportJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateImportJobRequest request =
+   *       CreateImportJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setImportJobId("importJobId1449444627")
+   *           .setImportJob(ImportJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.createImportJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportJob response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createImportJobOperationCallable() { + return stub.createImportJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateImportJobRequest request =
+   *       CreateImportJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setImportJobId("importJobId1449444627")
+   *           .setImportJob(ImportJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.createImportJobCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createImportJobCallable() { + return stub.createImportJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all import jobs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (ImportJob element : migrationCenterClient.listImportJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListImportJobsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListImportJobsPagedResponse listImportJobs(LocationName parent) { + ListImportJobsRequest request = + ListImportJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listImportJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all import jobs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (ImportJob element : migrationCenterClient.listImportJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListImportJobsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListImportJobsPagedResponse listImportJobs(String parent) { + ListImportJobsRequest request = ListImportJobsRequest.newBuilder().setParent(parent).build(); + return listImportJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all import jobs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListImportJobsRequest request =
+   *       ListImportJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(ImportJobView.forNumber(0))
+   *           .build();
+   *   for (ImportJob element : migrationCenterClient.listImportJobs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest request) { + return listImportJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all import jobs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListImportJobsRequest request =
+   *       ListImportJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(ImportJobView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.listImportJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ImportJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listImportJobsPagedCallable() { + return stub.listImportJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all import jobs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListImportJobsRequest request =
+   *       ListImportJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(ImportJobView.forNumber(0))
+   *           .build();
+   *   while (true) {
+   *     ListImportJobsResponse response =
+   *         migrationCenterClient.listImportJobsCallable().call(request);
+   *     for (ImportJob element : response.getImportJobsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listImportJobsCallable() { + return stub.listImportJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+   *   ImportJob response = migrationCenterClient.getImportJob(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ImportJob getImportJob(ImportJobName name) { + GetImportJobRequest request = + GetImportJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getImportJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+   *   ImportJob response = migrationCenterClient.getImportJob(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ImportJob getImportJob(String name) { + GetImportJobRequest request = GetImportJobRequest.newBuilder().setName(name).build(); + return getImportJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetImportJobRequest request =
+   *       GetImportJobRequest.newBuilder()
+   *           .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setView(ImportJobView.forNumber(0))
+   *           .build();
+   *   ImportJob response = migrationCenterClient.getImportJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ImportJob getImportJob(GetImportJobRequest request) { + return getImportJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetImportJobRequest request =
+   *       GetImportJobRequest.newBuilder()
+   *           .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setView(ImportJobView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.getImportJobCallable().futureCall(request);
+   *   // Do something.
+   *   ImportJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getImportJobCallable() { + return stub.getImportJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+   *   migrationCenterClient.deleteImportJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteImportJobAsync(ImportJobName name) { + DeleteImportJobRequest request = + DeleteImportJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteImportJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+   *   migrationCenterClient.deleteImportJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteImportJobAsync(String name) { + DeleteImportJobRequest request = DeleteImportJobRequest.newBuilder().setName(name).build(); + return deleteImportJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteImportJobRequest request =
+   *       DeleteImportJobRequest.newBuilder()
+   *           .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   migrationCenterClient.deleteImportJobAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteImportJobAsync( + DeleteImportJobRequest request) { + return deleteImportJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteImportJobRequest request =
+   *       DeleteImportJobRequest.newBuilder()
+   *           .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.deleteImportJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteImportJobOperationCallable() { + return stub.deleteImportJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteImportJobRequest request =
+   *       DeleteImportJobRequest.newBuilder()
+   *           .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.deleteImportJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteImportJobCallable() { + return stub.deleteImportJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ImportJob importJob = ImportJob.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ImportJob response = migrationCenterClient.updateImportJobAsync(importJob, updateMask).get();
+   * }
+   * }
+ * + * @param importJob Required. The resource being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. The values specified in the `update_mask` field are + * relative to the resource, not the full request. A field will be overwritten if it is in the + * mask. A single * value in the mask lets you to overwrite all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateImportJobAsync( + ImportJob importJob, FieldMask updateMask) { + UpdateImportJobRequest request = + UpdateImportJobRequest.newBuilder() + .setImportJob(importJob) + .setUpdateMask(updateMask) + .build(); + return updateImportJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateImportJobRequest request =
+   *       UpdateImportJobRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setImportJob(ImportJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ImportJob response = migrationCenterClient.updateImportJobAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateImportJobAsync( + UpdateImportJobRequest request) { + return updateImportJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateImportJobRequest request =
+   *       UpdateImportJobRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setImportJob(ImportJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.updateImportJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportJob response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateImportJobOperationCallable() { + return stub.updateImportJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateImportJobRequest request =
+   *       UpdateImportJobRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setImportJob(ImportJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.updateImportJobCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateImportJobCallable() { + return stub.updateImportJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Validates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+   *   migrationCenterClient.validateImportJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the import job to validate. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture validateImportJobAsync( + ImportJobName name) { + ValidateImportJobRequest request = + ValidateImportJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return validateImportJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Validates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+   *   migrationCenterClient.validateImportJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the import job to validate. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture validateImportJobAsync(String name) { + ValidateImportJobRequest request = ValidateImportJobRequest.newBuilder().setName(name).build(); + return validateImportJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Validates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ValidateImportJobRequest request =
+   *       ValidateImportJobRequest.newBuilder()
+   *           .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   migrationCenterClient.validateImportJobAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture validateImportJobAsync( + ValidateImportJobRequest request) { + return validateImportJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Validates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ValidateImportJobRequest request =
+   *       ValidateImportJobRequest.newBuilder()
+   *           .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.validateImportJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + validateImportJobOperationCallable() { + return stub.validateImportJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Validates an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ValidateImportJobRequest request =
+   *       ValidateImportJobRequest.newBuilder()
+   *           .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.validateImportJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable validateImportJobCallable() { + return stub.validateImportJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Runs an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+   *   migrationCenterClient.runImportJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the import job to run. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture runImportJobAsync(ImportJobName name) { + RunImportJobRequest request = + RunImportJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return runImportJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Runs an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+   *   migrationCenterClient.runImportJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the import job to run. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture runImportJobAsync(String name) { + RunImportJobRequest request = RunImportJobRequest.newBuilder().setName(name).build(); + return runImportJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Runs an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   RunImportJobRequest request =
+   *       RunImportJobRequest.newBuilder()
+   *           .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   migrationCenterClient.runImportJobAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture runImportJobAsync( + RunImportJobRequest request) { + return runImportJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Runs an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   RunImportJobRequest request =
+   *       RunImportJobRequest.newBuilder()
+   *           .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.runImportJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + runImportJobOperationCallable() { + return stub.runImportJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Runs an import job. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   RunImportJobRequest request =
+   *       RunImportJobRequest.newBuilder()
+   *           .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.runImportJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable runImportJobCallable() { + return stub.runImportJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ImportDataFileName name =
+   *       ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]");
+   *   ImportDataFile response = migrationCenterClient.getImportDataFile(name);
+   * }
+   * }
+ * + * @param name Required. Name of the ImportDataFile. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ImportDataFile getImportDataFile(ImportDataFileName name) { + GetImportDataFileRequest request = + GetImportDataFileRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getImportDataFile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name =
+   *       ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+   *           .toString();
+   *   ImportDataFile response = migrationCenterClient.getImportDataFile(name);
+   * }
+   * }
+ * + * @param name Required. Name of the ImportDataFile. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ImportDataFile getImportDataFile(String name) { + GetImportDataFileRequest request = GetImportDataFileRequest.newBuilder().setName(name).build(); + return getImportDataFile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetImportDataFileRequest request =
+   *       GetImportDataFileRequest.newBuilder()
+   *           .setName(
+   *               ImportDataFileName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+   *                   .toString())
+   *           .build();
+   *   ImportDataFile response = migrationCenterClient.getImportDataFile(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ImportDataFile getImportDataFile(GetImportDataFileRequest request) { + return getImportDataFileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetImportDataFileRequest request =
+   *       GetImportDataFileRequest.newBuilder()
+   *           .setName(
+   *               ImportDataFileName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.getImportDataFileCallable().futureCall(request);
+   *   // Do something.
+   *   ImportDataFile response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getImportDataFileCallable() { + return stub.getImportDataFileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List import data files. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+   *   for (ImportDataFile element :
+   *       migrationCenterClient.listImportDataFiles(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of the parent of the `ImportDataFiles` resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListImportDataFilesPagedResponse listImportDataFiles(ImportJobName parent) { + ListImportDataFilesRequest request = + ListImportDataFilesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listImportDataFiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List import data files. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+   *   for (ImportDataFile element :
+   *       migrationCenterClient.listImportDataFiles(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of the parent of the `ImportDataFiles` resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListImportDataFilesPagedResponse listImportDataFiles(String parent) { + ListImportDataFilesRequest request = + ListImportDataFilesRequest.newBuilder().setParent(parent).build(); + return listImportDataFiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List import data files. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListImportDataFilesRequest request =
+   *       ListImportDataFilesRequest.newBuilder()
+   *           .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (ImportDataFile element :
+   *       migrationCenterClient.listImportDataFiles(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListImportDataFilesPagedResponse listImportDataFiles( + ListImportDataFilesRequest request) { + return listImportDataFilesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List import data files. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListImportDataFilesRequest request =
+   *       ListImportDataFilesRequest.newBuilder()
+   *           .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.listImportDataFilesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ImportDataFile element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listImportDataFilesPagedCallable() { + return stub.listImportDataFilesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List import data files. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListImportDataFilesRequest request =
+   *       ListImportDataFilesRequest.newBuilder()
+   *           .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListImportDataFilesResponse response =
+   *         migrationCenterClient.listImportDataFilesCallable().call(request);
+   *     for (ImportDataFile element : response.getImportDataFilesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listImportDataFilesCallable() { + return stub.listImportDataFilesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+   *   ImportDataFile importDataFile = ImportDataFile.newBuilder().build();
+   *   String importDataFileId = "importDataFileId-1812510330";
+   *   ImportDataFile response =
+   *       migrationCenterClient
+   *           .createImportDataFileAsync(parent, importDataFile, importDataFileId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Name of the parent of the ImportDataFile. + * @param importDataFile Required. The resource being created. + * @param importDataFileId Required. The ID of the new data file. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createImportDataFileAsync( + ImportJobName parent, ImportDataFile importDataFile, String importDataFileId) { + CreateImportDataFileRequest request = + CreateImportDataFileRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setImportDataFile(importDataFile) + .setImportDataFileId(importDataFileId) + .build(); + return createImportDataFileAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+   *   ImportDataFile importDataFile = ImportDataFile.newBuilder().build();
+   *   String importDataFileId = "importDataFileId-1812510330";
+   *   ImportDataFile response =
+   *       migrationCenterClient
+   *           .createImportDataFileAsync(parent, importDataFile, importDataFileId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Name of the parent of the ImportDataFile. + * @param importDataFile Required. The resource being created. + * @param importDataFileId Required. The ID of the new data file. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createImportDataFileAsync( + String parent, ImportDataFile importDataFile, String importDataFileId) { + CreateImportDataFileRequest request = + CreateImportDataFileRequest.newBuilder() + .setParent(parent) + .setImportDataFile(importDataFile) + .setImportDataFileId(importDataFileId) + .build(); + return createImportDataFileAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateImportDataFileRequest request =
+   *       CreateImportDataFileRequest.newBuilder()
+   *           .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setImportDataFileId("importDataFileId-1812510330")
+   *           .setImportDataFile(ImportDataFile.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ImportDataFile response = migrationCenterClient.createImportDataFileAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createImportDataFileAsync( + CreateImportDataFileRequest request) { + return createImportDataFileOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateImportDataFileRequest request =
+   *       CreateImportDataFileRequest.newBuilder()
+   *           .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setImportDataFileId("importDataFileId-1812510330")
+   *           .setImportDataFile(ImportDataFile.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.createImportDataFileOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportDataFile response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createImportDataFileOperationCallable() { + return stub.createImportDataFileOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateImportDataFileRequest request =
+   *       CreateImportDataFileRequest.newBuilder()
+   *           .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+   *           .setImportDataFileId("importDataFileId-1812510330")
+   *           .setImportDataFile(ImportDataFile.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.createImportDataFileCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createImportDataFileCallable() { + return stub.createImportDataFileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ImportDataFileName name =
+   *       ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]");
+   *   migrationCenterClient.deleteImportDataFileAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the ImportDataFile to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteImportDataFileAsync( + ImportDataFileName name) { + DeleteImportDataFileRequest request = + DeleteImportDataFileRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteImportDataFileAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name =
+   *       ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+   *           .toString();
+   *   migrationCenterClient.deleteImportDataFileAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the ImportDataFile to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteImportDataFileAsync(String name) { + DeleteImportDataFileRequest request = + DeleteImportDataFileRequest.newBuilder().setName(name).build(); + return deleteImportDataFileAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteImportDataFileRequest request =
+   *       DeleteImportDataFileRequest.newBuilder()
+   *           .setName(
+   *               ImportDataFileName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   migrationCenterClient.deleteImportDataFileAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteImportDataFileAsync( + DeleteImportDataFileRequest request) { + return deleteImportDataFileOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteImportDataFileRequest request =
+   *       DeleteImportDataFileRequest.newBuilder()
+   *           .setName(
+   *               ImportDataFileName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.deleteImportDataFileOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteImportDataFileOperationCallable() { + return stub.deleteImportDataFileOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an import data file. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteImportDataFileRequest request =
+   *       DeleteImportDataFileRequest.newBuilder()
+   *           .setName(
+   *               ImportDataFileName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.deleteImportDataFileCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteImportDataFileCallable() { + return stub.deleteImportDataFileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all groups in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Group element : migrationCenterClient.listGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListGroupsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGroupsPagedResponse listGroups(LocationName parent) { + ListGroupsRequest request = + ListGroupsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all groups in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Group element : migrationCenterClient.listGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListGroupsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGroupsPagedResponse listGroups(String parent) { + ListGroupsRequest request = ListGroupsRequest.newBuilder().setParent(parent).build(); + return listGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all groups in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListGroupsRequest request =
+   *       ListGroupsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Group element : migrationCenterClient.listGroups(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGroupsPagedResponse listGroups(ListGroupsRequest request) { + return listGroupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all groups in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListGroupsRequest request =
+   *       ListGroupsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.listGroupsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Group element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listGroupsPagedCallable() { + return stub.listGroupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all groups in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListGroupsRequest request =
+   *       ListGroupsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListGroupsResponse response = migrationCenterClient.listGroupsCallable().call(request);
+   *     for (Group element : response.getGroupsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listGroupsCallable() { + return stub.listGroupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
+   *   Group response = migrationCenterClient.getGroup(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Group getGroup(GroupName name) { + GetGroupRequest request = + GetGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
+   *   Group response = migrationCenterClient.getGroup(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Group getGroup(String name) { + GetGroupRequest request = GetGroupRequest.newBuilder().setName(name).build(); + return getGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetGroupRequest request =
+   *       GetGroupRequest.newBuilder()
+   *           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+   *           .build();
+   *   Group response = migrationCenterClient.getGroup(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Group getGroup(GetGroupRequest request) { + return getGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetGroupRequest request =
+   *       GetGroupRequest.newBuilder()
+   *           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.getGroupCallable().futureCall(request);
+   *   // Do something.
+   *   Group response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getGroupCallable() { + return stub.getGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new group in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Group group = Group.newBuilder().build();
+   *   String groupId = "groupId293428218";
+   *   Group response = migrationCenterClient.createGroupAsync(parent, group, groupId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param group Required. The group resource being created. + * @param groupId Required. User specified ID for the group. It will become the last component of + * the group name. The ID must be unique within the project, must conform with RFC-1034, is + * restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must + * match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createGroupAsync( + LocationName parent, Group group, String groupId) { + CreateGroupRequest request = + CreateGroupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setGroup(group) + .setGroupId(groupId) + .build(); + return createGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new group in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Group group = Group.newBuilder().build();
+   *   String groupId = "groupId293428218";
+   *   Group response = migrationCenterClient.createGroupAsync(parent, group, groupId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param group Required. The group resource being created. + * @param groupId Required. User specified ID for the group. It will become the last component of + * the group name. The ID must be unique within the project, must conform with RFC-1034, is + * restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must + * match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createGroupAsync( + String parent, Group group, String groupId) { + CreateGroupRequest request = + CreateGroupRequest.newBuilder() + .setParent(parent) + .setGroup(group) + .setGroupId(groupId) + .build(); + return createGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new group in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateGroupRequest request =
+   *       CreateGroupRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setGroupId("groupId293428218")
+   *           .setGroup(Group.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Group response = migrationCenterClient.createGroupAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createGroupAsync( + CreateGroupRequest request) { + return createGroupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new group in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateGroupRequest request =
+   *       CreateGroupRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setGroupId("groupId293428218")
+   *           .setGroup(Group.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.createGroupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Group response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createGroupOperationCallable() { + return stub.createGroupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new group in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateGroupRequest request =
+   *       CreateGroupRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setGroupId("groupId293428218")
+   *           .setGroup(Group.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.createGroupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createGroupCallable() { + return stub.createGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   Group group = Group.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Group response = migrationCenterClient.updateGroupAsync(group, updateMask).get();
+   * }
+   * }
+ * + * @param group Required. The group resource being updated. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Group` resource by the update. The values specified in the `update_mask` are relative to + * the resource, not the full request. A field will be overwritten if it is in the mask. A + * single * value in the mask lets you to overwrite all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateGroupAsync( + Group group, FieldMask updateMask) { + UpdateGroupRequest request = + UpdateGroupRequest.newBuilder().setGroup(group).setUpdateMask(updateMask).build(); + return updateGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateGroupRequest request =
+   *       UpdateGroupRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setGroup(Group.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Group response = migrationCenterClient.updateGroupAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateGroupAsync( + UpdateGroupRequest request) { + return updateGroupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateGroupRequest request =
+   *       UpdateGroupRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setGroup(Group.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.updateGroupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Group response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateGroupOperationCallable() { + return stub.updateGroupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateGroupRequest request =
+   *       UpdateGroupRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setGroup(Group.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.updateGroupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateGroupCallable() { + return stub.updateGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
+   *   migrationCenterClient.deleteGroupAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the group resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteGroupAsync(GroupName name) { + DeleteGroupRequest request = + DeleteGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
+   *   migrationCenterClient.deleteGroupAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the group resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteGroupAsync(String name) { + DeleteGroupRequest request = DeleteGroupRequest.newBuilder().setName(name).build(); + return deleteGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteGroupRequest request =
+   *       DeleteGroupRequest.newBuilder()
+   *           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   migrationCenterClient.deleteGroupAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteGroupAsync( + DeleteGroupRequest request) { + return deleteGroupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteGroupRequest request =
+   *       DeleteGroupRequest.newBuilder()
+   *           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.deleteGroupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteGroupOperationCallable() { + return stub.deleteGroupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteGroupRequest request =
+   *       DeleteGroupRequest.newBuilder()
+   *           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.deleteGroupCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteGroupCallable() { + return stub.deleteGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds assets to a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
+   *   Group response = migrationCenterClient.addAssetsToGroupAsync(group).get();
+   * }
+   * }
+ * + * @param group Required. Group reference. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture addAssetsToGroupAsync(GroupName group) { + AddAssetsToGroupRequest request = + AddAssetsToGroupRequest.newBuilder() + .setGroup(group == null ? null : group.toString()) + .build(); + return addAssetsToGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds assets to a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
+   *   Group response = migrationCenterClient.addAssetsToGroupAsync(group).get();
+   * }
+   * }
+ * + * @param group Required. Group reference. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture addAssetsToGroupAsync(String group) { + AddAssetsToGroupRequest request = AddAssetsToGroupRequest.newBuilder().setGroup(group).build(); + return addAssetsToGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds assets to a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   AddAssetsToGroupRequest request =
+   *       AddAssetsToGroupRequest.newBuilder()
+   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAssets(AssetList.newBuilder().build())
+   *           .setAllowExisting(true)
+   *           .build();
+   *   Group response = migrationCenterClient.addAssetsToGroupAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture addAssetsToGroupAsync( + AddAssetsToGroupRequest request) { + return addAssetsToGroupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds assets to a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   AddAssetsToGroupRequest request =
+   *       AddAssetsToGroupRequest.newBuilder()
+   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAssets(AssetList.newBuilder().build())
+   *           .setAllowExisting(true)
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.addAssetsToGroupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Group response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + addAssetsToGroupOperationCallable() { + return stub.addAssetsToGroupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds assets to a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   AddAssetsToGroupRequest request =
+   *       AddAssetsToGroupRequest.newBuilder()
+   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAssets(AssetList.newBuilder().build())
+   *           .setAllowExisting(true)
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.addAssetsToGroupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable addAssetsToGroupCallable() { + return stub.addAssetsToGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes assets from a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
+   *   Group response = migrationCenterClient.removeAssetsFromGroupAsync(group).get();
+   * }
+   * }
+ * + * @param group Required. Group reference. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture removeAssetsFromGroupAsync( + GroupName group) { + RemoveAssetsFromGroupRequest request = + RemoveAssetsFromGroupRequest.newBuilder() + .setGroup(group == null ? null : group.toString()) + .build(); + return removeAssetsFromGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes assets from a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
+   *   Group response = migrationCenterClient.removeAssetsFromGroupAsync(group).get();
+   * }
+   * }
+ * + * @param group Required. Group reference. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture removeAssetsFromGroupAsync(String group) { + RemoveAssetsFromGroupRequest request = + RemoveAssetsFromGroupRequest.newBuilder().setGroup(group).build(); + return removeAssetsFromGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes assets from a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   RemoveAssetsFromGroupRequest request =
+   *       RemoveAssetsFromGroupRequest.newBuilder()
+   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAssets(AssetList.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   Group response = migrationCenterClient.removeAssetsFromGroupAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture removeAssetsFromGroupAsync( + RemoveAssetsFromGroupRequest request) { + return removeAssetsFromGroupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes assets from a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   RemoveAssetsFromGroupRequest request =
+   *       RemoveAssetsFromGroupRequest.newBuilder()
+   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAssets(AssetList.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.removeAssetsFromGroupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Group response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + removeAssetsFromGroupOperationCallable() { + return stub.removeAssetsFromGroupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes assets from a group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   RemoveAssetsFromGroupRequest request =
+   *       RemoveAssetsFromGroupRequest.newBuilder()
+   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAssets(AssetList.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.removeAssetsFromGroupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeAssetsFromGroupCallable() { + return stub.removeAssetsFromGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all error frames in a given source and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
+   *   for (ErrorFrame element : migrationCenterClient.listErrorFrames(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value (the source) for `ListErrorFramesRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListErrorFramesPagedResponse listErrorFrames(SourceName parent) { + ListErrorFramesRequest request = + ListErrorFramesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listErrorFrames(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all error frames in a given source and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
+   *   for (ErrorFrame element : migrationCenterClient.listErrorFrames(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value (the source) for `ListErrorFramesRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListErrorFramesPagedResponse listErrorFrames(String parent) { + ListErrorFramesRequest request = ListErrorFramesRequest.newBuilder().setParent(parent).build(); + return listErrorFrames(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all error frames in a given source and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListErrorFramesRequest request =
+   *       ListErrorFramesRequest.newBuilder()
+   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setView(ErrorFrameView.forNumber(0))
+   *           .build();
+   *   for (ErrorFrame element : migrationCenterClient.listErrorFrames(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListErrorFramesPagedResponse listErrorFrames(ListErrorFramesRequest request) { + return listErrorFramesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all error frames in a given source and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListErrorFramesRequest request =
+   *       ListErrorFramesRequest.newBuilder()
+   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setView(ErrorFrameView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.listErrorFramesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ErrorFrame element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listErrorFramesPagedCallable() { + return stub.listErrorFramesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all error frames in a given source and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListErrorFramesRequest request =
+   *       ListErrorFramesRequest.newBuilder()
+   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setView(ErrorFrameView.forNumber(0))
+   *           .build();
+   *   while (true) {
+   *     ListErrorFramesResponse response =
+   *         migrationCenterClient.listErrorFramesCallable().call(request);
+   *     for (ErrorFrame element : response.getErrorFramesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listErrorFramesCallable() { + return stub.listErrorFramesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an error frame. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ErrorFrameName name =
+   *       ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]");
+   *   ErrorFrame response = migrationCenterClient.getErrorFrame(name);
+   * }
+   * }
+ * + * @param name Required. The name of the frame to retrieve. Format: + * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ErrorFrame getErrorFrame(ErrorFrameName name) { + GetErrorFrameRequest request = + GetErrorFrameRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getErrorFrame(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an error frame. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name =
+   *       ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]").toString();
+   *   ErrorFrame response = migrationCenterClient.getErrorFrame(name);
+   * }
+   * }
+ * + * @param name Required. The name of the frame to retrieve. Format: + * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ErrorFrame getErrorFrame(String name) { + GetErrorFrameRequest request = GetErrorFrameRequest.newBuilder().setName(name).build(); + return getErrorFrame(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an error frame. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetErrorFrameRequest request =
+   *       GetErrorFrameRequest.newBuilder()
+   *           .setName(
+   *               ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]")
+   *                   .toString())
+   *           .setView(ErrorFrameView.forNumber(0))
+   *           .build();
+   *   ErrorFrame response = migrationCenterClient.getErrorFrame(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ErrorFrame getErrorFrame(GetErrorFrameRequest request) { + return getErrorFrameCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of an error frame. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetErrorFrameRequest request =
+   *       GetErrorFrameRequest.newBuilder()
+   *           .setName(
+   *               ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]")
+   *                   .toString())
+   *           .setView(ErrorFrameView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.getErrorFrameCallable().futureCall(request);
+   *   // Do something.
+   *   ErrorFrame response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getErrorFrameCallable() { + return stub.getErrorFrameCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the sources in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Source element : migrationCenterClient.listSources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListSourcesRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSourcesPagedResponse listSources(LocationName parent) { + ListSourcesRequest request = + ListSourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the sources in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Source element : migrationCenterClient.listSources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListSourcesRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSourcesPagedResponse listSources(String parent) { + ListSourcesRequest request = ListSourcesRequest.newBuilder().setParent(parent).build(); + return listSources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the sources in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListSourcesRequest request =
+   *       ListSourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Source element : migrationCenterClient.listSources(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSourcesPagedResponse listSources(ListSourcesRequest request) { + return listSourcesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the sources in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListSourcesRequest request =
+   *       ListSourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.listSourcesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Source element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSourcesPagedCallable() { + return stub.listSourcesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the sources in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListSourcesRequest request =
+   *       ListSourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListSourcesResponse response = migrationCenterClient.listSourcesCallable().call(request);
+   *     for (Source element : response.getSourcesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSourcesCallable() { + return stub.listSourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
+   *   Source response = migrationCenterClient.getSource(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Source getSource(SourceName name) { + GetSourceRequest request = + GetSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
+   *   Source response = migrationCenterClient.getSource(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Source getSource(String name) { + GetSourceRequest request = GetSourceRequest.newBuilder().setName(name).build(); + return getSource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetSourceRequest request =
+   *       GetSourceRequest.newBuilder()
+   *           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+   *           .build();
+   *   Source response = migrationCenterClient.getSource(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Source getSource(GetSourceRequest request) { + return getSourceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetSourceRequest request =
+   *       GetSourceRequest.newBuilder()
+   *           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.getSourceCallable().futureCall(request);
+   *   // Do something.
+   *   Source response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSourceCallable() { + return stub.getSourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new source in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Source source = Source.newBuilder().build();
+   *   String sourceId = "sourceId1746327190";
+   *   Source response = migrationCenterClient.createSourceAsync(parent, source, sourceId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param source Required. The resource being created. + * @param sourceId Required. User specified ID for the source. It will become the last component + * of the source name. The ID must be unique within the project, must conform with RFC-1034, + * is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID + * must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSourceAsync( + LocationName parent, Source source, String sourceId) { + CreateSourceRequest request = + CreateSourceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSource(source) + .setSourceId(sourceId) + .build(); + return createSourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new source in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Source source = Source.newBuilder().build();
+   *   String sourceId = "sourceId1746327190";
+   *   Source response = migrationCenterClient.createSourceAsync(parent, source, sourceId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param source Required. The resource being created. + * @param sourceId Required. User specified ID for the source. It will become the last component + * of the source name. The ID must be unique within the project, must conform with RFC-1034, + * is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID + * must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSourceAsync( + String parent, Source source, String sourceId) { + CreateSourceRequest request = + CreateSourceRequest.newBuilder() + .setParent(parent) + .setSource(source) + .setSourceId(sourceId) + .build(); + return createSourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new source in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateSourceRequest request =
+   *       CreateSourceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSourceId("sourceId1746327190")
+   *           .setSource(Source.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Source response = migrationCenterClient.createSourceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSourceAsync( + CreateSourceRequest request) { + return createSourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new source in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateSourceRequest request =
+   *       CreateSourceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSourceId("sourceId1746327190")
+   *           .setSource(Source.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.createSourceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Source response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createSourceOperationCallable() { + return stub.createSourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new source in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateSourceRequest request =
+   *       CreateSourceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSourceId("sourceId1746327190")
+   *           .setSource(Source.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.createSourceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createSourceCallable() { + return stub.createSourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   Source source = Source.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Source response = migrationCenterClient.updateSourceAsync(source, updateMask).get();
+   * }
+   * }
+ * + * @param source Required. The resource being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Source` resource by the update. The values specified in the `update_mask` field are + * relative to the resource, not the full request. A field will be overwritten if it is in the + * mask. A single * value in the mask lets you to overwrite all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateSourceAsync( + Source source, FieldMask updateMask) { + UpdateSourceRequest request = + UpdateSourceRequest.newBuilder().setSource(source).setUpdateMask(updateMask).build(); + return updateSourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateSourceRequest request =
+   *       UpdateSourceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSource(Source.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Source response = migrationCenterClient.updateSourceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateSourceAsync( + UpdateSourceRequest request) { + return updateSourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateSourceRequest request =
+   *       UpdateSourceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSource(Source.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.updateSourceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Source response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateSourceOperationCallable() { + return stub.updateSourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateSourceRequest request =
+   *       UpdateSourceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSource(Source.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.updateSourceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateSourceCallable() { + return stub.updateSourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
+   *   migrationCenterClient.deleteSourceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSourceAsync(SourceName name) { + DeleteSourceRequest request = + DeleteSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteSourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
+   *   migrationCenterClient.deleteSourceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSourceAsync(String name) { + DeleteSourceRequest request = DeleteSourceRequest.newBuilder().setName(name).build(); + return deleteSourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteSourceRequest request =
+   *       DeleteSourceRequest.newBuilder()
+   *           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   migrationCenterClient.deleteSourceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSourceAsync( + DeleteSourceRequest request) { + return deleteSourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteSourceRequest request =
+   *       DeleteSourceRequest.newBuilder()
+   *           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.deleteSourceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteSourceOperationCallable() { + return stub.deleteSourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a source. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteSourceRequest request =
+   *       DeleteSourceRequest.newBuilder()
+   *           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.deleteSourceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteSourceCallable() { + return stub.deleteSourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the preference sets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (PreferenceSet element : migrationCenterClient.listPreferenceSets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListPreferenceSetsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPreferenceSetsPagedResponse listPreferenceSets(LocationName parent) { + ListPreferenceSetsRequest request = + ListPreferenceSetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPreferenceSets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the preference sets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (PreferenceSet element : migrationCenterClient.listPreferenceSets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListPreferenceSetsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPreferenceSetsPagedResponse listPreferenceSets(String parent) { + ListPreferenceSetsRequest request = + ListPreferenceSetsRequest.newBuilder().setParent(parent).build(); + return listPreferenceSets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the preference sets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListPreferenceSetsRequest request =
+   *       ListPreferenceSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (PreferenceSet element : migrationCenterClient.listPreferenceSets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPreferenceSetsPagedResponse listPreferenceSets( + ListPreferenceSetsRequest request) { + return listPreferenceSetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the preference sets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListPreferenceSetsRequest request =
+   *       ListPreferenceSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.listPreferenceSetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (PreferenceSet element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPreferenceSetsPagedCallable() { + return stub.listPreferenceSetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the preference sets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListPreferenceSetsRequest request =
+   *       ListPreferenceSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListPreferenceSetsResponse response =
+   *         migrationCenterClient.listPreferenceSetsCallable().call(request);
+   *     for (PreferenceSet element : response.getPreferenceSetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPreferenceSetsCallable() { + return stub.listPreferenceSetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]");
+   *   PreferenceSet response = migrationCenterClient.getPreferenceSet(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PreferenceSet getPreferenceSet(PreferenceSetName name) { + GetPreferenceSetRequest request = + GetPreferenceSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getPreferenceSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString();
+   *   PreferenceSet response = migrationCenterClient.getPreferenceSet(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PreferenceSet getPreferenceSet(String name) { + GetPreferenceSetRequest request = GetPreferenceSetRequest.newBuilder().setName(name).build(); + return getPreferenceSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetPreferenceSetRequest request =
+   *       GetPreferenceSetRequest.newBuilder()
+   *           .setName(
+   *               PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString())
+   *           .build();
+   *   PreferenceSet response = migrationCenterClient.getPreferenceSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PreferenceSet getPreferenceSet(GetPreferenceSetRequest request) { + return getPreferenceSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetPreferenceSetRequest request =
+   *       GetPreferenceSetRequest.newBuilder()
+   *           .setName(
+   *               PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.getPreferenceSetCallable().futureCall(request);
+   *   // Do something.
+   *   PreferenceSet response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getPreferenceSetCallable() { + return stub.getPreferenceSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new preference set in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   PreferenceSet preferenceSet = PreferenceSet.newBuilder().build();
+   *   String preferenceSetId = "preferenceSetId-569419518";
+   *   PreferenceSet response =
+   *       migrationCenterClient
+   *           .createPreferenceSetAsync(parent, preferenceSet, preferenceSetId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param preferenceSet Required. The preference set resource being created. + * @param preferenceSetId Required. User specified ID for the preference set. It will become the + * last component of the preference set name. The ID must be unique within the project, must + * conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 + * characters. The ID must match the regular expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPreferenceSetAsync( + LocationName parent, PreferenceSet preferenceSet, String preferenceSetId) { + CreatePreferenceSetRequest request = + CreatePreferenceSetRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPreferenceSet(preferenceSet) + .setPreferenceSetId(preferenceSetId) + .build(); + return createPreferenceSetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new preference set in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   PreferenceSet preferenceSet = PreferenceSet.newBuilder().build();
+   *   String preferenceSetId = "preferenceSetId-569419518";
+   *   PreferenceSet response =
+   *       migrationCenterClient
+   *           .createPreferenceSetAsync(parent, preferenceSet, preferenceSetId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param preferenceSet Required. The preference set resource being created. + * @param preferenceSetId Required. User specified ID for the preference set. It will become the + * last component of the preference set name. The ID must be unique within the project, must + * conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 + * characters. The ID must match the regular expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPreferenceSetAsync( + String parent, PreferenceSet preferenceSet, String preferenceSetId) { + CreatePreferenceSetRequest request = + CreatePreferenceSetRequest.newBuilder() + .setParent(parent) + .setPreferenceSet(preferenceSet) + .setPreferenceSetId(preferenceSetId) + .build(); + return createPreferenceSetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new preference set in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreatePreferenceSetRequest request =
+   *       CreatePreferenceSetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPreferenceSetId("preferenceSetId-569419518")
+   *           .setPreferenceSet(PreferenceSet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   PreferenceSet response = migrationCenterClient.createPreferenceSetAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPreferenceSetAsync( + CreatePreferenceSetRequest request) { + return createPreferenceSetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new preference set in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreatePreferenceSetRequest request =
+   *       CreatePreferenceSetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPreferenceSetId("preferenceSetId-569419518")
+   *           .setPreferenceSet(PreferenceSet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.createPreferenceSetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   PreferenceSet response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createPreferenceSetOperationCallable() { + return stub.createPreferenceSetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new preference set in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreatePreferenceSetRequest request =
+   *       CreatePreferenceSetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPreferenceSetId("preferenceSetId-569419518")
+   *           .setPreferenceSet(PreferenceSet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.createPreferenceSetCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createPreferenceSetCallable() { + return stub.createPreferenceSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   PreferenceSet preferenceSet = PreferenceSet.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   PreferenceSet response =
+   *       migrationCenterClient.updatePreferenceSetAsync(preferenceSet, updateMask).get();
+   * }
+   * }
+ * + * @param preferenceSet Required. The preference set resource being updated. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `PreferenceSet` resource by the update. The values specified in the `update_mask` field are + * relative to the resource, not the full request. A field will be overwritten if it is in the + * mask. A single * value in the mask lets you to overwrite all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updatePreferenceSetAsync( + PreferenceSet preferenceSet, FieldMask updateMask) { + UpdatePreferenceSetRequest request = + UpdatePreferenceSetRequest.newBuilder() + .setPreferenceSet(preferenceSet) + .setUpdateMask(updateMask) + .build(); + return updatePreferenceSetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdatePreferenceSetRequest request =
+   *       UpdatePreferenceSetRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setPreferenceSet(PreferenceSet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   PreferenceSet response = migrationCenterClient.updatePreferenceSetAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updatePreferenceSetAsync( + UpdatePreferenceSetRequest request) { + return updatePreferenceSetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdatePreferenceSetRequest request =
+   *       UpdatePreferenceSetRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setPreferenceSet(PreferenceSet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.updatePreferenceSetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   PreferenceSet response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updatePreferenceSetOperationCallable() { + return stub.updatePreferenceSetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdatePreferenceSetRequest request =
+   *       UpdatePreferenceSetRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setPreferenceSet(PreferenceSet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.updatePreferenceSetCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updatePreferenceSetCallable() { + return stub.updatePreferenceSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]");
+   *   migrationCenterClient.deletePreferenceSetAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the group resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePreferenceSetAsync( + PreferenceSetName name) { + DeletePreferenceSetRequest request = + DeletePreferenceSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deletePreferenceSetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString();
+   *   migrationCenterClient.deletePreferenceSetAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the group resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePreferenceSetAsync(String name) { + DeletePreferenceSetRequest request = + DeletePreferenceSetRequest.newBuilder().setName(name).build(); + return deletePreferenceSetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeletePreferenceSetRequest request =
+   *       DeletePreferenceSetRequest.newBuilder()
+   *           .setName(
+   *               PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   migrationCenterClient.deletePreferenceSetAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePreferenceSetAsync( + DeletePreferenceSetRequest request) { + return deletePreferenceSetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeletePreferenceSetRequest request =
+   *       DeletePreferenceSetRequest.newBuilder()
+   *           .setName(
+   *               PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.deletePreferenceSetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deletePreferenceSetOperationCallable() { + return stub.deletePreferenceSetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a preference set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeletePreferenceSetRequest request =
+   *       DeletePreferenceSetRequest.newBuilder()
+   *           .setName(
+   *               PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.deletePreferenceSetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deletePreferenceSetCallable() { + return stub.deletePreferenceSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of regional settings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   SettingsName name = SettingsName.of("[PROJECT]", "[LOCATION]");
+   *   Settings response = migrationCenterClient.getSettings(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Settings getSettings(SettingsName name) { + GetSettingsRequest request = + GetSettingsRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of regional settings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = SettingsName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Settings response = migrationCenterClient.getSettings(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Settings getSettings(String name) { + GetSettingsRequest request = GetSettingsRequest.newBuilder().setName(name).build(); + return getSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of regional settings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetSettingsRequest request =
+   *       GetSettingsRequest.newBuilder()
+   *           .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   Settings response = migrationCenterClient.getSettings(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Settings getSettings(GetSettingsRequest request) { + return getSettingsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of regional settings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetSettingsRequest request =
+   *       GetSettingsRequest.newBuilder()
+   *           .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.getSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   Settings response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSettingsCallable() { + return stub.getSettingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the regional-level project settings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   Settings settings = Settings.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Settings response = migrationCenterClient.updateSettingsAsync(settings, updateMask).get();
+   * }
+   * }
+ * + * @param settings Required. The project settings resource being updated. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Settings` resource by the update. The values specified in the `update_mask` field are + * relative to the resource, not the full request. A field will be overwritten if it is in the + * mask. A single * value in the mask lets you to overwrite all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateSettingsAsync( + Settings settings, FieldMask updateMask) { + UpdateSettingsRequest request = + UpdateSettingsRequest.newBuilder().setSettings(settings).setUpdateMask(updateMask).build(); + return updateSettingsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the regional-level project settings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateSettingsRequest request =
+   *       UpdateSettingsRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSettings(Settings.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Settings response = migrationCenterClient.updateSettingsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateSettingsAsync( + UpdateSettingsRequest request) { + return updateSettingsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the regional-level project settings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateSettingsRequest request =
+   *       UpdateSettingsRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSettings(Settings.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.updateSettingsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Settings response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateSettingsOperationCallable() { + return stub.updateSettingsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the regional-level project settings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   UpdateSettingsRequest request =
+   *       UpdateSettingsRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSettings(Settings.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.updateSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateSettingsCallable() { + return stub.updateSettingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a report configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ReportConfig reportConfig = ReportConfig.newBuilder().build();
+   *   String reportConfigId = "reportConfigId1951664465";
+   *   ReportConfig response =
+   *       migrationCenterClient.createReportConfigAsync(parent, reportConfig, reportConfigId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param reportConfig Required. The report config set resource being created. + * @param reportConfigId Required. User specified ID for the report config. It will become the + * last component of the report config name. The ID must be unique within the project, must + * conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 + * characters. The ID must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createReportConfigAsync( + LocationName parent, ReportConfig reportConfig, String reportConfigId) { + CreateReportConfigRequest request = + CreateReportConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setReportConfig(reportConfig) + .setReportConfigId(reportConfigId) + .build(); + return createReportConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a report configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ReportConfig reportConfig = ReportConfig.newBuilder().build();
+   *   String reportConfigId = "reportConfigId1951664465";
+   *   ReportConfig response =
+   *       migrationCenterClient.createReportConfigAsync(parent, reportConfig, reportConfigId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param reportConfig Required. The report config set resource being created. + * @param reportConfigId Required. User specified ID for the report config. It will become the + * last component of the report config name. The ID must be unique within the project, must + * conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 + * characters. The ID must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createReportConfigAsync( + String parent, ReportConfig reportConfig, String reportConfigId) { + CreateReportConfigRequest request = + CreateReportConfigRequest.newBuilder() + .setParent(parent) + .setReportConfig(reportConfig) + .setReportConfigId(reportConfigId) + .build(); + return createReportConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a report configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateReportConfigRequest request =
+   *       CreateReportConfigRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setReportConfigId("reportConfigId1951664465")
+   *           .setReportConfig(ReportConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ReportConfig response = migrationCenterClient.createReportConfigAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createReportConfigAsync( + CreateReportConfigRequest request) { + return createReportConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a report configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateReportConfigRequest request =
+   *       CreateReportConfigRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setReportConfigId("reportConfigId1951664465")
+   *           .setReportConfig(ReportConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.createReportConfigOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ReportConfig response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createReportConfigOperationCallable() { + return stub.createReportConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a report configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateReportConfigRequest request =
+   *       CreateReportConfigRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setReportConfigId("reportConfigId1951664465")
+   *           .setReportConfig(ReportConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.createReportConfigCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createReportConfigCallable() { + return stub.createReportConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
+   *   ReportConfig response = migrationCenterClient.getReportConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReportConfig getReportConfig(ReportConfigName name) { + GetReportConfigRequest request = + GetReportConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getReportConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString();
+   *   ReportConfig response = migrationCenterClient.getReportConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReportConfig getReportConfig(String name) { + GetReportConfigRequest request = GetReportConfigRequest.newBuilder().setName(name).build(); + return getReportConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetReportConfigRequest request =
+   *       GetReportConfigRequest.newBuilder()
+   *           .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+   *           .build();
+   *   ReportConfig response = migrationCenterClient.getReportConfig(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReportConfig getReportConfig(GetReportConfigRequest request) { + return getReportConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetReportConfigRequest request =
+   *       GetReportConfigRequest.newBuilder()
+   *           .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.getReportConfigCallable().futureCall(request);
+   *   // Do something.
+   *   ReportConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getReportConfigCallable() { + return stub.getReportConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ReportConfigs in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (ReportConfig element : migrationCenterClient.listReportConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListReportConfigsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReportConfigsPagedResponse listReportConfigs(LocationName parent) { + ListReportConfigsRequest request = + ListReportConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listReportConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ReportConfigs in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (ReportConfig element : migrationCenterClient.listReportConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListReportConfigsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReportConfigsPagedResponse listReportConfigs(String parent) { + ListReportConfigsRequest request = + ListReportConfigsRequest.newBuilder().setParent(parent).build(); + return listReportConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ReportConfigs in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListReportConfigsRequest request =
+   *       ListReportConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (ReportConfig element : migrationCenterClient.listReportConfigs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReportConfigsPagedResponse listReportConfigs(ListReportConfigsRequest request) { + return listReportConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ReportConfigs in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListReportConfigsRequest request =
+   *       ListReportConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.listReportConfigsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ReportConfig element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listReportConfigsPagedCallable() { + return stub.listReportConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ReportConfigs in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListReportConfigsRequest request =
+   *       ListReportConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListReportConfigsResponse response =
+   *         migrationCenterClient.listReportConfigsCallable().call(request);
+   *     for (ReportConfig element : response.getReportConfigsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listReportConfigsCallable() { + return stub.listReportConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
+   *   migrationCenterClient.deleteReportConfigAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteReportConfigAsync( + ReportConfigName name) { + DeleteReportConfigRequest request = + DeleteReportConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteReportConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString();
+   *   migrationCenterClient.deleteReportConfigAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteReportConfigAsync(String name) { + DeleteReportConfigRequest request = + DeleteReportConfigRequest.newBuilder().setName(name).build(); + return deleteReportConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteReportConfigRequest request =
+   *       DeleteReportConfigRequest.newBuilder()
+   *           .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   migrationCenterClient.deleteReportConfigAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteReportConfigAsync( + DeleteReportConfigRequest request) { + return deleteReportConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteReportConfigRequest request =
+   *       DeleteReportConfigRequest.newBuilder()
+   *           .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.deleteReportConfigOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteReportConfigOperationCallable() { + return stub.deleteReportConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteReportConfigRequest request =
+   *       DeleteReportConfigRequest.newBuilder()
+   *           .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.deleteReportConfigCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteReportConfigCallable() { + return stub.deleteReportConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
+   *   Report report = Report.newBuilder().build();
+   *   String reportId = "reportId-427040401";
+   *   Report response = migrationCenterClient.createReportAsync(parent, report, reportId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param report Required. The report resource being created. + * @param reportId Required. User specified id for the report. It will become the last component + * of the report name. The id must be unique within the project, must conform with RFC-1034, + * is restricted to lower-cased letters, and has a maximum length of 63 characters. The id + * must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createReportAsync( + ReportConfigName parent, Report report, String reportId) { + CreateReportRequest request = + CreateReportRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setReport(report) + .setReportId(reportId) + .build(); + return createReportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString();
+   *   Report report = Report.newBuilder().build();
+   *   String reportId = "reportId-427040401";
+   *   Report response = migrationCenterClient.createReportAsync(parent, report, reportId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param report Required. The report resource being created. + * @param reportId Required. User specified id for the report. It will become the last component + * of the report name. The id must be unique within the project, must conform with RFC-1034, + * is restricted to lower-cased letters, and has a maximum length of 63 characters. The id + * must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createReportAsync( + String parent, Report report, String reportId) { + CreateReportRequest request = + CreateReportRequest.newBuilder() + .setParent(parent) + .setReport(report) + .setReportId(reportId) + .build(); + return createReportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateReportRequest request =
+   *       CreateReportRequest.newBuilder()
+   *           .setParent(
+   *               ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+   *           .setReportId("reportId-427040401")
+   *           .setReport(Report.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Report response = migrationCenterClient.createReportAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createReportAsync( + CreateReportRequest request) { + return createReportOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateReportRequest request =
+   *       CreateReportRequest.newBuilder()
+   *           .setParent(
+   *               ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+   *           .setReportId("reportId-427040401")
+   *           .setReport(Report.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.createReportOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Report response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createReportOperationCallable() { + return stub.createReportOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   CreateReportRequest request =
+   *       CreateReportRequest.newBuilder()
+   *           .setParent(
+   *               ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+   *           .setReportId("reportId-427040401")
+   *           .setReport(Report.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.createReportCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createReportCallable() { + return stub.createReportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]");
+   *   Report response = migrationCenterClient.getReport(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Report getReport(ReportName name) { + GetReportRequest request = + GetReportRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getReport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name =
+   *       ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString();
+   *   Report response = migrationCenterClient.getReport(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Report getReport(String name) { + GetReportRequest request = GetReportRequest.newBuilder().setName(name).build(); + return getReport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetReportRequest request =
+   *       GetReportRequest.newBuilder()
+   *           .setName(
+   *               ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]")
+   *                   .toString())
+   *           .setView(ReportView.forNumber(0))
+   *           .build();
+   *   Report response = migrationCenterClient.getReport(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Report getReport(GetReportRequest request) { + return getReportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetReportRequest request =
+   *       GetReportRequest.newBuilder()
+   *           .setName(
+   *               ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]")
+   *                   .toString())
+   *           .setView(ReportView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = migrationCenterClient.getReportCallable().futureCall(request);
+   *   // Do something.
+   *   Report response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getReportCallable() { + return stub.getReportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Reports in a given ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
+   *   for (Report element : migrationCenterClient.listReports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListReportsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReportsPagedResponse listReports(ReportConfigName parent) { + ListReportsRequest request = + ListReportsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listReports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Reports in a given ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString();
+   *   for (Report element : migrationCenterClient.listReports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for `ListReportsRequest`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReportsPagedResponse listReports(String parent) { + ListReportsRequest request = ListReportsRequest.newBuilder().setParent(parent).build(); + return listReports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Reports in a given ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListReportsRequest request =
+   *       ListReportsRequest.newBuilder()
+   *           .setParent(
+   *               ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(ReportView.forNumber(0))
+   *           .build();
+   *   for (Report element : migrationCenterClient.listReports(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReportsPagedResponse listReports(ListReportsRequest request) { + return listReportsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Reports in a given ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListReportsRequest request =
+   *       ListReportsRequest.newBuilder()
+   *           .setParent(
+   *               ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(ReportView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.listReportsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Report element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listReportsPagedCallable() { + return stub.listReportsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Reports in a given ReportConfig. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListReportsRequest request =
+   *       ListReportsRequest.newBuilder()
+   *           .setParent(
+   *               ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(ReportView.forNumber(0))
+   *           .build();
+   *   while (true) {
+   *     ListReportsResponse response = migrationCenterClient.listReportsCallable().call(request);
+   *     for (Report element : response.getReportsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listReportsCallable() { + return stub.listReportsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]");
+   *   migrationCenterClient.deleteReportAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteReportAsync(ReportName name) { + DeleteReportRequest request = + DeleteReportRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteReportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   String name =
+   *       ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString();
+   *   migrationCenterClient.deleteReportAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteReportAsync(String name) { + DeleteReportRequest request = DeleteReportRequest.newBuilder().setName(name).build(); + return deleteReportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteReportRequest request =
+   *       DeleteReportRequest.newBuilder()
+   *           .setName(
+   *               ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   migrationCenterClient.deleteReportAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteReportAsync( + DeleteReportRequest request) { + return deleteReportOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteReportRequest request =
+   *       DeleteReportRequest.newBuilder()
+   *           .setName(
+   *               ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       migrationCenterClient.deleteReportOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteReportOperationCallable() { + return stub.deleteReportOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Report. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   DeleteReportRequest request =
+   *       DeleteReportRequest.newBuilder()
+   *           .setName(
+   *               ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.deleteReportCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteReportCallable() { + return stub.deleteReportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : migrationCenterClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationCenterClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         migrationCenterClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = migrationCenterClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = migrationCenterClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListAssetsPagedResponse + extends AbstractPagedListResponse< + ListAssetsRequest, + ListAssetsResponse, + Asset, + ListAssetsPage, + ListAssetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListAssetsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListAssetsPagedResponse(ListAssetsPage page) { + super(page, ListAssetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAssetsPage + extends AbstractPage { + + private ListAssetsPage( + PageContext context, + ListAssetsResponse response) { + super(context, response); + } + + private static ListAssetsPage createEmptyPage() { + return new ListAssetsPage(null, null); + } + + @Override + protected ListAssetsPage createPage( + PageContext context, + ListAssetsResponse response) { + return new ListAssetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAssetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAssetsRequest, + ListAssetsResponse, + Asset, + ListAssetsPage, + ListAssetsFixedSizeCollection> { + + private ListAssetsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAssetsFixedSizeCollection createEmptyCollection() { + return new ListAssetsFixedSizeCollection(null, 0); + } + + @Override + protected ListAssetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAssetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListImportJobsPagedResponse + extends AbstractPagedListResponse< + ListImportJobsRequest, + ListImportJobsResponse, + ImportJob, + ListImportJobsPage, + ListImportJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListImportJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListImportJobsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListImportJobsPagedResponse(ListImportJobsPage page) { + super(page, ListImportJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListImportJobsPage + extends AbstractPage< + ListImportJobsRequest, ListImportJobsResponse, ImportJob, ListImportJobsPage> { + + private ListImportJobsPage( + PageContext context, + ListImportJobsResponse response) { + super(context, response); + } + + private static ListImportJobsPage createEmptyPage() { + return new ListImportJobsPage(null, null); + } + + @Override + protected ListImportJobsPage createPage( + PageContext context, + ListImportJobsResponse response) { + return new ListImportJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListImportJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListImportJobsRequest, + ListImportJobsResponse, + ImportJob, + ListImportJobsPage, + ListImportJobsFixedSizeCollection> { + + private ListImportJobsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListImportJobsFixedSizeCollection createEmptyCollection() { + return new ListImportJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListImportJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListImportJobsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListImportDataFilesPagedResponse + extends AbstractPagedListResponse< + ListImportDataFilesRequest, + ListImportDataFilesResponse, + ImportDataFile, + ListImportDataFilesPage, + ListImportDataFilesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListImportDataFilesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListImportDataFilesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListImportDataFilesPagedResponse(ListImportDataFilesPage page) { + super(page, ListImportDataFilesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListImportDataFilesPage + extends AbstractPage< + ListImportDataFilesRequest, + ListImportDataFilesResponse, + ImportDataFile, + ListImportDataFilesPage> { + + private ListImportDataFilesPage( + PageContext + context, + ListImportDataFilesResponse response) { + super(context, response); + } + + private static ListImportDataFilesPage createEmptyPage() { + return new ListImportDataFilesPage(null, null); + } + + @Override + protected ListImportDataFilesPage createPage( + PageContext + context, + ListImportDataFilesResponse response) { + return new ListImportDataFilesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListImportDataFilesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListImportDataFilesRequest, + ListImportDataFilesResponse, + ImportDataFile, + ListImportDataFilesPage, + ListImportDataFilesFixedSizeCollection> { + + private ListImportDataFilesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListImportDataFilesFixedSizeCollection createEmptyCollection() { + return new ListImportDataFilesFixedSizeCollection(null, 0); + } + + @Override + protected ListImportDataFilesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListImportDataFilesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListGroupsPagedResponse + extends AbstractPagedListResponse< + ListGroupsRequest, + ListGroupsResponse, + Group, + ListGroupsPage, + ListGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListGroupsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListGroupsPagedResponse(ListGroupsPage page) { + super(page, ListGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListGroupsPage + extends AbstractPage { + + private ListGroupsPage( + PageContext context, + ListGroupsResponse response) { + super(context, response); + } + + private static ListGroupsPage createEmptyPage() { + return new ListGroupsPage(null, null); + } + + @Override + protected ListGroupsPage createPage( + PageContext context, + ListGroupsResponse response) { + return new ListGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListGroupsRequest, + ListGroupsResponse, + Group, + ListGroupsPage, + ListGroupsFixedSizeCollection> { + + private ListGroupsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListGroupsFixedSizeCollection createEmptyCollection() { + return new ListGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListGroupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListErrorFramesPagedResponse + extends AbstractPagedListResponse< + ListErrorFramesRequest, + ListErrorFramesResponse, + ErrorFrame, + ListErrorFramesPage, + ListErrorFramesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListErrorFramesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListErrorFramesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListErrorFramesPagedResponse(ListErrorFramesPage page) { + super(page, ListErrorFramesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListErrorFramesPage + extends AbstractPage< + ListErrorFramesRequest, ListErrorFramesResponse, ErrorFrame, ListErrorFramesPage> { + + private ListErrorFramesPage( + PageContext context, + ListErrorFramesResponse response) { + super(context, response); + } + + private static ListErrorFramesPage createEmptyPage() { + return new ListErrorFramesPage(null, null); + } + + @Override + protected ListErrorFramesPage createPage( + PageContext context, + ListErrorFramesResponse response) { + return new ListErrorFramesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListErrorFramesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListErrorFramesRequest, + ListErrorFramesResponse, + ErrorFrame, + ListErrorFramesPage, + ListErrorFramesFixedSizeCollection> { + + private ListErrorFramesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListErrorFramesFixedSizeCollection createEmptyCollection() { + return new ListErrorFramesFixedSizeCollection(null, 0); + } + + @Override + protected ListErrorFramesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListErrorFramesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSourcesPagedResponse + extends AbstractPagedListResponse< + ListSourcesRequest, + ListSourcesResponse, + Source, + ListSourcesPage, + ListSourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListSourcesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListSourcesPagedResponse(ListSourcesPage page) { + super(page, ListSourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSourcesPage + extends AbstractPage { + + private ListSourcesPage( + PageContext context, + ListSourcesResponse response) { + super(context, response); + } + + private static ListSourcesPage createEmptyPage() { + return new ListSourcesPage(null, null); + } + + @Override + protected ListSourcesPage createPage( + PageContext context, + ListSourcesResponse response) { + return new ListSourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSourcesRequest, + ListSourcesResponse, + Source, + ListSourcesPage, + ListSourcesFixedSizeCollection> { + + private ListSourcesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSourcesFixedSizeCollection createEmptyCollection() { + return new ListSourcesFixedSizeCollection(null, 0); + } + + @Override + protected ListSourcesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSourcesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListPreferenceSetsPagedResponse + extends AbstractPagedListResponse< + ListPreferenceSetsRequest, + ListPreferenceSetsResponse, + PreferenceSet, + ListPreferenceSetsPage, + ListPreferenceSetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPreferenceSetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPreferenceSetsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPreferenceSetsPagedResponse(ListPreferenceSetsPage page) { + super(page, ListPreferenceSetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPreferenceSetsPage + extends AbstractPage< + ListPreferenceSetsRequest, + ListPreferenceSetsResponse, + PreferenceSet, + ListPreferenceSetsPage> { + + private ListPreferenceSetsPage( + PageContext context, + ListPreferenceSetsResponse response) { + super(context, response); + } + + private static ListPreferenceSetsPage createEmptyPage() { + return new ListPreferenceSetsPage(null, null); + } + + @Override + protected ListPreferenceSetsPage createPage( + PageContext context, + ListPreferenceSetsResponse response) { + return new ListPreferenceSetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPreferenceSetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPreferenceSetsRequest, + ListPreferenceSetsResponse, + PreferenceSet, + ListPreferenceSetsPage, + ListPreferenceSetsFixedSizeCollection> { + + private ListPreferenceSetsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPreferenceSetsFixedSizeCollection createEmptyCollection() { + return new ListPreferenceSetsFixedSizeCollection(null, 0); + } + + @Override + protected ListPreferenceSetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPreferenceSetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListReportConfigsPagedResponse + extends AbstractPagedListResponse< + ListReportConfigsRequest, + ListReportConfigsResponse, + ReportConfig, + ListReportConfigsPage, + ListReportConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListReportConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListReportConfigsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListReportConfigsPagedResponse(ListReportConfigsPage page) { + super(page, ListReportConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListReportConfigsPage + extends AbstractPage< + ListReportConfigsRequest, + ListReportConfigsResponse, + ReportConfig, + ListReportConfigsPage> { + + private ListReportConfigsPage( + PageContext context, + ListReportConfigsResponse response) { + super(context, response); + } + + private static ListReportConfigsPage createEmptyPage() { + return new ListReportConfigsPage(null, null); + } + + @Override + protected ListReportConfigsPage createPage( + PageContext context, + ListReportConfigsResponse response) { + return new ListReportConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListReportConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListReportConfigsRequest, + ListReportConfigsResponse, + ReportConfig, + ListReportConfigsPage, + ListReportConfigsFixedSizeCollection> { + + private ListReportConfigsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListReportConfigsFixedSizeCollection createEmptyCollection() { + return new ListReportConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListReportConfigsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListReportConfigsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListReportsPagedResponse + extends AbstractPagedListResponse< + ListReportsRequest, + ListReportsResponse, + Report, + ListReportsPage, + ListReportsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListReportsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListReportsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListReportsPagedResponse(ListReportsPage page) { + super(page, ListReportsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListReportsPage + extends AbstractPage { + + private ListReportsPage( + PageContext context, + ListReportsResponse response) { + super(context, response); + } + + private static ListReportsPage createEmptyPage() { + return new ListReportsPage(null, null); + } + + @Override + protected ListReportsPage createPage( + PageContext context, + ListReportsResponse response) { + return new ListReportsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListReportsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListReportsRequest, + ListReportsResponse, + Report, + ListReportsPage, + ListReportsFixedSizeCollection> { + + private ListReportsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListReportsFixedSizeCollection createEmptyCollection() { + return new ListReportsFixedSizeCollection(null, 0); + } + + @Override + protected ListReportsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListReportsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterSettings.java b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterSettings.java new file mode 100644 index 000000000000..60a39d0bab3a --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterSettings.java @@ -0,0 +1,1052 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListAssetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListErrorFramesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListGroupsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportDataFilesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportJobsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListLocationsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListPreferenceSetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportConfigsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListSourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.stub.MigrationCenterStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link MigrationCenterClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (migrationcenter.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getAsset to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MigrationCenterSettings.Builder migrationCenterSettingsBuilder =
+ *     MigrationCenterSettings.newBuilder();
+ * migrationCenterSettingsBuilder
+ *     .getAssetSettings()
+ *     .setRetrySettings(
+ *         migrationCenterSettingsBuilder
+ *             .getAssetSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * MigrationCenterSettings migrationCenterSettings = migrationCenterSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class MigrationCenterSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listAssets. */ + public PagedCallSettings + listAssetsSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).listAssetsSettings(); + } + + /** Returns the object with the settings used for calls to getAsset. */ + public UnaryCallSettings getAssetSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).getAssetSettings(); + } + + /** Returns the object with the settings used for calls to updateAsset. */ + public UnaryCallSettings updateAssetSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).updateAssetSettings(); + } + + /** Returns the object with the settings used for calls to batchUpdateAssets. */ + public UnaryCallSettings + batchUpdateAssetsSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).batchUpdateAssetsSettings(); + } + + /** Returns the object with the settings used for calls to deleteAsset. */ + public UnaryCallSettings deleteAssetSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteAssetSettings(); + } + + /** Returns the object with the settings used for calls to batchDeleteAssets. */ + public UnaryCallSettings batchDeleteAssetsSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).batchDeleteAssetsSettings(); + } + + /** Returns the object with the settings used for calls to reportAssetFrames. */ + public UnaryCallSettings + reportAssetFramesSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).reportAssetFramesSettings(); + } + + /** Returns the object with the settings used for calls to aggregateAssetsValues. */ + public UnaryCallSettings + aggregateAssetsValuesSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).aggregateAssetsValuesSettings(); + } + + /** Returns the object with the settings used for calls to createImportJob. */ + public UnaryCallSettings createImportJobSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createImportJobSettings(); + } + + /** Returns the object with the settings used for calls to createImportJob. */ + public OperationCallSettings + createImportJobOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createImportJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to listImportJobs. */ + public PagedCallSettings< + ListImportJobsRequest, ListImportJobsResponse, ListImportJobsPagedResponse> + listImportJobsSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).listImportJobsSettings(); + } + + /** Returns the object with the settings used for calls to getImportJob. */ + public UnaryCallSettings getImportJobSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).getImportJobSettings(); + } + + /** Returns the object with the settings used for calls to deleteImportJob. */ + public UnaryCallSettings deleteImportJobSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteImportJobSettings(); + } + + /** Returns the object with the settings used for calls to deleteImportJob. */ + public OperationCallSettings + deleteImportJobOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteImportJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateImportJob. */ + public UnaryCallSettings updateImportJobSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).updateImportJobSettings(); + } + + /** Returns the object with the settings used for calls to updateImportJob. */ + public OperationCallSettings + updateImportJobOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).updateImportJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to validateImportJob. */ + public UnaryCallSettings validateImportJobSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).validateImportJobSettings(); + } + + /** Returns the object with the settings used for calls to validateImportJob. */ + public OperationCallSettings + validateImportJobOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).validateImportJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to runImportJob. */ + public UnaryCallSettings runImportJobSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).runImportJobSettings(); + } + + /** Returns the object with the settings used for calls to runImportJob. */ + public OperationCallSettings + runImportJobOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).runImportJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to getImportDataFile. */ + public UnaryCallSettings getImportDataFileSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).getImportDataFileSettings(); + } + + /** Returns the object with the settings used for calls to listImportDataFiles. */ + public PagedCallSettings< + ListImportDataFilesRequest, ListImportDataFilesResponse, ListImportDataFilesPagedResponse> + listImportDataFilesSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).listImportDataFilesSettings(); + } + + /** Returns the object with the settings used for calls to createImportDataFile. */ + public UnaryCallSettings createImportDataFileSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createImportDataFileSettings(); + } + + /** Returns the object with the settings used for calls to createImportDataFile. */ + public OperationCallSettings + createImportDataFileOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()) + .createImportDataFileOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteImportDataFile. */ + public UnaryCallSettings deleteImportDataFileSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteImportDataFileSettings(); + } + + /** Returns the object with the settings used for calls to deleteImportDataFile. */ + public OperationCallSettings + deleteImportDataFileOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()) + .deleteImportDataFileOperationSettings(); + } + + /** Returns the object with the settings used for calls to listGroups. */ + public PagedCallSettings + listGroupsSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).listGroupsSettings(); + } + + /** Returns the object with the settings used for calls to getGroup. */ + public UnaryCallSettings getGroupSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).getGroupSettings(); + } + + /** Returns the object with the settings used for calls to createGroup. */ + public UnaryCallSettings createGroupSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createGroupSettings(); + } + + /** Returns the object with the settings used for calls to createGroup. */ + public OperationCallSettings + createGroupOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateGroup. */ + public UnaryCallSettings updateGroupSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).updateGroupSettings(); + } + + /** Returns the object with the settings used for calls to updateGroup. */ + public OperationCallSettings + updateGroupOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).updateGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteGroup. */ + public UnaryCallSettings deleteGroupSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteGroupSettings(); + } + + /** Returns the object with the settings used for calls to deleteGroup. */ + public OperationCallSettings + deleteGroupOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to addAssetsToGroup. */ + public UnaryCallSettings addAssetsToGroupSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).addAssetsToGroupSettings(); + } + + /** Returns the object with the settings used for calls to addAssetsToGroup. */ + public OperationCallSettings + addAssetsToGroupOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).addAssetsToGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to removeAssetsFromGroup. */ + public UnaryCallSettings + removeAssetsFromGroupSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).removeAssetsFromGroupSettings(); + } + + /** Returns the object with the settings used for calls to removeAssetsFromGroup. */ + public OperationCallSettings + removeAssetsFromGroupOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()) + .removeAssetsFromGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to listErrorFrames. */ + public PagedCallSettings< + ListErrorFramesRequest, ListErrorFramesResponse, ListErrorFramesPagedResponse> + listErrorFramesSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).listErrorFramesSettings(); + } + + /** Returns the object with the settings used for calls to getErrorFrame. */ + public UnaryCallSettings getErrorFrameSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).getErrorFrameSettings(); + } + + /** Returns the object with the settings used for calls to listSources. */ + public PagedCallSettings + listSourcesSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).listSourcesSettings(); + } + + /** Returns the object with the settings used for calls to getSource. */ + public UnaryCallSettings getSourceSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).getSourceSettings(); + } + + /** Returns the object with the settings used for calls to createSource. */ + public UnaryCallSettings createSourceSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createSourceSettings(); + } + + /** Returns the object with the settings used for calls to createSource. */ + public OperationCallSettings + createSourceOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createSourceOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateSource. */ + public UnaryCallSettings updateSourceSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).updateSourceSettings(); + } + + /** Returns the object with the settings used for calls to updateSource. */ + public OperationCallSettings + updateSourceOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).updateSourceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteSource. */ + public UnaryCallSettings deleteSourceSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteSourceSettings(); + } + + /** Returns the object with the settings used for calls to deleteSource. */ + public OperationCallSettings + deleteSourceOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteSourceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listPreferenceSets. */ + public PagedCallSettings< + ListPreferenceSetsRequest, ListPreferenceSetsResponse, ListPreferenceSetsPagedResponse> + listPreferenceSetsSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).listPreferenceSetsSettings(); + } + + /** Returns the object with the settings used for calls to getPreferenceSet. */ + public UnaryCallSettings getPreferenceSetSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).getPreferenceSetSettings(); + } + + /** Returns the object with the settings used for calls to createPreferenceSet. */ + public UnaryCallSettings createPreferenceSetSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createPreferenceSetSettings(); + } + + /** Returns the object with the settings used for calls to createPreferenceSet. */ + public OperationCallSettings + createPreferenceSetOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createPreferenceSetOperationSettings(); + } + + /** Returns the object with the settings used for calls to updatePreferenceSet. */ + public UnaryCallSettings updatePreferenceSetSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).updatePreferenceSetSettings(); + } + + /** Returns the object with the settings used for calls to updatePreferenceSet. */ + public OperationCallSettings + updatePreferenceSetOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).updatePreferenceSetOperationSettings(); + } + + /** Returns the object with the settings used for calls to deletePreferenceSet. */ + public UnaryCallSettings deletePreferenceSetSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deletePreferenceSetSettings(); + } + + /** Returns the object with the settings used for calls to deletePreferenceSet. */ + public OperationCallSettings + deletePreferenceSetOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deletePreferenceSetOperationSettings(); + } + + /** Returns the object with the settings used for calls to getSettings. */ + public UnaryCallSettings getSettingsSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).getSettingsSettings(); + } + + /** Returns the object with the settings used for calls to updateSettings. */ + public UnaryCallSettings updateSettingsSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).updateSettingsSettings(); + } + + /** Returns the object with the settings used for calls to updateSettings. */ + public OperationCallSettings + updateSettingsOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).updateSettingsOperationSettings(); + } + + /** Returns the object with the settings used for calls to createReportConfig. */ + public UnaryCallSettings createReportConfigSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createReportConfigSettings(); + } + + /** Returns the object with the settings used for calls to createReportConfig. */ + public OperationCallSettings + createReportConfigOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createReportConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to getReportConfig. */ + public UnaryCallSettings getReportConfigSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).getReportConfigSettings(); + } + + /** Returns the object with the settings used for calls to listReportConfigs. */ + public PagedCallSettings< + ListReportConfigsRequest, ListReportConfigsResponse, ListReportConfigsPagedResponse> + listReportConfigsSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).listReportConfigsSettings(); + } + + /** Returns the object with the settings used for calls to deleteReportConfig. */ + public UnaryCallSettings deleteReportConfigSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteReportConfigSettings(); + } + + /** Returns the object with the settings used for calls to deleteReportConfig. */ + public OperationCallSettings + deleteReportConfigOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteReportConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to createReport. */ + public UnaryCallSettings createReportSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createReportSettings(); + } + + /** Returns the object with the settings used for calls to createReport. */ + public OperationCallSettings + createReportOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).createReportOperationSettings(); + } + + /** Returns the object with the settings used for calls to getReport. */ + public UnaryCallSettings getReportSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).getReportSettings(); + } + + /** Returns the object with the settings used for calls to listReports. */ + public PagedCallSettings + listReportsSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).listReportsSettings(); + } + + /** Returns the object with the settings used for calls to deleteReport. */ + public UnaryCallSettings deleteReportSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteReportSettings(); + } + + /** Returns the object with the settings used for calls to deleteReport. */ + public OperationCallSettings + deleteReportOperationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).deleteReportOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((MigrationCenterStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final MigrationCenterSettings create(MigrationCenterStubSettings stub) + throws IOException { + return new MigrationCenterSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return MigrationCenterStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return MigrationCenterStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return MigrationCenterStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return MigrationCenterStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return MigrationCenterStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return MigrationCenterStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return MigrationCenterStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return MigrationCenterStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected MigrationCenterSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for MigrationCenterSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(MigrationCenterStubSettings.newBuilder(clientContext)); + } + + protected Builder(MigrationCenterSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(MigrationCenterStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(MigrationCenterStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(MigrationCenterStubSettings.newHttpJsonBuilder()); + } + + public MigrationCenterStubSettings.Builder getStubSettingsBuilder() { + return ((MigrationCenterStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listAssets. */ + public PagedCallSettings.Builder + listAssetsSettings() { + return getStubSettingsBuilder().listAssetsSettings(); + } + + /** Returns the builder for the settings used for calls to getAsset. */ + public UnaryCallSettings.Builder getAssetSettings() { + return getStubSettingsBuilder().getAssetSettings(); + } + + /** Returns the builder for the settings used for calls to updateAsset. */ + public UnaryCallSettings.Builder updateAssetSettings() { + return getStubSettingsBuilder().updateAssetSettings(); + } + + /** Returns the builder for the settings used for calls to batchUpdateAssets. */ + public UnaryCallSettings.Builder + batchUpdateAssetsSettings() { + return getStubSettingsBuilder().batchUpdateAssetsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAsset. */ + public UnaryCallSettings.Builder deleteAssetSettings() { + return getStubSettingsBuilder().deleteAssetSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeleteAssets. */ + public UnaryCallSettings.Builder batchDeleteAssetsSettings() { + return getStubSettingsBuilder().batchDeleteAssetsSettings(); + } + + /** Returns the builder for the settings used for calls to reportAssetFrames. */ + public UnaryCallSettings.Builder + reportAssetFramesSettings() { + return getStubSettingsBuilder().reportAssetFramesSettings(); + } + + /** Returns the builder for the settings used for calls to aggregateAssetsValues. */ + public UnaryCallSettings.Builder + aggregateAssetsValuesSettings() { + return getStubSettingsBuilder().aggregateAssetsValuesSettings(); + } + + /** Returns the builder for the settings used for calls to createImportJob. */ + public UnaryCallSettings.Builder createImportJobSettings() { + return getStubSettingsBuilder().createImportJobSettings(); + } + + /** Returns the builder for the settings used for calls to createImportJob. */ + public OperationCallSettings.Builder + createImportJobOperationSettings() { + return getStubSettingsBuilder().createImportJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listImportJobs. */ + public PagedCallSettings.Builder< + ListImportJobsRequest, ListImportJobsResponse, ListImportJobsPagedResponse> + listImportJobsSettings() { + return getStubSettingsBuilder().listImportJobsSettings(); + } + + /** Returns the builder for the settings used for calls to getImportJob. */ + public UnaryCallSettings.Builder getImportJobSettings() { + return getStubSettingsBuilder().getImportJobSettings(); + } + + /** Returns the builder for the settings used for calls to deleteImportJob. */ + public UnaryCallSettings.Builder deleteImportJobSettings() { + return getStubSettingsBuilder().deleteImportJobSettings(); + } + + /** Returns the builder for the settings used for calls to deleteImportJob. */ + public OperationCallSettings.Builder + deleteImportJobOperationSettings() { + return getStubSettingsBuilder().deleteImportJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateImportJob. */ + public UnaryCallSettings.Builder updateImportJobSettings() { + return getStubSettingsBuilder().updateImportJobSettings(); + } + + /** Returns the builder for the settings used for calls to updateImportJob. */ + public OperationCallSettings.Builder + updateImportJobOperationSettings() { + return getStubSettingsBuilder().updateImportJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to validateImportJob. */ + public UnaryCallSettings.Builder + validateImportJobSettings() { + return getStubSettingsBuilder().validateImportJobSettings(); + } + + /** Returns the builder for the settings used for calls to validateImportJob. */ + public OperationCallSettings.Builder + validateImportJobOperationSettings() { + return getStubSettingsBuilder().validateImportJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to runImportJob. */ + public UnaryCallSettings.Builder runImportJobSettings() { + return getStubSettingsBuilder().runImportJobSettings(); + } + + /** Returns the builder for the settings used for calls to runImportJob. */ + public OperationCallSettings.Builder + runImportJobOperationSettings() { + return getStubSettingsBuilder().runImportJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getImportDataFile. */ + public UnaryCallSettings.Builder + getImportDataFileSettings() { + return getStubSettingsBuilder().getImportDataFileSettings(); + } + + /** Returns the builder for the settings used for calls to listImportDataFiles. */ + public PagedCallSettings.Builder< + ListImportDataFilesRequest, + ListImportDataFilesResponse, + ListImportDataFilesPagedResponse> + listImportDataFilesSettings() { + return getStubSettingsBuilder().listImportDataFilesSettings(); + } + + /** Returns the builder for the settings used for calls to createImportDataFile. */ + public UnaryCallSettings.Builder + createImportDataFileSettings() { + return getStubSettingsBuilder().createImportDataFileSettings(); + } + + /** Returns the builder for the settings used for calls to createImportDataFile. */ + public OperationCallSettings.Builder< + CreateImportDataFileRequest, ImportDataFile, OperationMetadata> + createImportDataFileOperationSettings() { + return getStubSettingsBuilder().createImportDataFileOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteImportDataFile. */ + public UnaryCallSettings.Builder + deleteImportDataFileSettings() { + return getStubSettingsBuilder().deleteImportDataFileSettings(); + } + + /** Returns the builder for the settings used for calls to deleteImportDataFile. */ + public OperationCallSettings.Builder + deleteImportDataFileOperationSettings() { + return getStubSettingsBuilder().deleteImportDataFileOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listGroups. */ + public PagedCallSettings.Builder + listGroupsSettings() { + return getStubSettingsBuilder().listGroupsSettings(); + } + + /** Returns the builder for the settings used for calls to getGroup. */ + public UnaryCallSettings.Builder getGroupSettings() { + return getStubSettingsBuilder().getGroupSettings(); + } + + /** Returns the builder for the settings used for calls to createGroup. */ + public UnaryCallSettings.Builder createGroupSettings() { + return getStubSettingsBuilder().createGroupSettings(); + } + + /** Returns the builder for the settings used for calls to createGroup. */ + public OperationCallSettings.Builder + createGroupOperationSettings() { + return getStubSettingsBuilder().createGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateGroup. */ + public UnaryCallSettings.Builder updateGroupSettings() { + return getStubSettingsBuilder().updateGroupSettings(); + } + + /** Returns the builder for the settings used for calls to updateGroup. */ + public OperationCallSettings.Builder + updateGroupOperationSettings() { + return getStubSettingsBuilder().updateGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteGroup. */ + public UnaryCallSettings.Builder deleteGroupSettings() { + return getStubSettingsBuilder().deleteGroupSettings(); + } + + /** Returns the builder for the settings used for calls to deleteGroup. */ + public OperationCallSettings.Builder + deleteGroupOperationSettings() { + return getStubSettingsBuilder().deleteGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to addAssetsToGroup. */ + public UnaryCallSettings.Builder + addAssetsToGroupSettings() { + return getStubSettingsBuilder().addAssetsToGroupSettings(); + } + + /** Returns the builder for the settings used for calls to addAssetsToGroup. */ + public OperationCallSettings.Builder + addAssetsToGroupOperationSettings() { + return getStubSettingsBuilder().addAssetsToGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to removeAssetsFromGroup. */ + public UnaryCallSettings.Builder + removeAssetsFromGroupSettings() { + return getStubSettingsBuilder().removeAssetsFromGroupSettings(); + } + + /** Returns the builder for the settings used for calls to removeAssetsFromGroup. */ + public OperationCallSettings.Builder + removeAssetsFromGroupOperationSettings() { + return getStubSettingsBuilder().removeAssetsFromGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listErrorFrames. */ + public PagedCallSettings.Builder< + ListErrorFramesRequest, ListErrorFramesResponse, ListErrorFramesPagedResponse> + listErrorFramesSettings() { + return getStubSettingsBuilder().listErrorFramesSettings(); + } + + /** Returns the builder for the settings used for calls to getErrorFrame. */ + public UnaryCallSettings.Builder getErrorFrameSettings() { + return getStubSettingsBuilder().getErrorFrameSettings(); + } + + /** Returns the builder for the settings used for calls to listSources. */ + public PagedCallSettings.Builder< + ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> + listSourcesSettings() { + return getStubSettingsBuilder().listSourcesSettings(); + } + + /** Returns the builder for the settings used for calls to getSource. */ + public UnaryCallSettings.Builder getSourceSettings() { + return getStubSettingsBuilder().getSourceSettings(); + } + + /** Returns the builder for the settings used for calls to createSource. */ + public UnaryCallSettings.Builder createSourceSettings() { + return getStubSettingsBuilder().createSourceSettings(); + } + + /** Returns the builder for the settings used for calls to createSource. */ + public OperationCallSettings.Builder + createSourceOperationSettings() { + return getStubSettingsBuilder().createSourceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateSource. */ + public UnaryCallSettings.Builder updateSourceSettings() { + return getStubSettingsBuilder().updateSourceSettings(); + } + + /** Returns the builder for the settings used for calls to updateSource. */ + public OperationCallSettings.Builder + updateSourceOperationSettings() { + return getStubSettingsBuilder().updateSourceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSource. */ + public UnaryCallSettings.Builder deleteSourceSettings() { + return getStubSettingsBuilder().deleteSourceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSource. */ + public OperationCallSettings.Builder + deleteSourceOperationSettings() { + return getStubSettingsBuilder().deleteSourceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listPreferenceSets. */ + public PagedCallSettings.Builder< + ListPreferenceSetsRequest, ListPreferenceSetsResponse, ListPreferenceSetsPagedResponse> + listPreferenceSetsSettings() { + return getStubSettingsBuilder().listPreferenceSetsSettings(); + } + + /** Returns the builder for the settings used for calls to getPreferenceSet. */ + public UnaryCallSettings.Builder + getPreferenceSetSettings() { + return getStubSettingsBuilder().getPreferenceSetSettings(); + } + + /** Returns the builder for the settings used for calls to createPreferenceSet. */ + public UnaryCallSettings.Builder + createPreferenceSetSettings() { + return getStubSettingsBuilder().createPreferenceSetSettings(); + } + + /** Returns the builder for the settings used for calls to createPreferenceSet. */ + public OperationCallSettings.Builder< + CreatePreferenceSetRequest, PreferenceSet, OperationMetadata> + createPreferenceSetOperationSettings() { + return getStubSettingsBuilder().createPreferenceSetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updatePreferenceSet. */ + public UnaryCallSettings.Builder + updatePreferenceSetSettings() { + return getStubSettingsBuilder().updatePreferenceSetSettings(); + } + + /** Returns the builder for the settings used for calls to updatePreferenceSet. */ + public OperationCallSettings.Builder< + UpdatePreferenceSetRequest, PreferenceSet, OperationMetadata> + updatePreferenceSetOperationSettings() { + return getStubSettingsBuilder().updatePreferenceSetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deletePreferenceSet. */ + public UnaryCallSettings.Builder + deletePreferenceSetSettings() { + return getStubSettingsBuilder().deletePreferenceSetSettings(); + } + + /** Returns the builder for the settings used for calls to deletePreferenceSet. */ + public OperationCallSettings.Builder + deletePreferenceSetOperationSettings() { + return getStubSettingsBuilder().deletePreferenceSetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getSettings. */ + public UnaryCallSettings.Builder getSettingsSettings() { + return getStubSettingsBuilder().getSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to updateSettings. */ + public UnaryCallSettings.Builder updateSettingsSettings() { + return getStubSettingsBuilder().updateSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to updateSettings. */ + public OperationCallSettings.Builder + updateSettingsOperationSettings() { + return getStubSettingsBuilder().updateSettingsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createReportConfig. */ + public UnaryCallSettings.Builder + createReportConfigSettings() { + return getStubSettingsBuilder().createReportConfigSettings(); + } + + /** Returns the builder for the settings used for calls to createReportConfig. */ + public OperationCallSettings.Builder + createReportConfigOperationSettings() { + return getStubSettingsBuilder().createReportConfigOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getReportConfig. */ + public UnaryCallSettings.Builder + getReportConfigSettings() { + return getStubSettingsBuilder().getReportConfigSettings(); + } + + /** Returns the builder for the settings used for calls to listReportConfigs. */ + public PagedCallSettings.Builder< + ListReportConfigsRequest, ListReportConfigsResponse, ListReportConfigsPagedResponse> + listReportConfigsSettings() { + return getStubSettingsBuilder().listReportConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteReportConfig. */ + public UnaryCallSettings.Builder + deleteReportConfigSettings() { + return getStubSettingsBuilder().deleteReportConfigSettings(); + } + + /** Returns the builder for the settings used for calls to deleteReportConfig. */ + public OperationCallSettings.Builder + deleteReportConfigOperationSettings() { + return getStubSettingsBuilder().deleteReportConfigOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createReport. */ + public UnaryCallSettings.Builder createReportSettings() { + return getStubSettingsBuilder().createReportSettings(); + } + + /** Returns the builder for the settings used for calls to createReport. */ + public OperationCallSettings.Builder + createReportOperationSettings() { + return getStubSettingsBuilder().createReportOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getReport. */ + public UnaryCallSettings.Builder getReportSettings() { + return getStubSettingsBuilder().getReportSettings(); + } + + /** Returns the builder for the settings used for calls to listReports. */ + public PagedCallSettings.Builder< + ListReportsRequest, ListReportsResponse, ListReportsPagedResponse> + listReportsSettings() { + return getStubSettingsBuilder().listReportsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteReport. */ + public UnaryCallSettings.Builder deleteReportSettings() { + return getStubSettingsBuilder().deleteReportSettings(); + } + + /** Returns the builder for the settings used for calls to deleteReport. */ + public OperationCallSettings.Builder + deleteReportOperationSettings() { + return getStubSettingsBuilder().deleteReportOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public MigrationCenterSettings build() throws IOException { + return new MigrationCenterSettings(this); + } + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/gapic_metadata.json b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/gapic_metadata.json new file mode 100644 index 000000000000..492430acb785 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/gapic_metadata.json @@ -0,0 +1,168 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.migrationcenter.v1", + "libraryPackage": "com.google.cloud.migrationcenter.v1", + "services": { + "MigrationCenter": { + "clients": { + "grpc": { + "libraryClient": "MigrationCenterClient", + "rpcs": { + "AddAssetsToGroup": { + "methods": ["addAssetsToGroupAsync", "addAssetsToGroupAsync", "addAssetsToGroupAsync", "addAssetsToGroupOperationCallable", "addAssetsToGroupCallable"] + }, + "AggregateAssetsValues": { + "methods": ["aggregateAssetsValues", "aggregateAssetsValuesCallable"] + }, + "BatchDeleteAssets": { + "methods": ["batchDeleteAssets", "batchDeleteAssets", "batchDeleteAssets", "batchDeleteAssetsCallable"] + }, + "BatchUpdateAssets": { + "methods": ["batchUpdateAssets", "batchUpdateAssets", "batchUpdateAssets", "batchUpdateAssetsCallable"] + }, + "CreateGroup": { + "methods": ["createGroupAsync", "createGroupAsync", "createGroupAsync", "createGroupOperationCallable", "createGroupCallable"] + }, + "CreateImportDataFile": { + "methods": ["createImportDataFileAsync", "createImportDataFileAsync", "createImportDataFileAsync", "createImportDataFileOperationCallable", "createImportDataFileCallable"] + }, + "CreateImportJob": { + "methods": ["createImportJobAsync", "createImportJobAsync", "createImportJobAsync", "createImportJobOperationCallable", "createImportJobCallable"] + }, + "CreatePreferenceSet": { + "methods": ["createPreferenceSetAsync", "createPreferenceSetAsync", "createPreferenceSetAsync", "createPreferenceSetOperationCallable", "createPreferenceSetCallable"] + }, + "CreateReport": { + "methods": ["createReportAsync", "createReportAsync", "createReportAsync", "createReportOperationCallable", "createReportCallable"] + }, + "CreateReportConfig": { + "methods": ["createReportConfigAsync", "createReportConfigAsync", "createReportConfigAsync", "createReportConfigOperationCallable", "createReportConfigCallable"] + }, + "CreateSource": { + "methods": ["createSourceAsync", "createSourceAsync", "createSourceAsync", "createSourceOperationCallable", "createSourceCallable"] + }, + "DeleteAsset": { + "methods": ["deleteAsset", "deleteAsset", "deleteAsset", "deleteAssetCallable"] + }, + "DeleteGroup": { + "methods": ["deleteGroupAsync", "deleteGroupAsync", "deleteGroupAsync", "deleteGroupOperationCallable", "deleteGroupCallable"] + }, + "DeleteImportDataFile": { + "methods": ["deleteImportDataFileAsync", "deleteImportDataFileAsync", "deleteImportDataFileAsync", "deleteImportDataFileOperationCallable", "deleteImportDataFileCallable"] + }, + "DeleteImportJob": { + "methods": ["deleteImportJobAsync", "deleteImportJobAsync", "deleteImportJobAsync", "deleteImportJobOperationCallable", "deleteImportJobCallable"] + }, + "DeletePreferenceSet": { + "methods": ["deletePreferenceSetAsync", "deletePreferenceSetAsync", "deletePreferenceSetAsync", "deletePreferenceSetOperationCallable", "deletePreferenceSetCallable"] + }, + "DeleteReport": { + "methods": ["deleteReportAsync", "deleteReportAsync", "deleteReportAsync", "deleteReportOperationCallable", "deleteReportCallable"] + }, + "DeleteReportConfig": { + "methods": ["deleteReportConfigAsync", "deleteReportConfigAsync", "deleteReportConfigAsync", "deleteReportConfigOperationCallable", "deleteReportConfigCallable"] + }, + "DeleteSource": { + "methods": ["deleteSourceAsync", "deleteSourceAsync", "deleteSourceAsync", "deleteSourceOperationCallable", "deleteSourceCallable"] + }, + "GetAsset": { + "methods": ["getAsset", "getAsset", "getAsset", "getAssetCallable"] + }, + "GetErrorFrame": { + "methods": ["getErrorFrame", "getErrorFrame", "getErrorFrame", "getErrorFrameCallable"] + }, + "GetGroup": { + "methods": ["getGroup", "getGroup", "getGroup", "getGroupCallable"] + }, + "GetImportDataFile": { + "methods": ["getImportDataFile", "getImportDataFile", "getImportDataFile", "getImportDataFileCallable"] + }, + "GetImportJob": { + "methods": ["getImportJob", "getImportJob", "getImportJob", "getImportJobCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetPreferenceSet": { + "methods": ["getPreferenceSet", "getPreferenceSet", "getPreferenceSet", "getPreferenceSetCallable"] + }, + "GetReport": { + "methods": ["getReport", "getReport", "getReport", "getReportCallable"] + }, + "GetReportConfig": { + "methods": ["getReportConfig", "getReportConfig", "getReportConfig", "getReportConfigCallable"] + }, + "GetSettings": { + "methods": ["getSettings", "getSettings", "getSettings", "getSettingsCallable"] + }, + "GetSource": { + "methods": ["getSource", "getSource", "getSource", "getSourceCallable"] + }, + "ListAssets": { + "methods": ["listAssets", "listAssets", "listAssets", "listAssetsPagedCallable", "listAssetsCallable"] + }, + "ListErrorFrames": { + "methods": ["listErrorFrames", "listErrorFrames", "listErrorFrames", "listErrorFramesPagedCallable", "listErrorFramesCallable"] + }, + "ListGroups": { + "methods": ["listGroups", "listGroups", "listGroups", "listGroupsPagedCallable", "listGroupsCallable"] + }, + "ListImportDataFiles": { + "methods": ["listImportDataFiles", "listImportDataFiles", "listImportDataFiles", "listImportDataFilesPagedCallable", "listImportDataFilesCallable"] + }, + "ListImportJobs": { + "methods": ["listImportJobs", "listImportJobs", "listImportJobs", "listImportJobsPagedCallable", "listImportJobsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListPreferenceSets": { + "methods": ["listPreferenceSets", "listPreferenceSets", "listPreferenceSets", "listPreferenceSetsPagedCallable", "listPreferenceSetsCallable"] + }, + "ListReportConfigs": { + "methods": ["listReportConfigs", "listReportConfigs", "listReportConfigs", "listReportConfigsPagedCallable", "listReportConfigsCallable"] + }, + "ListReports": { + "methods": ["listReports", "listReports", "listReports", "listReportsPagedCallable", "listReportsCallable"] + }, + "ListSources": { + "methods": ["listSources", "listSources", "listSources", "listSourcesPagedCallable", "listSourcesCallable"] + }, + "RemoveAssetsFromGroup": { + "methods": ["removeAssetsFromGroupAsync", "removeAssetsFromGroupAsync", "removeAssetsFromGroupAsync", "removeAssetsFromGroupOperationCallable", "removeAssetsFromGroupCallable"] + }, + "ReportAssetFrames": { + "methods": ["reportAssetFrames", "reportAssetFramesCallable"] + }, + "RunImportJob": { + "methods": ["runImportJobAsync", "runImportJobAsync", "runImportJobAsync", "runImportJobOperationCallable", "runImportJobCallable"] + }, + "UpdateAsset": { + "methods": ["updateAsset", "updateAsset", "updateAssetCallable"] + }, + "UpdateGroup": { + "methods": ["updateGroupAsync", "updateGroupAsync", "updateGroupOperationCallable", "updateGroupCallable"] + }, + "UpdateImportJob": { + "methods": ["updateImportJobAsync", "updateImportJobAsync", "updateImportJobOperationCallable", "updateImportJobCallable"] + }, + "UpdatePreferenceSet": { + "methods": ["updatePreferenceSetAsync", "updatePreferenceSetAsync", "updatePreferenceSetOperationCallable", "updatePreferenceSetCallable"] + }, + "UpdateSettings": { + "methods": ["updateSettingsAsync", "updateSettingsAsync", "updateSettingsOperationCallable", "updateSettingsCallable"] + }, + "UpdateSource": { + "methods": ["updateSourceAsync", "updateSourceAsync", "updateSourceOperationCallable", "updateSourceCallable"] + }, + "ValidateImportJob": { + "methods": ["validateImportJobAsync", "validateImportJobAsync", "validateImportJobAsync", "validateImportJobOperationCallable", "validateImportJobCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/package-info.java b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/package-info.java new file mode 100644 index 000000000000..28444f2c3d18 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/package-info.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Migration Center API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= MigrationCenterClient ======================= + * + *

Service Description: Service describing handlers for resources. + * + *

Sample for MigrationCenterClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ *   AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
+ *   Asset response = migrationCenterClient.getAsset(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.migrationcenter.v1; + +import javax.annotation.Generated; diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/GrpcMigrationCenterCallableFactory.java b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/GrpcMigrationCenterCallableFactory.java new file mode 100644 index 000000000000..7e7548c7eb5b --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/GrpcMigrationCenterCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the MigrationCenter service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcMigrationCenterCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/GrpcMigrationCenterStub.java b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/GrpcMigrationCenterStub.java new file mode 100644 index 000000000000..73ba79be1779 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/GrpcMigrationCenterStub.java @@ -0,0 +1,2156 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.stub; + +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListAssetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListErrorFramesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListGroupsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportDataFilesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportJobsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListLocationsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListPreferenceSetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportConfigsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListSourcesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest; +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest; +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse; +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest; +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest; +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse; +import com.google.cloud.migrationcenter.v1.CreateGroupRequest; +import com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.CreateImportJobRequest; +import com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.CreateReportConfigRequest; +import com.google.cloud.migrationcenter.v1.CreateReportRequest; +import com.google.cloud.migrationcenter.v1.CreateSourceRequest; +import com.google.cloud.migrationcenter.v1.DeleteAssetRequest; +import com.google.cloud.migrationcenter.v1.DeleteGroupRequest; +import com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.DeleteImportJobRequest; +import com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest; +import com.google.cloud.migrationcenter.v1.DeleteReportRequest; +import com.google.cloud.migrationcenter.v1.DeleteSourceRequest; +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.GetAssetRequest; +import com.google.cloud.migrationcenter.v1.GetErrorFrameRequest; +import com.google.cloud.migrationcenter.v1.GetGroupRequest; +import com.google.cloud.migrationcenter.v1.GetImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.GetImportJobRequest; +import com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.GetReportConfigRequest; +import com.google.cloud.migrationcenter.v1.GetReportRequest; +import com.google.cloud.migrationcenter.v1.GetSettingsRequest; +import com.google.cloud.migrationcenter.v1.GetSourceRequest; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.ListAssetsRequest; +import com.google.cloud.migrationcenter.v1.ListAssetsResponse; +import com.google.cloud.migrationcenter.v1.ListErrorFramesRequest; +import com.google.cloud.migrationcenter.v1.ListErrorFramesResponse; +import com.google.cloud.migrationcenter.v1.ListGroupsRequest; +import com.google.cloud.migrationcenter.v1.ListGroupsResponse; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse; +import com.google.cloud.migrationcenter.v1.ListImportJobsRequest; +import com.google.cloud.migrationcenter.v1.ListImportJobsResponse; +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest; +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse; +import com.google.cloud.migrationcenter.v1.ListReportConfigsRequest; +import com.google.cloud.migrationcenter.v1.ListReportConfigsResponse; +import com.google.cloud.migrationcenter.v1.ListReportsRequest; +import com.google.cloud.migrationcenter.v1.ListReportsResponse; +import com.google.cloud.migrationcenter.v1.ListSourcesRequest; +import com.google.cloud.migrationcenter.v1.ListSourcesResponse; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse; +import com.google.cloud.migrationcenter.v1.ReportConfig; +import com.google.cloud.migrationcenter.v1.RunImportJobRequest; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.cloud.migrationcenter.v1.UpdateAssetRequest; +import com.google.cloud.migrationcenter.v1.UpdateGroupRequest; +import com.google.cloud.migrationcenter.v1.UpdateImportJobRequest; +import com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.UpdateSettingsRequest; +import com.google.cloud.migrationcenter.v1.UpdateSourceRequest; +import com.google.cloud.migrationcenter.v1.ValidateImportJobRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the MigrationCenter service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcMigrationCenterStub extends MigrationCenterStub { + private static final MethodDescriptor + listAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListAssets") + .setRequestMarshaller(ProtoUtils.marshaller(ListAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListAssetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetAsset") + .setRequestMarshaller(ProtoUtils.marshaller(GetAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Asset.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateAsset") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Asset.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchUpdateAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/BatchUpdateAssets") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchUpdateAssetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchUpdateAssetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteAsset") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchDeleteAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/BatchDeleteAssets") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchDeleteAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + reportAssetFramesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/ReportAssetFrames") + .setRequestMarshaller( + ProtoUtils.marshaller(ReportAssetFramesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ReportAssetFramesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + aggregateAssetsValuesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/AggregateAssetsValues") + .setRequestMarshaller( + ProtoUtils.marshaller(AggregateAssetsValuesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AggregateAssetsValuesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createImportJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateImportJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateImportJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listImportJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListImportJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListImportJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListImportJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getImportJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetImportJob") + .setRequestMarshaller(ProtoUtils.marshaller(GetImportJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ImportJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteImportJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteImportJob") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteImportJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateImportJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateImportJob") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateImportJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + validateImportJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/ValidateImportJob") + .setRequestMarshaller( + ProtoUtils.marshaller(ValidateImportJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + runImportJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/RunImportJob") + .setRequestMarshaller(ProtoUtils.marshaller(RunImportJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getImportDataFileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/GetImportDataFile") + .setRequestMarshaller( + ProtoUtils.marshaller(GetImportDataFileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ImportDataFile.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listImportDataFilesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/ListImportDataFiles") + .setRequestMarshaller( + ProtoUtils.marshaller(ListImportDataFilesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListImportDataFilesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createImportDataFileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/CreateImportDataFile") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateImportDataFileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteImportDataFileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/DeleteImportDataFile") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteImportDataFileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listGroupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListGroups") + .setRequestMarshaller(ProtoUtils.marshaller(ListGroupsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListGroupsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetGroup") + .setRequestMarshaller(ProtoUtils.marshaller(GetGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Group.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateGroup") + .setRequestMarshaller(ProtoUtils.marshaller(CreateGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateGroup") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteGroup") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + addAssetsToGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/AddAssetsToGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(AddAssetsToGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeAssetsFromGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/RemoveAssetsFromGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveAssetsFromGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listErrorFramesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListErrorFrames") + .setRequestMarshaller( + ProtoUtils.marshaller(ListErrorFramesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListErrorFramesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getErrorFrameMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetErrorFrame") + .setRequestMarshaller( + ProtoUtils.marshaller(GetErrorFrameRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ErrorFrame.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSourcesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListSources") + .setRequestMarshaller(ProtoUtils.marshaller(ListSourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSourcesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getSourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetSource") + .setRequestMarshaller(ProtoUtils.marshaller(GetSourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Source.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createSourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateSource") + .setRequestMarshaller(ProtoUtils.marshaller(CreateSourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateSourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateSource") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateSourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteSourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteSource") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteSourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listPreferenceSetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/ListPreferenceSets") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPreferenceSetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPreferenceSetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getPreferenceSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetPreferenceSet") + .setRequestMarshaller( + ProtoUtils.marshaller(GetPreferenceSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PreferenceSet.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createPreferenceSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/CreatePreferenceSet") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePreferenceSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updatePreferenceSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/UpdatePreferenceSet") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdatePreferenceSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deletePreferenceSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/DeletePreferenceSet") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePreferenceSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetSettings") + .setRequestMarshaller(ProtoUtils.marshaller(GetSettingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Settings.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateSettingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createReportConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/CreateReportConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateReportConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getReportConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetReportConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetReportConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ReportConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listReportConfigsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/ListReportConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListReportConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListReportConfigsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteReportConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/DeleteReportConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteReportConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createReportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateReport") + .setRequestMarshaller(ProtoUtils.marshaller(CreateReportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getReportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetReport") + .setRequestMarshaller(ProtoUtils.marshaller(GetReportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Report.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listReportsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListReports") + .setRequestMarshaller(ProtoUtils.marshaller(ListReportsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListReportsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteReportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteReport") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteReportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private final UnaryCallable listAssetsCallable; + private final UnaryCallable listAssetsPagedCallable; + private final UnaryCallable getAssetCallable; + private final UnaryCallable updateAssetCallable; + private final UnaryCallable + batchUpdateAssetsCallable; + private final UnaryCallable deleteAssetCallable; + private final UnaryCallable batchDeleteAssetsCallable; + private final UnaryCallable + reportAssetFramesCallable; + private final UnaryCallable + aggregateAssetsValuesCallable; + private final UnaryCallable createImportJobCallable; + private final OperationCallable + createImportJobOperationCallable; + private final UnaryCallable listImportJobsCallable; + private final UnaryCallable + listImportJobsPagedCallable; + private final UnaryCallable getImportJobCallable; + private final UnaryCallable deleteImportJobCallable; + private final OperationCallable + deleteImportJobOperationCallable; + private final UnaryCallable updateImportJobCallable; + private final OperationCallable + updateImportJobOperationCallable; + private final UnaryCallable validateImportJobCallable; + private final OperationCallable + validateImportJobOperationCallable; + private final UnaryCallable runImportJobCallable; + private final OperationCallable + runImportJobOperationCallable; + private final UnaryCallable getImportDataFileCallable; + private final UnaryCallable + listImportDataFilesCallable; + private final UnaryCallable + listImportDataFilesPagedCallable; + private final UnaryCallable createImportDataFileCallable; + private final OperationCallable + createImportDataFileOperationCallable; + private final UnaryCallable deleteImportDataFileCallable; + private final OperationCallable + deleteImportDataFileOperationCallable; + private final UnaryCallable listGroupsCallable; + private final UnaryCallable listGroupsPagedCallable; + private final UnaryCallable getGroupCallable; + private final UnaryCallable createGroupCallable; + private final OperationCallable + createGroupOperationCallable; + private final UnaryCallable updateGroupCallable; + private final OperationCallable + updateGroupOperationCallable; + private final UnaryCallable deleteGroupCallable; + private final OperationCallable + deleteGroupOperationCallable; + private final UnaryCallable addAssetsToGroupCallable; + private final OperationCallable + addAssetsToGroupOperationCallable; + private final UnaryCallable + removeAssetsFromGroupCallable; + private final OperationCallable + removeAssetsFromGroupOperationCallable; + private final UnaryCallable + listErrorFramesCallable; + private final UnaryCallable + listErrorFramesPagedCallable; + private final UnaryCallable getErrorFrameCallable; + private final UnaryCallable listSourcesCallable; + private final UnaryCallable + listSourcesPagedCallable; + private final UnaryCallable getSourceCallable; + private final UnaryCallable createSourceCallable; + private final OperationCallable + createSourceOperationCallable; + private final UnaryCallable updateSourceCallable; + private final OperationCallable + updateSourceOperationCallable; + private final UnaryCallable deleteSourceCallable; + private final OperationCallable + deleteSourceOperationCallable; + private final UnaryCallable + listPreferenceSetsCallable; + private final UnaryCallable + listPreferenceSetsPagedCallable; + private final UnaryCallable getPreferenceSetCallable; + private final UnaryCallable createPreferenceSetCallable; + private final OperationCallable + createPreferenceSetOperationCallable; + private final UnaryCallable updatePreferenceSetCallable; + private final OperationCallable + updatePreferenceSetOperationCallable; + private final UnaryCallable deletePreferenceSetCallable; + private final OperationCallable + deletePreferenceSetOperationCallable; + private final UnaryCallable getSettingsCallable; + private final UnaryCallable updateSettingsCallable; + private final OperationCallable + updateSettingsOperationCallable; + private final UnaryCallable createReportConfigCallable; + private final OperationCallable + createReportConfigOperationCallable; + private final UnaryCallable getReportConfigCallable; + private final UnaryCallable + listReportConfigsCallable; + private final UnaryCallable + listReportConfigsPagedCallable; + private final UnaryCallable deleteReportConfigCallable; + private final OperationCallable + deleteReportConfigOperationCallable; + private final UnaryCallable createReportCallable; + private final OperationCallable + createReportOperationCallable; + private final UnaryCallable getReportCallable; + private final UnaryCallable listReportsCallable; + private final UnaryCallable + listReportsPagedCallable; + private final UnaryCallable deleteReportCallable; + private final OperationCallable + deleteReportOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcMigrationCenterStub create(MigrationCenterStubSettings settings) + throws IOException { + return new GrpcMigrationCenterStub(settings, ClientContext.create(settings)); + } + + public static final GrpcMigrationCenterStub create(ClientContext clientContext) + throws IOException { + return new GrpcMigrationCenterStub( + MigrationCenterStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcMigrationCenterStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcMigrationCenterStub( + MigrationCenterStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcMigrationCenterStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcMigrationCenterStub( + MigrationCenterStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcMigrationCenterCallableFactory()); + } + + /** + * Constructs an instance of GrpcMigrationCenterStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcMigrationCenterStub( + MigrationCenterStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("asset.name", String.valueOf(request.getAsset().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + batchUpdateAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchUpdateAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings batchDeleteAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + reportAssetFramesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(reportAssetFramesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + aggregateAssetsValuesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(aggregateAssetsValuesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createImportJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createImportJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listImportJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listImportJobsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getImportJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getImportJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteImportJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteImportJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateImportJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateImportJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("import_job.name", String.valueOf(request.getImportJob().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings validateImportJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(validateImportJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings runImportJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(runImportJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getImportDataFileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getImportDataFileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listImportDataFilesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listImportDataFilesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createImportDataFileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createImportDataFileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteImportDataFileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteImportDataFileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listGroupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listGroupsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("group.name", String.valueOf(request.getGroup().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings addAssetsToGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(addAssetsToGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("group", String.valueOf(request.getGroup())); + return builder.build(); + }) + .build(); + GrpcCallSettings + removeAssetsFromGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeAssetsFromGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("group", String.valueOf(request.getGroup())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listErrorFramesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listErrorFramesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getErrorFrameTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getErrorFrameMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listSourcesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSourcesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createSourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateSourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("source.name", String.valueOf(request.getSource().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteSourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listPreferenceSetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPreferenceSetsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getPreferenceSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPreferenceSetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createPreferenceSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPreferenceSetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updatePreferenceSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePreferenceSetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "preference_set.name", String.valueOf(request.getPreferenceSet().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deletePreferenceSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePreferenceSetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("settings.name", String.valueOf(request.getSettings().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createReportConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createReportConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getReportConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getReportConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listReportConfigsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listReportConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteReportConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteReportConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createReportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createReportMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getReportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getReportMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listReportsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listReportsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteReportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteReportMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listAssetsCallable = + callableFactory.createUnaryCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.listAssetsPagedCallable = + callableFactory.createPagedCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.getAssetCallable = + callableFactory.createUnaryCallable( + getAssetTransportSettings, settings.getAssetSettings(), clientContext); + this.updateAssetCallable = + callableFactory.createUnaryCallable( + updateAssetTransportSettings, settings.updateAssetSettings(), clientContext); + this.batchUpdateAssetsCallable = + callableFactory.createUnaryCallable( + batchUpdateAssetsTransportSettings, + settings.batchUpdateAssetsSettings(), + clientContext); + this.deleteAssetCallable = + callableFactory.createUnaryCallable( + deleteAssetTransportSettings, settings.deleteAssetSettings(), clientContext); + this.batchDeleteAssetsCallable = + callableFactory.createUnaryCallable( + batchDeleteAssetsTransportSettings, + settings.batchDeleteAssetsSettings(), + clientContext); + this.reportAssetFramesCallable = + callableFactory.createUnaryCallable( + reportAssetFramesTransportSettings, + settings.reportAssetFramesSettings(), + clientContext); + this.aggregateAssetsValuesCallable = + callableFactory.createUnaryCallable( + aggregateAssetsValuesTransportSettings, + settings.aggregateAssetsValuesSettings(), + clientContext); + this.createImportJobCallable = + callableFactory.createUnaryCallable( + createImportJobTransportSettings, settings.createImportJobSettings(), clientContext); + this.createImportJobOperationCallable = + callableFactory.createOperationCallable( + createImportJobTransportSettings, + settings.createImportJobOperationSettings(), + clientContext, + operationsStub); + this.listImportJobsCallable = + callableFactory.createUnaryCallable( + listImportJobsTransportSettings, settings.listImportJobsSettings(), clientContext); + this.listImportJobsPagedCallable = + callableFactory.createPagedCallable( + listImportJobsTransportSettings, settings.listImportJobsSettings(), clientContext); + this.getImportJobCallable = + callableFactory.createUnaryCallable( + getImportJobTransportSettings, settings.getImportJobSettings(), clientContext); + this.deleteImportJobCallable = + callableFactory.createUnaryCallable( + deleteImportJobTransportSettings, settings.deleteImportJobSettings(), clientContext); + this.deleteImportJobOperationCallable = + callableFactory.createOperationCallable( + deleteImportJobTransportSettings, + settings.deleteImportJobOperationSettings(), + clientContext, + operationsStub); + this.updateImportJobCallable = + callableFactory.createUnaryCallable( + updateImportJobTransportSettings, settings.updateImportJobSettings(), clientContext); + this.updateImportJobOperationCallable = + callableFactory.createOperationCallable( + updateImportJobTransportSettings, + settings.updateImportJobOperationSettings(), + clientContext, + operationsStub); + this.validateImportJobCallable = + callableFactory.createUnaryCallable( + validateImportJobTransportSettings, + settings.validateImportJobSettings(), + clientContext); + this.validateImportJobOperationCallable = + callableFactory.createOperationCallable( + validateImportJobTransportSettings, + settings.validateImportJobOperationSettings(), + clientContext, + operationsStub); + this.runImportJobCallable = + callableFactory.createUnaryCallable( + runImportJobTransportSettings, settings.runImportJobSettings(), clientContext); + this.runImportJobOperationCallable = + callableFactory.createOperationCallable( + runImportJobTransportSettings, + settings.runImportJobOperationSettings(), + clientContext, + operationsStub); + this.getImportDataFileCallable = + callableFactory.createUnaryCallable( + getImportDataFileTransportSettings, + settings.getImportDataFileSettings(), + clientContext); + this.listImportDataFilesCallable = + callableFactory.createUnaryCallable( + listImportDataFilesTransportSettings, + settings.listImportDataFilesSettings(), + clientContext); + this.listImportDataFilesPagedCallable = + callableFactory.createPagedCallable( + listImportDataFilesTransportSettings, + settings.listImportDataFilesSettings(), + clientContext); + this.createImportDataFileCallable = + callableFactory.createUnaryCallable( + createImportDataFileTransportSettings, + settings.createImportDataFileSettings(), + clientContext); + this.createImportDataFileOperationCallable = + callableFactory.createOperationCallable( + createImportDataFileTransportSettings, + settings.createImportDataFileOperationSettings(), + clientContext, + operationsStub); + this.deleteImportDataFileCallable = + callableFactory.createUnaryCallable( + deleteImportDataFileTransportSettings, + settings.deleteImportDataFileSettings(), + clientContext); + this.deleteImportDataFileOperationCallable = + callableFactory.createOperationCallable( + deleteImportDataFileTransportSettings, + settings.deleteImportDataFileOperationSettings(), + clientContext, + operationsStub); + this.listGroupsCallable = + callableFactory.createUnaryCallable( + listGroupsTransportSettings, settings.listGroupsSettings(), clientContext); + this.listGroupsPagedCallable = + callableFactory.createPagedCallable( + listGroupsTransportSettings, settings.listGroupsSettings(), clientContext); + this.getGroupCallable = + callableFactory.createUnaryCallable( + getGroupTransportSettings, settings.getGroupSettings(), clientContext); + this.createGroupCallable = + callableFactory.createUnaryCallable( + createGroupTransportSettings, settings.createGroupSettings(), clientContext); + this.createGroupOperationCallable = + callableFactory.createOperationCallable( + createGroupTransportSettings, + settings.createGroupOperationSettings(), + clientContext, + operationsStub); + this.updateGroupCallable = + callableFactory.createUnaryCallable( + updateGroupTransportSettings, settings.updateGroupSettings(), clientContext); + this.updateGroupOperationCallable = + callableFactory.createOperationCallable( + updateGroupTransportSettings, + settings.updateGroupOperationSettings(), + clientContext, + operationsStub); + this.deleteGroupCallable = + callableFactory.createUnaryCallable( + deleteGroupTransportSettings, settings.deleteGroupSettings(), clientContext); + this.deleteGroupOperationCallable = + callableFactory.createOperationCallable( + deleteGroupTransportSettings, + settings.deleteGroupOperationSettings(), + clientContext, + operationsStub); + this.addAssetsToGroupCallable = + callableFactory.createUnaryCallable( + addAssetsToGroupTransportSettings, settings.addAssetsToGroupSettings(), clientContext); + this.addAssetsToGroupOperationCallable = + callableFactory.createOperationCallable( + addAssetsToGroupTransportSettings, + settings.addAssetsToGroupOperationSettings(), + clientContext, + operationsStub); + this.removeAssetsFromGroupCallable = + callableFactory.createUnaryCallable( + removeAssetsFromGroupTransportSettings, + settings.removeAssetsFromGroupSettings(), + clientContext); + this.removeAssetsFromGroupOperationCallable = + callableFactory.createOperationCallable( + removeAssetsFromGroupTransportSettings, + settings.removeAssetsFromGroupOperationSettings(), + clientContext, + operationsStub); + this.listErrorFramesCallable = + callableFactory.createUnaryCallable( + listErrorFramesTransportSettings, settings.listErrorFramesSettings(), clientContext); + this.listErrorFramesPagedCallable = + callableFactory.createPagedCallable( + listErrorFramesTransportSettings, settings.listErrorFramesSettings(), clientContext); + this.getErrorFrameCallable = + callableFactory.createUnaryCallable( + getErrorFrameTransportSettings, settings.getErrorFrameSettings(), clientContext); + this.listSourcesCallable = + callableFactory.createUnaryCallable( + listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); + this.listSourcesPagedCallable = + callableFactory.createPagedCallable( + listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); + this.getSourceCallable = + callableFactory.createUnaryCallable( + getSourceTransportSettings, settings.getSourceSettings(), clientContext); + this.createSourceCallable = + callableFactory.createUnaryCallable( + createSourceTransportSettings, settings.createSourceSettings(), clientContext); + this.createSourceOperationCallable = + callableFactory.createOperationCallable( + createSourceTransportSettings, + settings.createSourceOperationSettings(), + clientContext, + operationsStub); + this.updateSourceCallable = + callableFactory.createUnaryCallable( + updateSourceTransportSettings, settings.updateSourceSettings(), clientContext); + this.updateSourceOperationCallable = + callableFactory.createOperationCallable( + updateSourceTransportSettings, + settings.updateSourceOperationSettings(), + clientContext, + operationsStub); + this.deleteSourceCallable = + callableFactory.createUnaryCallable( + deleteSourceTransportSettings, settings.deleteSourceSettings(), clientContext); + this.deleteSourceOperationCallable = + callableFactory.createOperationCallable( + deleteSourceTransportSettings, + settings.deleteSourceOperationSettings(), + clientContext, + operationsStub); + this.listPreferenceSetsCallable = + callableFactory.createUnaryCallable( + listPreferenceSetsTransportSettings, + settings.listPreferenceSetsSettings(), + clientContext); + this.listPreferenceSetsPagedCallable = + callableFactory.createPagedCallable( + listPreferenceSetsTransportSettings, + settings.listPreferenceSetsSettings(), + clientContext); + this.getPreferenceSetCallable = + callableFactory.createUnaryCallable( + getPreferenceSetTransportSettings, settings.getPreferenceSetSettings(), clientContext); + this.createPreferenceSetCallable = + callableFactory.createUnaryCallable( + createPreferenceSetTransportSettings, + settings.createPreferenceSetSettings(), + clientContext); + this.createPreferenceSetOperationCallable = + callableFactory.createOperationCallable( + createPreferenceSetTransportSettings, + settings.createPreferenceSetOperationSettings(), + clientContext, + operationsStub); + this.updatePreferenceSetCallable = + callableFactory.createUnaryCallable( + updatePreferenceSetTransportSettings, + settings.updatePreferenceSetSettings(), + clientContext); + this.updatePreferenceSetOperationCallable = + callableFactory.createOperationCallable( + updatePreferenceSetTransportSettings, + settings.updatePreferenceSetOperationSettings(), + clientContext, + operationsStub); + this.deletePreferenceSetCallable = + callableFactory.createUnaryCallable( + deletePreferenceSetTransportSettings, + settings.deletePreferenceSetSettings(), + clientContext); + this.deletePreferenceSetOperationCallable = + callableFactory.createOperationCallable( + deletePreferenceSetTransportSettings, + settings.deletePreferenceSetOperationSettings(), + clientContext, + operationsStub); + this.getSettingsCallable = + callableFactory.createUnaryCallable( + getSettingsTransportSettings, settings.getSettingsSettings(), clientContext); + this.updateSettingsCallable = + callableFactory.createUnaryCallable( + updateSettingsTransportSettings, settings.updateSettingsSettings(), clientContext); + this.updateSettingsOperationCallable = + callableFactory.createOperationCallable( + updateSettingsTransportSettings, + settings.updateSettingsOperationSettings(), + clientContext, + operationsStub); + this.createReportConfigCallable = + callableFactory.createUnaryCallable( + createReportConfigTransportSettings, + settings.createReportConfigSettings(), + clientContext); + this.createReportConfigOperationCallable = + callableFactory.createOperationCallable( + createReportConfigTransportSettings, + settings.createReportConfigOperationSettings(), + clientContext, + operationsStub); + this.getReportConfigCallable = + callableFactory.createUnaryCallable( + getReportConfigTransportSettings, settings.getReportConfigSettings(), clientContext); + this.listReportConfigsCallable = + callableFactory.createUnaryCallable( + listReportConfigsTransportSettings, + settings.listReportConfigsSettings(), + clientContext); + this.listReportConfigsPagedCallable = + callableFactory.createPagedCallable( + listReportConfigsTransportSettings, + settings.listReportConfigsSettings(), + clientContext); + this.deleteReportConfigCallable = + callableFactory.createUnaryCallable( + deleteReportConfigTransportSettings, + settings.deleteReportConfigSettings(), + clientContext); + this.deleteReportConfigOperationCallable = + callableFactory.createOperationCallable( + deleteReportConfigTransportSettings, + settings.deleteReportConfigOperationSettings(), + clientContext, + operationsStub); + this.createReportCallable = + callableFactory.createUnaryCallable( + createReportTransportSettings, settings.createReportSettings(), clientContext); + this.createReportOperationCallable = + callableFactory.createOperationCallable( + createReportTransportSettings, + settings.createReportOperationSettings(), + clientContext, + operationsStub); + this.getReportCallable = + callableFactory.createUnaryCallable( + getReportTransportSettings, settings.getReportSettings(), clientContext); + this.listReportsCallable = + callableFactory.createUnaryCallable( + listReportsTransportSettings, settings.listReportsSettings(), clientContext); + this.listReportsPagedCallable = + callableFactory.createPagedCallable( + listReportsTransportSettings, settings.listReportsSettings(), clientContext); + this.deleteReportCallable = + callableFactory.createUnaryCallable( + deleteReportTransportSettings, settings.deleteReportSettings(), clientContext); + this.deleteReportOperationCallable = + callableFactory.createOperationCallable( + deleteReportTransportSettings, + settings.deleteReportOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listAssetsCallable() { + return listAssetsCallable; + } + + @Override + public UnaryCallable listAssetsPagedCallable() { + return listAssetsPagedCallable; + } + + @Override + public UnaryCallable getAssetCallable() { + return getAssetCallable; + } + + @Override + public UnaryCallable updateAssetCallable() { + return updateAssetCallable; + } + + @Override + public UnaryCallable + batchUpdateAssetsCallable() { + return batchUpdateAssetsCallable; + } + + @Override + public UnaryCallable deleteAssetCallable() { + return deleteAssetCallable; + } + + @Override + public UnaryCallable batchDeleteAssetsCallable() { + return batchDeleteAssetsCallable; + } + + @Override + public UnaryCallable + reportAssetFramesCallable() { + return reportAssetFramesCallable; + } + + @Override + public UnaryCallable + aggregateAssetsValuesCallable() { + return aggregateAssetsValuesCallable; + } + + @Override + public UnaryCallable createImportJobCallable() { + return createImportJobCallable; + } + + @Override + public OperationCallable + createImportJobOperationCallable() { + return createImportJobOperationCallable; + } + + @Override + public UnaryCallable listImportJobsCallable() { + return listImportJobsCallable; + } + + @Override + public UnaryCallable + listImportJobsPagedCallable() { + return listImportJobsPagedCallable; + } + + @Override + public UnaryCallable getImportJobCallable() { + return getImportJobCallable; + } + + @Override + public UnaryCallable deleteImportJobCallable() { + return deleteImportJobCallable; + } + + @Override + public OperationCallable + deleteImportJobOperationCallable() { + return deleteImportJobOperationCallable; + } + + @Override + public UnaryCallable updateImportJobCallable() { + return updateImportJobCallable; + } + + @Override + public OperationCallable + updateImportJobOperationCallable() { + return updateImportJobOperationCallable; + } + + @Override + public UnaryCallable validateImportJobCallable() { + return validateImportJobCallable; + } + + @Override + public OperationCallable + validateImportJobOperationCallable() { + return validateImportJobOperationCallable; + } + + @Override + public UnaryCallable runImportJobCallable() { + return runImportJobCallable; + } + + @Override + public OperationCallable + runImportJobOperationCallable() { + return runImportJobOperationCallable; + } + + @Override + public UnaryCallable getImportDataFileCallable() { + return getImportDataFileCallable; + } + + @Override + public UnaryCallable + listImportDataFilesCallable() { + return listImportDataFilesCallable; + } + + @Override + public UnaryCallable + listImportDataFilesPagedCallable() { + return listImportDataFilesPagedCallable; + } + + @Override + public UnaryCallable createImportDataFileCallable() { + return createImportDataFileCallable; + } + + @Override + public OperationCallable + createImportDataFileOperationCallable() { + return createImportDataFileOperationCallable; + } + + @Override + public UnaryCallable deleteImportDataFileCallable() { + return deleteImportDataFileCallable; + } + + @Override + public OperationCallable + deleteImportDataFileOperationCallable() { + return deleteImportDataFileOperationCallable; + } + + @Override + public UnaryCallable listGroupsCallable() { + return listGroupsCallable; + } + + @Override + public UnaryCallable listGroupsPagedCallable() { + return listGroupsPagedCallable; + } + + @Override + public UnaryCallable getGroupCallable() { + return getGroupCallable; + } + + @Override + public UnaryCallable createGroupCallable() { + return createGroupCallable; + } + + @Override + public OperationCallable + createGroupOperationCallable() { + return createGroupOperationCallable; + } + + @Override + public UnaryCallable updateGroupCallable() { + return updateGroupCallable; + } + + @Override + public OperationCallable + updateGroupOperationCallable() { + return updateGroupOperationCallable; + } + + @Override + public UnaryCallable deleteGroupCallable() { + return deleteGroupCallable; + } + + @Override + public OperationCallable + deleteGroupOperationCallable() { + return deleteGroupOperationCallable; + } + + @Override + public UnaryCallable addAssetsToGroupCallable() { + return addAssetsToGroupCallable; + } + + @Override + public OperationCallable + addAssetsToGroupOperationCallable() { + return addAssetsToGroupOperationCallable; + } + + @Override + public UnaryCallable removeAssetsFromGroupCallable() { + return removeAssetsFromGroupCallable; + } + + @Override + public OperationCallable + removeAssetsFromGroupOperationCallable() { + return removeAssetsFromGroupOperationCallable; + } + + @Override + public UnaryCallable listErrorFramesCallable() { + return listErrorFramesCallable; + } + + @Override + public UnaryCallable + listErrorFramesPagedCallable() { + return listErrorFramesPagedCallable; + } + + @Override + public UnaryCallable getErrorFrameCallable() { + return getErrorFrameCallable; + } + + @Override + public UnaryCallable listSourcesCallable() { + return listSourcesCallable; + } + + @Override + public UnaryCallable listSourcesPagedCallable() { + return listSourcesPagedCallable; + } + + @Override + public UnaryCallable getSourceCallable() { + return getSourceCallable; + } + + @Override + public UnaryCallable createSourceCallable() { + return createSourceCallable; + } + + @Override + public OperationCallable + createSourceOperationCallable() { + return createSourceOperationCallable; + } + + @Override + public UnaryCallable updateSourceCallable() { + return updateSourceCallable; + } + + @Override + public OperationCallable + updateSourceOperationCallable() { + return updateSourceOperationCallable; + } + + @Override + public UnaryCallable deleteSourceCallable() { + return deleteSourceCallable; + } + + @Override + public OperationCallable + deleteSourceOperationCallable() { + return deleteSourceOperationCallable; + } + + @Override + public UnaryCallable + listPreferenceSetsCallable() { + return listPreferenceSetsCallable; + } + + @Override + public UnaryCallable + listPreferenceSetsPagedCallable() { + return listPreferenceSetsPagedCallable; + } + + @Override + public UnaryCallable getPreferenceSetCallable() { + return getPreferenceSetCallable; + } + + @Override + public UnaryCallable createPreferenceSetCallable() { + return createPreferenceSetCallable; + } + + @Override + public OperationCallable + createPreferenceSetOperationCallable() { + return createPreferenceSetOperationCallable; + } + + @Override + public UnaryCallable updatePreferenceSetCallable() { + return updatePreferenceSetCallable; + } + + @Override + public OperationCallable + updatePreferenceSetOperationCallable() { + return updatePreferenceSetOperationCallable; + } + + @Override + public UnaryCallable deletePreferenceSetCallable() { + return deletePreferenceSetCallable; + } + + @Override + public OperationCallable + deletePreferenceSetOperationCallable() { + return deletePreferenceSetOperationCallable; + } + + @Override + public UnaryCallable getSettingsCallable() { + return getSettingsCallable; + } + + @Override + public UnaryCallable updateSettingsCallable() { + return updateSettingsCallable; + } + + @Override + public OperationCallable + updateSettingsOperationCallable() { + return updateSettingsOperationCallable; + } + + @Override + public UnaryCallable createReportConfigCallable() { + return createReportConfigCallable; + } + + @Override + public OperationCallable + createReportConfigOperationCallable() { + return createReportConfigOperationCallable; + } + + @Override + public UnaryCallable getReportConfigCallable() { + return getReportConfigCallable; + } + + @Override + public UnaryCallable + listReportConfigsCallable() { + return listReportConfigsCallable; + } + + @Override + public UnaryCallable + listReportConfigsPagedCallable() { + return listReportConfigsPagedCallable; + } + + @Override + public UnaryCallable deleteReportConfigCallable() { + return deleteReportConfigCallable; + } + + @Override + public OperationCallable + deleteReportConfigOperationCallable() { + return deleteReportConfigOperationCallable; + } + + @Override + public UnaryCallable createReportCallable() { + return createReportCallable; + } + + @Override + public OperationCallable + createReportOperationCallable() { + return createReportOperationCallable; + } + + @Override + public UnaryCallable getReportCallable() { + return getReportCallable; + } + + @Override + public UnaryCallable listReportsCallable() { + return listReportsCallable; + } + + @Override + public UnaryCallable listReportsPagedCallable() { + return listReportsPagedCallable; + } + + @Override + public UnaryCallable deleteReportCallable() { + return deleteReportCallable; + } + + @Override + public OperationCallable + deleteReportOperationCallable() { + return deleteReportOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/HttpJsonMigrationCenterCallableFactory.java b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/HttpJsonMigrationCenterCallableFactory.java new file mode 100644 index 000000000000..c6cd67b743cd --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/HttpJsonMigrationCenterCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the MigrationCenter service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonMigrationCenterCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/HttpJsonMigrationCenterStub.java b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/HttpJsonMigrationCenterStub.java new file mode 100644 index 000000000000..0dcda0dccbc6 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/HttpJsonMigrationCenterStub.java @@ -0,0 +1,3760 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.stub; + +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListAssetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListErrorFramesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListGroupsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportDataFilesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportJobsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListLocationsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListPreferenceSetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportConfigsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListSourcesPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest; +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest; +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse; +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest; +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest; +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse; +import com.google.cloud.migrationcenter.v1.CreateGroupRequest; +import com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.CreateImportJobRequest; +import com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.CreateReportConfigRequest; +import com.google.cloud.migrationcenter.v1.CreateReportRequest; +import com.google.cloud.migrationcenter.v1.CreateSourceRequest; +import com.google.cloud.migrationcenter.v1.DeleteAssetRequest; +import com.google.cloud.migrationcenter.v1.DeleteGroupRequest; +import com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.DeleteImportJobRequest; +import com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest; +import com.google.cloud.migrationcenter.v1.DeleteReportRequest; +import com.google.cloud.migrationcenter.v1.DeleteSourceRequest; +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.GetAssetRequest; +import com.google.cloud.migrationcenter.v1.GetErrorFrameRequest; +import com.google.cloud.migrationcenter.v1.GetGroupRequest; +import com.google.cloud.migrationcenter.v1.GetImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.GetImportJobRequest; +import com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.GetReportConfigRequest; +import com.google.cloud.migrationcenter.v1.GetReportRequest; +import com.google.cloud.migrationcenter.v1.GetSettingsRequest; +import com.google.cloud.migrationcenter.v1.GetSourceRequest; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.ListAssetsRequest; +import com.google.cloud.migrationcenter.v1.ListAssetsResponse; +import com.google.cloud.migrationcenter.v1.ListErrorFramesRequest; +import com.google.cloud.migrationcenter.v1.ListErrorFramesResponse; +import com.google.cloud.migrationcenter.v1.ListGroupsRequest; +import com.google.cloud.migrationcenter.v1.ListGroupsResponse; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse; +import com.google.cloud.migrationcenter.v1.ListImportJobsRequest; +import com.google.cloud.migrationcenter.v1.ListImportJobsResponse; +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest; +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse; +import com.google.cloud.migrationcenter.v1.ListReportConfigsRequest; +import com.google.cloud.migrationcenter.v1.ListReportConfigsResponse; +import com.google.cloud.migrationcenter.v1.ListReportsRequest; +import com.google.cloud.migrationcenter.v1.ListReportsResponse; +import com.google.cloud.migrationcenter.v1.ListSourcesRequest; +import com.google.cloud.migrationcenter.v1.ListSourcesResponse; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse; +import com.google.cloud.migrationcenter.v1.ReportConfig; +import com.google.cloud.migrationcenter.v1.RunImportJobRequest; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.cloud.migrationcenter.v1.UpdateAssetRequest; +import com.google.cloud.migrationcenter.v1.UpdateGroupRequest; +import com.google.cloud.migrationcenter.v1.UpdateImportJobRequest; +import com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.UpdateSettingsRequest; +import com.google.cloud.migrationcenter.v1.UpdateSourceRequest; +import com.google.cloud.migrationcenter.v1.ValidateImportJobRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the MigrationCenter service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonMigrationCenterStub extends MigrationCenterStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(ImportDataFile.getDescriptor()) + .add(Source.getDescriptor()) + .add(Empty.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(ReportConfig.getDescriptor()) + .add(PreferenceSet.getDescriptor()) + .add(Settings.getDescriptor()) + .add(Report.getDescriptor()) + .add(ImportJob.getDescriptor()) + .add(Group.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listAssetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListAssets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/assets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAssetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetAsset") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/assets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Asset.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateAsset") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{asset.name=projects/*/locations/*/assets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "asset.name", request.getAsset().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("asset", request.getAsset(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Asset.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + batchUpdateAssetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/BatchUpdateAssets") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/assets:batchUpdate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchUpdateAssetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor deleteAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteAsset") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/assets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + batchDeleteAssetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/BatchDeleteAssets") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/assets:batchDelete", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + reportAssetFramesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/ReportAssetFrames") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/assets:reportAssetFrames", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "source", request.getSource()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("frames", request.getFrames(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReportAssetFramesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + AggregateAssetsValuesRequest, AggregateAssetsValuesResponse> + aggregateAssetsValuesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/AggregateAssetsValues") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/assets:aggregateValues", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AggregateAssetsValuesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createImportJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateImportJob") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/importJobs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "importJobId", request.getImportJobId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("importJob", request.getImportJob(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateImportJobRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listImportJobsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListImportJobs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/importJobs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListImportJobsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getImportJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetImportJob") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/importJobs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ImportJob.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteImportJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteImportJob") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/importJobs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteImportJobRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateImportJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateImportJob") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{importJob.name=projects/*/locations/*/importJobs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "importJob.name", request.getImportJob().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("importJob", request.getImportJob(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateImportJobRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + validateImportJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/ValidateImportJob") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/importJobs/*}:validate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ValidateImportJobRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + runImportJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/RunImportJob") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/importJobs/*}:run", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (RunImportJobRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getImportDataFileMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/GetImportDataFile") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/importJobs/*/importDataFiles/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ImportDataFile.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listImportDataFilesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/ListImportDataFiles") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/importJobs/*}/importDataFiles", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListImportDataFilesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createImportDataFileMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/CreateImportDataFile") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/importJobs/*}/importDataFiles", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "importDataFileId", request.getImportDataFileId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("importDataFile", request.getImportDataFile(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateImportDataFileRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteImportDataFileMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/DeleteImportDataFile") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/importJobs/*/importDataFiles/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteImportDataFileRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listGroupsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListGroups") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/groups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListGroupsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetGroup") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/groups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Group.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateGroup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/groups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "groupId", request.getGroupId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("group", request.getGroup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateGroupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateGroup") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{group.name=projects/*/locations/*/groups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "group.name", request.getGroup().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("group", request.getGroup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateGroupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteGroup") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/groups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteGroupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + addAssetsToGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/AddAssetsToGroup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{group=projects/*/locations/*/groups/*}:addAssets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "group", request.getGroup()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearGroup().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AddAssetsToGroupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + removeAssetsFromGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/RemoveAssetsFromGroup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{group=projects/*/locations/*/groups/*}:removeAssets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "group", request.getGroup()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearGroup().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (RemoveAssetsFromGroupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listErrorFramesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListErrorFrames") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/sources/*}/errorFrames", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListErrorFramesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getErrorFrameMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetErrorFrame") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/sources/*/errorFrames/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ErrorFrame.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listSourcesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListSources") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/sources", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListSourcesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getSourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetSource") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/sources/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Source.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createSourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateSource") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/sources", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "sourceId", request.getSourceId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("source", request.getSource(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateSourceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateSourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateSource") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{source.name=projects/*/locations/*/sources/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "source.name", request.getSource().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("source", request.getSource(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateSourceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteSourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteSource") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/sources/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteSourceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listPreferenceSetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/ListPreferenceSets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/preferenceSets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPreferenceSetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getPreferenceSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetPreferenceSet") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/preferenceSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PreferenceSet.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createPreferenceSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/CreatePreferenceSet") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/preferenceSets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "preferenceSetId", request.getPreferenceSetId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("preferenceSet", request.getPreferenceSet(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreatePreferenceSetRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updatePreferenceSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/UpdatePreferenceSet") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{preferenceSet.name=projects/*/locations/*/preferenceSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "preferenceSet.name", request.getPreferenceSet().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("preferenceSet", request.getPreferenceSet(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdatePreferenceSetRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deletePreferenceSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/DeletePreferenceSet") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/preferenceSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeletePreferenceSetRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetSettings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/settings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Settings.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateSettings") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{settings.name=projects/*/locations/*/settings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "settings.name", request.getSettings().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("settings", request.getSettings(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateSettingsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createReportConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/CreateReportConfig") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/reportConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "reportConfigId", request.getReportConfigId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("reportConfig", request.getReportConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateReportConfigRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getReportConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetReportConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/reportConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReportConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listReportConfigsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/ListReportConfigs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/reportConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListReportConfigsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteReportConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.migrationcenter.v1.MigrationCenter/DeleteReportConfig") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/reportConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteReportConfigRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createReportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateReport") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/reportConfigs/*}/reports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "reportId", request.getReportId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("report", request.getReport(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateReportRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor getReportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetReport") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/reportConfigs/*/reports/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Report.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listReportsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListReports") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/reportConfigs/*}/reports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListReportsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteReportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteReport") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/reportConfigs/*/reports/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteReportRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listAssetsCallable; + private final UnaryCallable listAssetsPagedCallable; + private final UnaryCallable getAssetCallable; + private final UnaryCallable updateAssetCallable; + private final UnaryCallable + batchUpdateAssetsCallable; + private final UnaryCallable deleteAssetCallable; + private final UnaryCallable batchDeleteAssetsCallable; + private final UnaryCallable + reportAssetFramesCallable; + private final UnaryCallable + aggregateAssetsValuesCallable; + private final UnaryCallable createImportJobCallable; + private final OperationCallable + createImportJobOperationCallable; + private final UnaryCallable listImportJobsCallable; + private final UnaryCallable + listImportJobsPagedCallable; + private final UnaryCallable getImportJobCallable; + private final UnaryCallable deleteImportJobCallable; + private final OperationCallable + deleteImportJobOperationCallable; + private final UnaryCallable updateImportJobCallable; + private final OperationCallable + updateImportJobOperationCallable; + private final UnaryCallable validateImportJobCallable; + private final OperationCallable + validateImportJobOperationCallable; + private final UnaryCallable runImportJobCallable; + private final OperationCallable + runImportJobOperationCallable; + private final UnaryCallable getImportDataFileCallable; + private final UnaryCallable + listImportDataFilesCallable; + private final UnaryCallable + listImportDataFilesPagedCallable; + private final UnaryCallable createImportDataFileCallable; + private final OperationCallable + createImportDataFileOperationCallable; + private final UnaryCallable deleteImportDataFileCallable; + private final OperationCallable + deleteImportDataFileOperationCallable; + private final UnaryCallable listGroupsCallable; + private final UnaryCallable listGroupsPagedCallable; + private final UnaryCallable getGroupCallable; + private final UnaryCallable createGroupCallable; + private final OperationCallable + createGroupOperationCallable; + private final UnaryCallable updateGroupCallable; + private final OperationCallable + updateGroupOperationCallable; + private final UnaryCallable deleteGroupCallable; + private final OperationCallable + deleteGroupOperationCallable; + private final UnaryCallable addAssetsToGroupCallable; + private final OperationCallable + addAssetsToGroupOperationCallable; + private final UnaryCallable + removeAssetsFromGroupCallable; + private final OperationCallable + removeAssetsFromGroupOperationCallable; + private final UnaryCallable + listErrorFramesCallable; + private final UnaryCallable + listErrorFramesPagedCallable; + private final UnaryCallable getErrorFrameCallable; + private final UnaryCallable listSourcesCallable; + private final UnaryCallable + listSourcesPagedCallable; + private final UnaryCallable getSourceCallable; + private final UnaryCallable createSourceCallable; + private final OperationCallable + createSourceOperationCallable; + private final UnaryCallable updateSourceCallable; + private final OperationCallable + updateSourceOperationCallable; + private final UnaryCallable deleteSourceCallable; + private final OperationCallable + deleteSourceOperationCallable; + private final UnaryCallable + listPreferenceSetsCallable; + private final UnaryCallable + listPreferenceSetsPagedCallable; + private final UnaryCallable getPreferenceSetCallable; + private final UnaryCallable createPreferenceSetCallable; + private final OperationCallable + createPreferenceSetOperationCallable; + private final UnaryCallable updatePreferenceSetCallable; + private final OperationCallable + updatePreferenceSetOperationCallable; + private final UnaryCallable deletePreferenceSetCallable; + private final OperationCallable + deletePreferenceSetOperationCallable; + private final UnaryCallable getSettingsCallable; + private final UnaryCallable updateSettingsCallable; + private final OperationCallable + updateSettingsOperationCallable; + private final UnaryCallable createReportConfigCallable; + private final OperationCallable + createReportConfigOperationCallable; + private final UnaryCallable getReportConfigCallable; + private final UnaryCallable + listReportConfigsCallable; + private final UnaryCallable + listReportConfigsPagedCallable; + private final UnaryCallable deleteReportConfigCallable; + private final OperationCallable + deleteReportConfigOperationCallable; + private final UnaryCallable createReportCallable; + private final OperationCallable + createReportOperationCallable; + private final UnaryCallable getReportCallable; + private final UnaryCallable listReportsCallable; + private final UnaryCallable + listReportsPagedCallable; + private final UnaryCallable deleteReportCallable; + private final OperationCallable + deleteReportOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonMigrationCenterStub create(MigrationCenterStubSettings settings) + throws IOException { + return new HttpJsonMigrationCenterStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonMigrationCenterStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonMigrationCenterStub( + MigrationCenterStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonMigrationCenterStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonMigrationCenterStub( + MigrationCenterStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonMigrationCenterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonMigrationCenterStub( + MigrationCenterStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonMigrationCenterCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonMigrationCenterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonMigrationCenterStub( + MigrationCenterStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings listAssetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAssetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("asset.name", String.valueOf(request.getAsset().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + batchUpdateAssetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchUpdateAssetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings batchDeleteAssetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteAssetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + reportAssetFramesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(reportAssetFramesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + aggregateAssetsValuesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(aggregateAssetsValuesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createImportJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createImportJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listImportJobsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listImportJobsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getImportJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getImportJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteImportJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteImportJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateImportJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateImportJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("import_job.name", String.valueOf(request.getImportJob().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings validateImportJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(validateImportJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings runImportJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(runImportJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getImportDataFileTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getImportDataFileMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listImportDataFilesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listImportDataFilesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createImportDataFileTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createImportDataFileMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteImportDataFileTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteImportDataFileMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listGroupsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listGroupsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("group.name", String.valueOf(request.getGroup().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings addAssetsToGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(addAssetsToGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("group", String.valueOf(request.getGroup())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + removeAssetsFromGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(removeAssetsFromGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("group", String.valueOf(request.getGroup())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listErrorFramesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listErrorFramesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getErrorFrameTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getErrorFrameMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listSourcesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSourcesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getSourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createSourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createSourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateSourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("source.name", String.valueOf(request.getSource().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteSourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteSourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listPreferenceSetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listPreferenceSetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getPreferenceSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPreferenceSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createPreferenceSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPreferenceSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updatePreferenceSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePreferenceSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "preference_set.name", + String.valueOf(request.getPreferenceSet().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deletePreferenceSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePreferenceSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getSettingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateSettingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("settings.name", String.valueOf(request.getSettings().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createReportConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createReportConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getReportConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getReportConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listReportConfigsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listReportConfigsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteReportConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteReportConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createReportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createReportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getReportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getReportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listReportsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listReportsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteReportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteReportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listAssetsCallable = + callableFactory.createUnaryCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.listAssetsPagedCallable = + callableFactory.createPagedCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.getAssetCallable = + callableFactory.createUnaryCallable( + getAssetTransportSettings, settings.getAssetSettings(), clientContext); + this.updateAssetCallable = + callableFactory.createUnaryCallable( + updateAssetTransportSettings, settings.updateAssetSettings(), clientContext); + this.batchUpdateAssetsCallable = + callableFactory.createUnaryCallable( + batchUpdateAssetsTransportSettings, + settings.batchUpdateAssetsSettings(), + clientContext); + this.deleteAssetCallable = + callableFactory.createUnaryCallable( + deleteAssetTransportSettings, settings.deleteAssetSettings(), clientContext); + this.batchDeleteAssetsCallable = + callableFactory.createUnaryCallable( + batchDeleteAssetsTransportSettings, + settings.batchDeleteAssetsSettings(), + clientContext); + this.reportAssetFramesCallable = + callableFactory.createUnaryCallable( + reportAssetFramesTransportSettings, + settings.reportAssetFramesSettings(), + clientContext); + this.aggregateAssetsValuesCallable = + callableFactory.createUnaryCallable( + aggregateAssetsValuesTransportSettings, + settings.aggregateAssetsValuesSettings(), + clientContext); + this.createImportJobCallable = + callableFactory.createUnaryCallable( + createImportJobTransportSettings, settings.createImportJobSettings(), clientContext); + this.createImportJobOperationCallable = + callableFactory.createOperationCallable( + createImportJobTransportSettings, + settings.createImportJobOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listImportJobsCallable = + callableFactory.createUnaryCallable( + listImportJobsTransportSettings, settings.listImportJobsSettings(), clientContext); + this.listImportJobsPagedCallable = + callableFactory.createPagedCallable( + listImportJobsTransportSettings, settings.listImportJobsSettings(), clientContext); + this.getImportJobCallable = + callableFactory.createUnaryCallable( + getImportJobTransportSettings, settings.getImportJobSettings(), clientContext); + this.deleteImportJobCallable = + callableFactory.createUnaryCallable( + deleteImportJobTransportSettings, settings.deleteImportJobSettings(), clientContext); + this.deleteImportJobOperationCallable = + callableFactory.createOperationCallable( + deleteImportJobTransportSettings, + settings.deleteImportJobOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateImportJobCallable = + callableFactory.createUnaryCallable( + updateImportJobTransportSettings, settings.updateImportJobSettings(), clientContext); + this.updateImportJobOperationCallable = + callableFactory.createOperationCallable( + updateImportJobTransportSettings, + settings.updateImportJobOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.validateImportJobCallable = + callableFactory.createUnaryCallable( + validateImportJobTransportSettings, + settings.validateImportJobSettings(), + clientContext); + this.validateImportJobOperationCallable = + callableFactory.createOperationCallable( + validateImportJobTransportSettings, + settings.validateImportJobOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.runImportJobCallable = + callableFactory.createUnaryCallable( + runImportJobTransportSettings, settings.runImportJobSettings(), clientContext); + this.runImportJobOperationCallable = + callableFactory.createOperationCallable( + runImportJobTransportSettings, + settings.runImportJobOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getImportDataFileCallable = + callableFactory.createUnaryCallable( + getImportDataFileTransportSettings, + settings.getImportDataFileSettings(), + clientContext); + this.listImportDataFilesCallable = + callableFactory.createUnaryCallable( + listImportDataFilesTransportSettings, + settings.listImportDataFilesSettings(), + clientContext); + this.listImportDataFilesPagedCallable = + callableFactory.createPagedCallable( + listImportDataFilesTransportSettings, + settings.listImportDataFilesSettings(), + clientContext); + this.createImportDataFileCallable = + callableFactory.createUnaryCallable( + createImportDataFileTransportSettings, + settings.createImportDataFileSettings(), + clientContext); + this.createImportDataFileOperationCallable = + callableFactory.createOperationCallable( + createImportDataFileTransportSettings, + settings.createImportDataFileOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteImportDataFileCallable = + callableFactory.createUnaryCallable( + deleteImportDataFileTransportSettings, + settings.deleteImportDataFileSettings(), + clientContext); + this.deleteImportDataFileOperationCallable = + callableFactory.createOperationCallable( + deleteImportDataFileTransportSettings, + settings.deleteImportDataFileOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listGroupsCallable = + callableFactory.createUnaryCallable( + listGroupsTransportSettings, settings.listGroupsSettings(), clientContext); + this.listGroupsPagedCallable = + callableFactory.createPagedCallable( + listGroupsTransportSettings, settings.listGroupsSettings(), clientContext); + this.getGroupCallable = + callableFactory.createUnaryCallable( + getGroupTransportSettings, settings.getGroupSettings(), clientContext); + this.createGroupCallable = + callableFactory.createUnaryCallable( + createGroupTransportSettings, settings.createGroupSettings(), clientContext); + this.createGroupOperationCallable = + callableFactory.createOperationCallable( + createGroupTransportSettings, + settings.createGroupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateGroupCallable = + callableFactory.createUnaryCallable( + updateGroupTransportSettings, settings.updateGroupSettings(), clientContext); + this.updateGroupOperationCallable = + callableFactory.createOperationCallable( + updateGroupTransportSettings, + settings.updateGroupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteGroupCallable = + callableFactory.createUnaryCallable( + deleteGroupTransportSettings, settings.deleteGroupSettings(), clientContext); + this.deleteGroupOperationCallable = + callableFactory.createOperationCallable( + deleteGroupTransportSettings, + settings.deleteGroupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.addAssetsToGroupCallable = + callableFactory.createUnaryCallable( + addAssetsToGroupTransportSettings, settings.addAssetsToGroupSettings(), clientContext); + this.addAssetsToGroupOperationCallable = + callableFactory.createOperationCallable( + addAssetsToGroupTransportSettings, + settings.addAssetsToGroupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.removeAssetsFromGroupCallable = + callableFactory.createUnaryCallable( + removeAssetsFromGroupTransportSettings, + settings.removeAssetsFromGroupSettings(), + clientContext); + this.removeAssetsFromGroupOperationCallable = + callableFactory.createOperationCallable( + removeAssetsFromGroupTransportSettings, + settings.removeAssetsFromGroupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listErrorFramesCallable = + callableFactory.createUnaryCallable( + listErrorFramesTransportSettings, settings.listErrorFramesSettings(), clientContext); + this.listErrorFramesPagedCallable = + callableFactory.createPagedCallable( + listErrorFramesTransportSettings, settings.listErrorFramesSettings(), clientContext); + this.getErrorFrameCallable = + callableFactory.createUnaryCallable( + getErrorFrameTransportSettings, settings.getErrorFrameSettings(), clientContext); + this.listSourcesCallable = + callableFactory.createUnaryCallable( + listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); + this.listSourcesPagedCallable = + callableFactory.createPagedCallable( + listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); + this.getSourceCallable = + callableFactory.createUnaryCallable( + getSourceTransportSettings, settings.getSourceSettings(), clientContext); + this.createSourceCallable = + callableFactory.createUnaryCallable( + createSourceTransportSettings, settings.createSourceSettings(), clientContext); + this.createSourceOperationCallable = + callableFactory.createOperationCallable( + createSourceTransportSettings, + settings.createSourceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateSourceCallable = + callableFactory.createUnaryCallable( + updateSourceTransportSettings, settings.updateSourceSettings(), clientContext); + this.updateSourceOperationCallable = + callableFactory.createOperationCallable( + updateSourceTransportSettings, + settings.updateSourceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteSourceCallable = + callableFactory.createUnaryCallable( + deleteSourceTransportSettings, settings.deleteSourceSettings(), clientContext); + this.deleteSourceOperationCallable = + callableFactory.createOperationCallable( + deleteSourceTransportSettings, + settings.deleteSourceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listPreferenceSetsCallable = + callableFactory.createUnaryCallable( + listPreferenceSetsTransportSettings, + settings.listPreferenceSetsSettings(), + clientContext); + this.listPreferenceSetsPagedCallable = + callableFactory.createPagedCallable( + listPreferenceSetsTransportSettings, + settings.listPreferenceSetsSettings(), + clientContext); + this.getPreferenceSetCallable = + callableFactory.createUnaryCallable( + getPreferenceSetTransportSettings, settings.getPreferenceSetSettings(), clientContext); + this.createPreferenceSetCallable = + callableFactory.createUnaryCallable( + createPreferenceSetTransportSettings, + settings.createPreferenceSetSettings(), + clientContext); + this.createPreferenceSetOperationCallable = + callableFactory.createOperationCallable( + createPreferenceSetTransportSettings, + settings.createPreferenceSetOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updatePreferenceSetCallable = + callableFactory.createUnaryCallable( + updatePreferenceSetTransportSettings, + settings.updatePreferenceSetSettings(), + clientContext); + this.updatePreferenceSetOperationCallable = + callableFactory.createOperationCallable( + updatePreferenceSetTransportSettings, + settings.updatePreferenceSetOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deletePreferenceSetCallable = + callableFactory.createUnaryCallable( + deletePreferenceSetTransportSettings, + settings.deletePreferenceSetSettings(), + clientContext); + this.deletePreferenceSetOperationCallable = + callableFactory.createOperationCallable( + deletePreferenceSetTransportSettings, + settings.deletePreferenceSetOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getSettingsCallable = + callableFactory.createUnaryCallable( + getSettingsTransportSettings, settings.getSettingsSettings(), clientContext); + this.updateSettingsCallable = + callableFactory.createUnaryCallable( + updateSettingsTransportSettings, settings.updateSettingsSettings(), clientContext); + this.updateSettingsOperationCallable = + callableFactory.createOperationCallable( + updateSettingsTransportSettings, + settings.updateSettingsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createReportConfigCallable = + callableFactory.createUnaryCallable( + createReportConfigTransportSettings, + settings.createReportConfigSettings(), + clientContext); + this.createReportConfigOperationCallable = + callableFactory.createOperationCallable( + createReportConfigTransportSettings, + settings.createReportConfigOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getReportConfigCallable = + callableFactory.createUnaryCallable( + getReportConfigTransportSettings, settings.getReportConfigSettings(), clientContext); + this.listReportConfigsCallable = + callableFactory.createUnaryCallable( + listReportConfigsTransportSettings, + settings.listReportConfigsSettings(), + clientContext); + this.listReportConfigsPagedCallable = + callableFactory.createPagedCallable( + listReportConfigsTransportSettings, + settings.listReportConfigsSettings(), + clientContext); + this.deleteReportConfigCallable = + callableFactory.createUnaryCallable( + deleteReportConfigTransportSettings, + settings.deleteReportConfigSettings(), + clientContext); + this.deleteReportConfigOperationCallable = + callableFactory.createOperationCallable( + deleteReportConfigTransportSettings, + settings.deleteReportConfigOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createReportCallable = + callableFactory.createUnaryCallable( + createReportTransportSettings, settings.createReportSettings(), clientContext); + this.createReportOperationCallable = + callableFactory.createOperationCallable( + createReportTransportSettings, + settings.createReportOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getReportCallable = + callableFactory.createUnaryCallable( + getReportTransportSettings, settings.getReportSettings(), clientContext); + this.listReportsCallable = + callableFactory.createUnaryCallable( + listReportsTransportSettings, settings.listReportsSettings(), clientContext); + this.listReportsPagedCallable = + callableFactory.createPagedCallable( + listReportsTransportSettings, settings.listReportsSettings(), clientContext); + this.deleteReportCallable = + callableFactory.createUnaryCallable( + deleteReportTransportSettings, settings.deleteReportSettings(), clientContext); + this.deleteReportOperationCallable = + callableFactory.createOperationCallable( + deleteReportTransportSettings, + settings.deleteReportOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listAssetsMethodDescriptor); + methodDescriptors.add(getAssetMethodDescriptor); + methodDescriptors.add(updateAssetMethodDescriptor); + methodDescriptors.add(batchUpdateAssetsMethodDescriptor); + methodDescriptors.add(deleteAssetMethodDescriptor); + methodDescriptors.add(batchDeleteAssetsMethodDescriptor); + methodDescriptors.add(reportAssetFramesMethodDescriptor); + methodDescriptors.add(aggregateAssetsValuesMethodDescriptor); + methodDescriptors.add(createImportJobMethodDescriptor); + methodDescriptors.add(listImportJobsMethodDescriptor); + methodDescriptors.add(getImportJobMethodDescriptor); + methodDescriptors.add(deleteImportJobMethodDescriptor); + methodDescriptors.add(updateImportJobMethodDescriptor); + methodDescriptors.add(validateImportJobMethodDescriptor); + methodDescriptors.add(runImportJobMethodDescriptor); + methodDescriptors.add(getImportDataFileMethodDescriptor); + methodDescriptors.add(listImportDataFilesMethodDescriptor); + methodDescriptors.add(createImportDataFileMethodDescriptor); + methodDescriptors.add(deleteImportDataFileMethodDescriptor); + methodDescriptors.add(listGroupsMethodDescriptor); + methodDescriptors.add(getGroupMethodDescriptor); + methodDescriptors.add(createGroupMethodDescriptor); + methodDescriptors.add(updateGroupMethodDescriptor); + methodDescriptors.add(deleteGroupMethodDescriptor); + methodDescriptors.add(addAssetsToGroupMethodDescriptor); + methodDescriptors.add(removeAssetsFromGroupMethodDescriptor); + methodDescriptors.add(listErrorFramesMethodDescriptor); + methodDescriptors.add(getErrorFrameMethodDescriptor); + methodDescriptors.add(listSourcesMethodDescriptor); + methodDescriptors.add(getSourceMethodDescriptor); + methodDescriptors.add(createSourceMethodDescriptor); + methodDescriptors.add(updateSourceMethodDescriptor); + methodDescriptors.add(deleteSourceMethodDescriptor); + methodDescriptors.add(listPreferenceSetsMethodDescriptor); + methodDescriptors.add(getPreferenceSetMethodDescriptor); + methodDescriptors.add(createPreferenceSetMethodDescriptor); + methodDescriptors.add(updatePreferenceSetMethodDescriptor); + methodDescriptors.add(deletePreferenceSetMethodDescriptor); + methodDescriptors.add(getSettingsMethodDescriptor); + methodDescriptors.add(updateSettingsMethodDescriptor); + methodDescriptors.add(createReportConfigMethodDescriptor); + methodDescriptors.add(getReportConfigMethodDescriptor); + methodDescriptors.add(listReportConfigsMethodDescriptor); + methodDescriptors.add(deleteReportConfigMethodDescriptor); + methodDescriptors.add(createReportMethodDescriptor); + methodDescriptors.add(getReportMethodDescriptor); + methodDescriptors.add(listReportsMethodDescriptor); + methodDescriptors.add(deleteReportMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listAssetsCallable() { + return listAssetsCallable; + } + + @Override + public UnaryCallable listAssetsPagedCallable() { + return listAssetsPagedCallable; + } + + @Override + public UnaryCallable getAssetCallable() { + return getAssetCallable; + } + + @Override + public UnaryCallable updateAssetCallable() { + return updateAssetCallable; + } + + @Override + public UnaryCallable + batchUpdateAssetsCallable() { + return batchUpdateAssetsCallable; + } + + @Override + public UnaryCallable deleteAssetCallable() { + return deleteAssetCallable; + } + + @Override + public UnaryCallable batchDeleteAssetsCallable() { + return batchDeleteAssetsCallable; + } + + @Override + public UnaryCallable + reportAssetFramesCallable() { + return reportAssetFramesCallable; + } + + @Override + public UnaryCallable + aggregateAssetsValuesCallable() { + return aggregateAssetsValuesCallable; + } + + @Override + public UnaryCallable createImportJobCallable() { + return createImportJobCallable; + } + + @Override + public OperationCallable + createImportJobOperationCallable() { + return createImportJobOperationCallable; + } + + @Override + public UnaryCallable listImportJobsCallable() { + return listImportJobsCallable; + } + + @Override + public UnaryCallable + listImportJobsPagedCallable() { + return listImportJobsPagedCallable; + } + + @Override + public UnaryCallable getImportJobCallable() { + return getImportJobCallable; + } + + @Override + public UnaryCallable deleteImportJobCallable() { + return deleteImportJobCallable; + } + + @Override + public OperationCallable + deleteImportJobOperationCallable() { + return deleteImportJobOperationCallable; + } + + @Override + public UnaryCallable updateImportJobCallable() { + return updateImportJobCallable; + } + + @Override + public OperationCallable + updateImportJobOperationCallable() { + return updateImportJobOperationCallable; + } + + @Override + public UnaryCallable validateImportJobCallable() { + return validateImportJobCallable; + } + + @Override + public OperationCallable + validateImportJobOperationCallable() { + return validateImportJobOperationCallable; + } + + @Override + public UnaryCallable runImportJobCallable() { + return runImportJobCallable; + } + + @Override + public OperationCallable + runImportJobOperationCallable() { + return runImportJobOperationCallable; + } + + @Override + public UnaryCallable getImportDataFileCallable() { + return getImportDataFileCallable; + } + + @Override + public UnaryCallable + listImportDataFilesCallable() { + return listImportDataFilesCallable; + } + + @Override + public UnaryCallable + listImportDataFilesPagedCallable() { + return listImportDataFilesPagedCallable; + } + + @Override + public UnaryCallable createImportDataFileCallable() { + return createImportDataFileCallable; + } + + @Override + public OperationCallable + createImportDataFileOperationCallable() { + return createImportDataFileOperationCallable; + } + + @Override + public UnaryCallable deleteImportDataFileCallable() { + return deleteImportDataFileCallable; + } + + @Override + public OperationCallable + deleteImportDataFileOperationCallable() { + return deleteImportDataFileOperationCallable; + } + + @Override + public UnaryCallable listGroupsCallable() { + return listGroupsCallable; + } + + @Override + public UnaryCallable listGroupsPagedCallable() { + return listGroupsPagedCallable; + } + + @Override + public UnaryCallable getGroupCallable() { + return getGroupCallable; + } + + @Override + public UnaryCallable createGroupCallable() { + return createGroupCallable; + } + + @Override + public OperationCallable + createGroupOperationCallable() { + return createGroupOperationCallable; + } + + @Override + public UnaryCallable updateGroupCallable() { + return updateGroupCallable; + } + + @Override + public OperationCallable + updateGroupOperationCallable() { + return updateGroupOperationCallable; + } + + @Override + public UnaryCallable deleteGroupCallable() { + return deleteGroupCallable; + } + + @Override + public OperationCallable + deleteGroupOperationCallable() { + return deleteGroupOperationCallable; + } + + @Override + public UnaryCallable addAssetsToGroupCallable() { + return addAssetsToGroupCallable; + } + + @Override + public OperationCallable + addAssetsToGroupOperationCallable() { + return addAssetsToGroupOperationCallable; + } + + @Override + public UnaryCallable removeAssetsFromGroupCallable() { + return removeAssetsFromGroupCallable; + } + + @Override + public OperationCallable + removeAssetsFromGroupOperationCallable() { + return removeAssetsFromGroupOperationCallable; + } + + @Override + public UnaryCallable listErrorFramesCallable() { + return listErrorFramesCallable; + } + + @Override + public UnaryCallable + listErrorFramesPagedCallable() { + return listErrorFramesPagedCallable; + } + + @Override + public UnaryCallable getErrorFrameCallable() { + return getErrorFrameCallable; + } + + @Override + public UnaryCallable listSourcesCallable() { + return listSourcesCallable; + } + + @Override + public UnaryCallable listSourcesPagedCallable() { + return listSourcesPagedCallable; + } + + @Override + public UnaryCallable getSourceCallable() { + return getSourceCallable; + } + + @Override + public UnaryCallable createSourceCallable() { + return createSourceCallable; + } + + @Override + public OperationCallable + createSourceOperationCallable() { + return createSourceOperationCallable; + } + + @Override + public UnaryCallable updateSourceCallable() { + return updateSourceCallable; + } + + @Override + public OperationCallable + updateSourceOperationCallable() { + return updateSourceOperationCallable; + } + + @Override + public UnaryCallable deleteSourceCallable() { + return deleteSourceCallable; + } + + @Override + public OperationCallable + deleteSourceOperationCallable() { + return deleteSourceOperationCallable; + } + + @Override + public UnaryCallable + listPreferenceSetsCallable() { + return listPreferenceSetsCallable; + } + + @Override + public UnaryCallable + listPreferenceSetsPagedCallable() { + return listPreferenceSetsPagedCallable; + } + + @Override + public UnaryCallable getPreferenceSetCallable() { + return getPreferenceSetCallable; + } + + @Override + public UnaryCallable createPreferenceSetCallable() { + return createPreferenceSetCallable; + } + + @Override + public OperationCallable + createPreferenceSetOperationCallable() { + return createPreferenceSetOperationCallable; + } + + @Override + public UnaryCallable updatePreferenceSetCallable() { + return updatePreferenceSetCallable; + } + + @Override + public OperationCallable + updatePreferenceSetOperationCallable() { + return updatePreferenceSetOperationCallable; + } + + @Override + public UnaryCallable deletePreferenceSetCallable() { + return deletePreferenceSetCallable; + } + + @Override + public OperationCallable + deletePreferenceSetOperationCallable() { + return deletePreferenceSetOperationCallable; + } + + @Override + public UnaryCallable getSettingsCallable() { + return getSettingsCallable; + } + + @Override + public UnaryCallable updateSettingsCallable() { + return updateSettingsCallable; + } + + @Override + public OperationCallable + updateSettingsOperationCallable() { + return updateSettingsOperationCallable; + } + + @Override + public UnaryCallable createReportConfigCallable() { + return createReportConfigCallable; + } + + @Override + public OperationCallable + createReportConfigOperationCallable() { + return createReportConfigOperationCallable; + } + + @Override + public UnaryCallable getReportConfigCallable() { + return getReportConfigCallable; + } + + @Override + public UnaryCallable + listReportConfigsCallable() { + return listReportConfigsCallable; + } + + @Override + public UnaryCallable + listReportConfigsPagedCallable() { + return listReportConfigsPagedCallable; + } + + @Override + public UnaryCallable deleteReportConfigCallable() { + return deleteReportConfigCallable; + } + + @Override + public OperationCallable + deleteReportConfigOperationCallable() { + return deleteReportConfigOperationCallable; + } + + @Override + public UnaryCallable createReportCallable() { + return createReportCallable; + } + + @Override + public OperationCallable + createReportOperationCallable() { + return createReportOperationCallable; + } + + @Override + public UnaryCallable getReportCallable() { + return getReportCallable; + } + + @Override + public UnaryCallable listReportsCallable() { + return listReportsCallable; + } + + @Override + public UnaryCallable listReportsPagedCallable() { + return listReportsPagedCallable; + } + + @Override + public UnaryCallable deleteReportCallable() { + return deleteReportCallable; + } + + @Override + public OperationCallable + deleteReportOperationCallable() { + return deleteReportOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/MigrationCenterStub.java b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/MigrationCenterStub.java new file mode 100644 index 000000000000..16ccb42cd532 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/MigrationCenterStub.java @@ -0,0 +1,508 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.stub; + +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListAssetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListErrorFramesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListGroupsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportDataFilesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportJobsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListLocationsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListPreferenceSetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportConfigsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListSourcesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest; +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest; +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse; +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest; +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest; +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse; +import com.google.cloud.migrationcenter.v1.CreateGroupRequest; +import com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.CreateImportJobRequest; +import com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.CreateReportConfigRequest; +import com.google.cloud.migrationcenter.v1.CreateReportRequest; +import com.google.cloud.migrationcenter.v1.CreateSourceRequest; +import com.google.cloud.migrationcenter.v1.DeleteAssetRequest; +import com.google.cloud.migrationcenter.v1.DeleteGroupRequest; +import com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.DeleteImportJobRequest; +import com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest; +import com.google.cloud.migrationcenter.v1.DeleteReportRequest; +import com.google.cloud.migrationcenter.v1.DeleteSourceRequest; +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.GetAssetRequest; +import com.google.cloud.migrationcenter.v1.GetErrorFrameRequest; +import com.google.cloud.migrationcenter.v1.GetGroupRequest; +import com.google.cloud.migrationcenter.v1.GetImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.GetImportJobRequest; +import com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.GetReportConfigRequest; +import com.google.cloud.migrationcenter.v1.GetReportRequest; +import com.google.cloud.migrationcenter.v1.GetSettingsRequest; +import com.google.cloud.migrationcenter.v1.GetSourceRequest; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.ListAssetsRequest; +import com.google.cloud.migrationcenter.v1.ListAssetsResponse; +import com.google.cloud.migrationcenter.v1.ListErrorFramesRequest; +import com.google.cloud.migrationcenter.v1.ListErrorFramesResponse; +import com.google.cloud.migrationcenter.v1.ListGroupsRequest; +import com.google.cloud.migrationcenter.v1.ListGroupsResponse; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse; +import com.google.cloud.migrationcenter.v1.ListImportJobsRequest; +import com.google.cloud.migrationcenter.v1.ListImportJobsResponse; +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest; +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse; +import com.google.cloud.migrationcenter.v1.ListReportConfigsRequest; +import com.google.cloud.migrationcenter.v1.ListReportConfigsResponse; +import com.google.cloud.migrationcenter.v1.ListReportsRequest; +import com.google.cloud.migrationcenter.v1.ListReportsResponse; +import com.google.cloud.migrationcenter.v1.ListSourcesRequest; +import com.google.cloud.migrationcenter.v1.ListSourcesResponse; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse; +import com.google.cloud.migrationcenter.v1.ReportConfig; +import com.google.cloud.migrationcenter.v1.RunImportJobRequest; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.cloud.migrationcenter.v1.UpdateAssetRequest; +import com.google.cloud.migrationcenter.v1.UpdateGroupRequest; +import com.google.cloud.migrationcenter.v1.UpdateImportJobRequest; +import com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.UpdateSettingsRequest; +import com.google.cloud.migrationcenter.v1.UpdateSourceRequest; +import com.google.cloud.migrationcenter.v1.ValidateImportJobRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the MigrationCenter service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class MigrationCenterStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable listAssetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAssetsPagedCallable()"); + } + + public UnaryCallable listAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: listAssetsCallable()"); + } + + public UnaryCallable getAssetCallable() { + throw new UnsupportedOperationException("Not implemented: getAssetCallable()"); + } + + public UnaryCallable updateAssetCallable() { + throw new UnsupportedOperationException("Not implemented: updateAssetCallable()"); + } + + public UnaryCallable + batchUpdateAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: batchUpdateAssetsCallable()"); + } + + public UnaryCallable deleteAssetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAssetCallable()"); + } + + public UnaryCallable batchDeleteAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeleteAssetsCallable()"); + } + + public UnaryCallable + reportAssetFramesCallable() { + throw new UnsupportedOperationException("Not implemented: reportAssetFramesCallable()"); + } + + public UnaryCallable + aggregateAssetsValuesCallable() { + throw new UnsupportedOperationException("Not implemented: aggregateAssetsValuesCallable()"); + } + + public OperationCallable + createImportJobOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createImportJobOperationCallable()"); + } + + public UnaryCallable createImportJobCallable() { + throw new UnsupportedOperationException("Not implemented: createImportJobCallable()"); + } + + public UnaryCallable + listImportJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listImportJobsPagedCallable()"); + } + + public UnaryCallable listImportJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listImportJobsCallable()"); + } + + public UnaryCallable getImportJobCallable() { + throw new UnsupportedOperationException("Not implemented: getImportJobCallable()"); + } + + public OperationCallable + deleteImportJobOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteImportJobOperationCallable()"); + } + + public UnaryCallable deleteImportJobCallable() { + throw new UnsupportedOperationException("Not implemented: deleteImportJobCallable()"); + } + + public OperationCallable + updateImportJobOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateImportJobOperationCallable()"); + } + + public UnaryCallable updateImportJobCallable() { + throw new UnsupportedOperationException("Not implemented: updateImportJobCallable()"); + } + + public OperationCallable + validateImportJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: validateImportJobOperationCallable()"); + } + + public UnaryCallable validateImportJobCallable() { + throw new UnsupportedOperationException("Not implemented: validateImportJobCallable()"); + } + + public OperationCallable + runImportJobOperationCallable() { + throw new UnsupportedOperationException("Not implemented: runImportJobOperationCallable()"); + } + + public UnaryCallable runImportJobCallable() { + throw new UnsupportedOperationException("Not implemented: runImportJobCallable()"); + } + + public UnaryCallable getImportDataFileCallable() { + throw new UnsupportedOperationException("Not implemented: getImportDataFileCallable()"); + } + + public UnaryCallable + listImportDataFilesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listImportDataFilesPagedCallable()"); + } + + public UnaryCallable + listImportDataFilesCallable() { + throw new UnsupportedOperationException("Not implemented: listImportDataFilesCallable()"); + } + + public OperationCallable + createImportDataFileOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createImportDataFileOperationCallable()"); + } + + public UnaryCallable createImportDataFileCallable() { + throw new UnsupportedOperationException("Not implemented: createImportDataFileCallable()"); + } + + public OperationCallable + deleteImportDataFileOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteImportDataFileOperationCallable()"); + } + + public UnaryCallable deleteImportDataFileCallable() { + throw new UnsupportedOperationException("Not implemented: deleteImportDataFileCallable()"); + } + + public UnaryCallable listGroupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listGroupsPagedCallable()"); + } + + public UnaryCallable listGroupsCallable() { + throw new UnsupportedOperationException("Not implemented: listGroupsCallable()"); + } + + public UnaryCallable getGroupCallable() { + throw new UnsupportedOperationException("Not implemented: getGroupCallable()"); + } + + public OperationCallable + createGroupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createGroupOperationCallable()"); + } + + public UnaryCallable createGroupCallable() { + throw new UnsupportedOperationException("Not implemented: createGroupCallable()"); + } + + public OperationCallable + updateGroupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateGroupOperationCallable()"); + } + + public UnaryCallable updateGroupCallable() { + throw new UnsupportedOperationException("Not implemented: updateGroupCallable()"); + } + + public OperationCallable + deleteGroupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteGroupOperationCallable()"); + } + + public UnaryCallable deleteGroupCallable() { + throw new UnsupportedOperationException("Not implemented: deleteGroupCallable()"); + } + + public OperationCallable + addAssetsToGroupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: addAssetsToGroupOperationCallable()"); + } + + public UnaryCallable addAssetsToGroupCallable() { + throw new UnsupportedOperationException("Not implemented: addAssetsToGroupCallable()"); + } + + public OperationCallable + removeAssetsFromGroupOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: removeAssetsFromGroupOperationCallable()"); + } + + public UnaryCallable removeAssetsFromGroupCallable() { + throw new UnsupportedOperationException("Not implemented: removeAssetsFromGroupCallable()"); + } + + public UnaryCallable + listErrorFramesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listErrorFramesPagedCallable()"); + } + + public UnaryCallable listErrorFramesCallable() { + throw new UnsupportedOperationException("Not implemented: listErrorFramesCallable()"); + } + + public UnaryCallable getErrorFrameCallable() { + throw new UnsupportedOperationException("Not implemented: getErrorFrameCallable()"); + } + + public UnaryCallable listSourcesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSourcesPagedCallable()"); + } + + public UnaryCallable listSourcesCallable() { + throw new UnsupportedOperationException("Not implemented: listSourcesCallable()"); + } + + public UnaryCallable getSourceCallable() { + throw new UnsupportedOperationException("Not implemented: getSourceCallable()"); + } + + public OperationCallable + createSourceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createSourceOperationCallable()"); + } + + public UnaryCallable createSourceCallable() { + throw new UnsupportedOperationException("Not implemented: createSourceCallable()"); + } + + public OperationCallable + updateSourceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateSourceOperationCallable()"); + } + + public UnaryCallable updateSourceCallable() { + throw new UnsupportedOperationException("Not implemented: updateSourceCallable()"); + } + + public OperationCallable + deleteSourceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSourceOperationCallable()"); + } + + public UnaryCallable deleteSourceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSourceCallable()"); + } + + public UnaryCallable + listPreferenceSetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPreferenceSetsPagedCallable()"); + } + + public UnaryCallable + listPreferenceSetsCallable() { + throw new UnsupportedOperationException("Not implemented: listPreferenceSetsCallable()"); + } + + public UnaryCallable getPreferenceSetCallable() { + throw new UnsupportedOperationException("Not implemented: getPreferenceSetCallable()"); + } + + public OperationCallable + createPreferenceSetOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createPreferenceSetOperationCallable()"); + } + + public UnaryCallable createPreferenceSetCallable() { + throw new UnsupportedOperationException("Not implemented: createPreferenceSetCallable()"); + } + + public OperationCallable + updatePreferenceSetOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updatePreferenceSetOperationCallable()"); + } + + public UnaryCallable updatePreferenceSetCallable() { + throw new UnsupportedOperationException("Not implemented: updatePreferenceSetCallable()"); + } + + public OperationCallable + deletePreferenceSetOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deletePreferenceSetOperationCallable()"); + } + + public UnaryCallable deletePreferenceSetCallable() { + throw new UnsupportedOperationException("Not implemented: deletePreferenceSetCallable()"); + } + + public UnaryCallable getSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: getSettingsCallable()"); + } + + public OperationCallable + updateSettingsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateSettingsOperationCallable()"); + } + + public UnaryCallable updateSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: updateSettingsCallable()"); + } + + public OperationCallable + createReportConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createReportConfigOperationCallable()"); + } + + public UnaryCallable createReportConfigCallable() { + throw new UnsupportedOperationException("Not implemented: createReportConfigCallable()"); + } + + public UnaryCallable getReportConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getReportConfigCallable()"); + } + + public UnaryCallable + listReportConfigsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listReportConfigsPagedCallable()"); + } + + public UnaryCallable + listReportConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listReportConfigsCallable()"); + } + + public OperationCallable + deleteReportConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteReportConfigOperationCallable()"); + } + + public UnaryCallable deleteReportConfigCallable() { + throw new UnsupportedOperationException("Not implemented: deleteReportConfigCallable()"); + } + + public OperationCallable + createReportOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createReportOperationCallable()"); + } + + public UnaryCallable createReportCallable() { + throw new UnsupportedOperationException("Not implemented: createReportCallable()"); + } + + public UnaryCallable getReportCallable() { + throw new UnsupportedOperationException("Not implemented: getReportCallable()"); + } + + public UnaryCallable listReportsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listReportsPagedCallable()"); + } + + public UnaryCallable listReportsCallable() { + throw new UnsupportedOperationException("Not implemented: listReportsCallable()"); + } + + public OperationCallable + deleteReportOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteReportOperationCallable()"); + } + + public UnaryCallable deleteReportCallable() { + throw new UnsupportedOperationException("Not implemented: deleteReportCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/MigrationCenterStubSettings.java b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/MigrationCenterStubSettings.java new file mode 100644 index 000000000000..e79cc9279de7 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/stub/MigrationCenterStubSettings.java @@ -0,0 +1,3255 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.stub; + +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListAssetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListErrorFramesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListGroupsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportDataFilesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportJobsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListLocationsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListPreferenceSetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportConfigsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListSourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest; +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest; +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse; +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest; +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest; +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse; +import com.google.cloud.migrationcenter.v1.CreateGroupRequest; +import com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.CreateImportJobRequest; +import com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.CreateReportConfigRequest; +import com.google.cloud.migrationcenter.v1.CreateReportRequest; +import com.google.cloud.migrationcenter.v1.CreateSourceRequest; +import com.google.cloud.migrationcenter.v1.DeleteAssetRequest; +import com.google.cloud.migrationcenter.v1.DeleteGroupRequest; +import com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.DeleteImportJobRequest; +import com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest; +import com.google.cloud.migrationcenter.v1.DeleteReportRequest; +import com.google.cloud.migrationcenter.v1.DeleteSourceRequest; +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.GetAssetRequest; +import com.google.cloud.migrationcenter.v1.GetErrorFrameRequest; +import com.google.cloud.migrationcenter.v1.GetGroupRequest; +import com.google.cloud.migrationcenter.v1.GetImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.GetImportJobRequest; +import com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.GetReportConfigRequest; +import com.google.cloud.migrationcenter.v1.GetReportRequest; +import com.google.cloud.migrationcenter.v1.GetSettingsRequest; +import com.google.cloud.migrationcenter.v1.GetSourceRequest; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.ListAssetsRequest; +import com.google.cloud.migrationcenter.v1.ListAssetsResponse; +import com.google.cloud.migrationcenter.v1.ListErrorFramesRequest; +import com.google.cloud.migrationcenter.v1.ListErrorFramesResponse; +import com.google.cloud.migrationcenter.v1.ListGroupsRequest; +import com.google.cloud.migrationcenter.v1.ListGroupsResponse; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse; +import com.google.cloud.migrationcenter.v1.ListImportJobsRequest; +import com.google.cloud.migrationcenter.v1.ListImportJobsResponse; +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest; +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse; +import com.google.cloud.migrationcenter.v1.ListReportConfigsRequest; +import com.google.cloud.migrationcenter.v1.ListReportConfigsResponse; +import com.google.cloud.migrationcenter.v1.ListReportsRequest; +import com.google.cloud.migrationcenter.v1.ListReportsResponse; +import com.google.cloud.migrationcenter.v1.ListSourcesRequest; +import com.google.cloud.migrationcenter.v1.ListSourcesResponse; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse; +import com.google.cloud.migrationcenter.v1.ReportConfig; +import com.google.cloud.migrationcenter.v1.RunImportJobRequest; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.cloud.migrationcenter.v1.UpdateAssetRequest; +import com.google.cloud.migrationcenter.v1.UpdateGroupRequest; +import com.google.cloud.migrationcenter.v1.UpdateImportJobRequest; +import com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.UpdateSettingsRequest; +import com.google.cloud.migrationcenter.v1.UpdateSourceRequest; +import com.google.cloud.migrationcenter.v1.ValidateImportJobRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link MigrationCenterStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (migrationcenter.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getAsset to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MigrationCenterStubSettings.Builder migrationCenterSettingsBuilder =
+ *     MigrationCenterStubSettings.newBuilder();
+ * migrationCenterSettingsBuilder
+ *     .getAssetSettings()
+ *     .setRetrySettings(
+ *         migrationCenterSettingsBuilder
+ *             .getAssetSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * MigrationCenterStubSettings migrationCenterSettings = migrationCenterSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class MigrationCenterStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings + listAssetsSettings; + private final UnaryCallSettings getAssetSettings; + private final UnaryCallSettings updateAssetSettings; + private final UnaryCallSettings + batchUpdateAssetsSettings; + private final UnaryCallSettings deleteAssetSettings; + private final UnaryCallSettings batchDeleteAssetsSettings; + private final UnaryCallSettings + reportAssetFramesSettings; + private final UnaryCallSettings + aggregateAssetsValuesSettings; + private final UnaryCallSettings createImportJobSettings; + private final OperationCallSettings + createImportJobOperationSettings; + private final PagedCallSettings< + ListImportJobsRequest, ListImportJobsResponse, ListImportJobsPagedResponse> + listImportJobsSettings; + private final UnaryCallSettings getImportJobSettings; + private final UnaryCallSettings deleteImportJobSettings; + private final OperationCallSettings + deleteImportJobOperationSettings; + private final UnaryCallSettings updateImportJobSettings; + private final OperationCallSettings + updateImportJobOperationSettings; + private final UnaryCallSettings validateImportJobSettings; + private final OperationCallSettings + validateImportJobOperationSettings; + private final UnaryCallSettings runImportJobSettings; + private final OperationCallSettings + runImportJobOperationSettings; + private final UnaryCallSettings + getImportDataFileSettings; + private final PagedCallSettings< + ListImportDataFilesRequest, ListImportDataFilesResponse, ListImportDataFilesPagedResponse> + listImportDataFilesSettings; + private final UnaryCallSettings + createImportDataFileSettings; + private final OperationCallSettings< + CreateImportDataFileRequest, ImportDataFile, OperationMetadata> + createImportDataFileOperationSettings; + private final UnaryCallSettings + deleteImportDataFileSettings; + private final OperationCallSettings + deleteImportDataFileOperationSettings; + private final PagedCallSettings + listGroupsSettings; + private final UnaryCallSettings getGroupSettings; + private final UnaryCallSettings createGroupSettings; + private final OperationCallSettings + createGroupOperationSettings; + private final UnaryCallSettings updateGroupSettings; + private final OperationCallSettings + updateGroupOperationSettings; + private final UnaryCallSettings deleteGroupSettings; + private final OperationCallSettings + deleteGroupOperationSettings; + private final UnaryCallSettings addAssetsToGroupSettings; + private final OperationCallSettings + addAssetsToGroupOperationSettings; + private final UnaryCallSettings + removeAssetsFromGroupSettings; + private final OperationCallSettings + removeAssetsFromGroupOperationSettings; + private final PagedCallSettings< + ListErrorFramesRequest, ListErrorFramesResponse, ListErrorFramesPagedResponse> + listErrorFramesSettings; + private final UnaryCallSettings getErrorFrameSettings; + private final PagedCallSettings + listSourcesSettings; + private final UnaryCallSettings getSourceSettings; + private final UnaryCallSettings createSourceSettings; + private final OperationCallSettings + createSourceOperationSettings; + private final UnaryCallSettings updateSourceSettings; + private final OperationCallSettings + updateSourceOperationSettings; + private final UnaryCallSettings deleteSourceSettings; + private final OperationCallSettings + deleteSourceOperationSettings; + private final PagedCallSettings< + ListPreferenceSetsRequest, ListPreferenceSetsResponse, ListPreferenceSetsPagedResponse> + listPreferenceSetsSettings; + private final UnaryCallSettings getPreferenceSetSettings; + private final UnaryCallSettings + createPreferenceSetSettings; + private final OperationCallSettings + createPreferenceSetOperationSettings; + private final UnaryCallSettings + updatePreferenceSetSettings; + private final OperationCallSettings + updatePreferenceSetOperationSettings; + private final UnaryCallSettings + deletePreferenceSetSettings; + private final OperationCallSettings + deletePreferenceSetOperationSettings; + private final UnaryCallSettings getSettingsSettings; + private final UnaryCallSettings updateSettingsSettings; + private final OperationCallSettings + updateSettingsOperationSettings; + private final UnaryCallSettings createReportConfigSettings; + private final OperationCallSettings + createReportConfigOperationSettings; + private final UnaryCallSettings getReportConfigSettings; + private final PagedCallSettings< + ListReportConfigsRequest, ListReportConfigsResponse, ListReportConfigsPagedResponse> + listReportConfigsSettings; + private final UnaryCallSettings deleteReportConfigSettings; + private final OperationCallSettings + deleteReportConfigOperationSettings; + private final UnaryCallSettings createReportSettings; + private final OperationCallSettings + createReportOperationSettings; + private final UnaryCallSettings getReportSettings; + private final PagedCallSettings + listReportsSettings; + private final UnaryCallSettings deleteReportSettings; + private final OperationCallSettings + deleteReportOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_ASSETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAssetsRequest injectToken(ListAssetsRequest payload, String token) { + return ListAssetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAssetsRequest injectPageSize(ListAssetsRequest payload, int pageSize) { + return ListAssetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAssetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAssetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAssetsResponse payload) { + return payload.getAssetsList() == null + ? ImmutableList.of() + : payload.getAssetsList(); + } + }; + + private static final PagedListDescriptor + LIST_IMPORT_JOBS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListImportJobsRequest injectToken(ListImportJobsRequest payload, String token) { + return ListImportJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListImportJobsRequest injectPageSize( + ListImportJobsRequest payload, int pageSize) { + return ListImportJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListImportJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListImportJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListImportJobsResponse payload) { + return payload.getImportJobsList() == null + ? ImmutableList.of() + : payload.getImportJobsList(); + } + }; + + private static final PagedListDescriptor< + ListImportDataFilesRequest, ListImportDataFilesResponse, ImportDataFile> + LIST_IMPORT_DATA_FILES_PAGE_STR_DESC = + new PagedListDescriptor< + ListImportDataFilesRequest, ListImportDataFilesResponse, ImportDataFile>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListImportDataFilesRequest injectToken( + ListImportDataFilesRequest payload, String token) { + return ListImportDataFilesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListImportDataFilesRequest injectPageSize( + ListImportDataFilesRequest payload, int pageSize) { + return ListImportDataFilesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListImportDataFilesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListImportDataFilesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListImportDataFilesResponse payload) { + return payload.getImportDataFilesList() == null + ? ImmutableList.of() + : payload.getImportDataFilesList(); + } + }; + + private static final PagedListDescriptor + LIST_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListGroupsRequest injectToken(ListGroupsRequest payload, String token) { + return ListGroupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListGroupsRequest injectPageSize(ListGroupsRequest payload, int pageSize) { + return ListGroupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListGroupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListGroupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListGroupsResponse payload) { + return payload.getGroupsList() == null + ? ImmutableList.of() + : payload.getGroupsList(); + } + }; + + private static final PagedListDescriptor< + ListErrorFramesRequest, ListErrorFramesResponse, ErrorFrame> + LIST_ERROR_FRAMES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListErrorFramesRequest injectToken( + ListErrorFramesRequest payload, String token) { + return ListErrorFramesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListErrorFramesRequest injectPageSize( + ListErrorFramesRequest payload, int pageSize) { + return ListErrorFramesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListErrorFramesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListErrorFramesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListErrorFramesResponse payload) { + return payload.getErrorFramesList() == null + ? ImmutableList.of() + : payload.getErrorFramesList(); + } + }; + + private static final PagedListDescriptor + LIST_SOURCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSourcesRequest injectToken(ListSourcesRequest payload, String token) { + return ListSourcesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSourcesRequest injectPageSize(ListSourcesRequest payload, int pageSize) { + return ListSourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSourcesResponse payload) { + return payload.getSourcesList() == null + ? ImmutableList.of() + : payload.getSourcesList(); + } + }; + + private static final PagedListDescriptor< + ListPreferenceSetsRequest, ListPreferenceSetsResponse, PreferenceSet> + LIST_PREFERENCE_SETS_PAGE_STR_DESC = + new PagedListDescriptor< + ListPreferenceSetsRequest, ListPreferenceSetsResponse, PreferenceSet>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPreferenceSetsRequest injectToken( + ListPreferenceSetsRequest payload, String token) { + return ListPreferenceSetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPreferenceSetsRequest injectPageSize( + ListPreferenceSetsRequest payload, int pageSize) { + return ListPreferenceSetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPreferenceSetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPreferenceSetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPreferenceSetsResponse payload) { + return payload.getPreferenceSetsList() == null + ? ImmutableList.of() + : payload.getPreferenceSetsList(); + } + }; + + private static final PagedListDescriptor< + ListReportConfigsRequest, ListReportConfigsResponse, ReportConfig> + LIST_REPORT_CONFIGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListReportConfigsRequest, ListReportConfigsResponse, ReportConfig>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListReportConfigsRequest injectToken( + ListReportConfigsRequest payload, String token) { + return ListReportConfigsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListReportConfigsRequest injectPageSize( + ListReportConfigsRequest payload, int pageSize) { + return ListReportConfigsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListReportConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListReportConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListReportConfigsResponse payload) { + return payload.getReportConfigsList() == null + ? ImmutableList.of() + : payload.getReportConfigsList(); + } + }; + + private static final PagedListDescriptor + LIST_REPORTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListReportsRequest injectToken(ListReportsRequest payload, String token) { + return ListReportsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListReportsRequest injectPageSize(ListReportsRequest payload, int pageSize) { + return ListReportsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListReportsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListReportsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListReportsResponse payload) { + return payload.getReportsList() == null + ? ImmutableList.of() + : payload.getReportsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> + LIST_ASSETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAssetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ASSETS_PAGE_STR_DESC, request, context); + return ListAssetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListImportJobsRequest, ListImportJobsResponse, ListImportJobsPagedResponse> + LIST_IMPORT_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListImportJobsRequest, ListImportJobsResponse, ListImportJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListImportJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_IMPORT_JOBS_PAGE_STR_DESC, request, context); + return ListImportJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListImportDataFilesRequest, ListImportDataFilesResponse, ListImportDataFilesPagedResponse> + LIST_IMPORT_DATA_FILES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListImportDataFilesRequest, + ListImportDataFilesResponse, + ListImportDataFilesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListImportDataFilesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_IMPORT_DATA_FILES_PAGE_STR_DESC, request, context); + return ListImportDataFilesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse> + LIST_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListGroupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_GROUPS_PAGE_STR_DESC, request, context); + return ListGroupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListErrorFramesRequest, ListErrorFramesResponse, ListErrorFramesPagedResponse> + LIST_ERROR_FRAMES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListErrorFramesRequest, ListErrorFramesResponse, ListErrorFramesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListErrorFramesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ERROR_FRAMES_PAGE_STR_DESC, request, context); + return ListErrorFramesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> + LIST_SOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SOURCES_PAGE_STR_DESC, request, context); + return ListSourcesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListPreferenceSetsRequest, ListPreferenceSetsResponse, ListPreferenceSetsPagedResponse> + LIST_PREFERENCE_SETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPreferenceSetsRequest, + ListPreferenceSetsResponse, + ListPreferenceSetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPreferenceSetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_PREFERENCE_SETS_PAGE_STR_DESC, request, context); + return ListPreferenceSetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListReportConfigsRequest, ListReportConfigsResponse, ListReportConfigsPagedResponse> + LIST_REPORT_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListReportConfigsRequest, + ListReportConfigsResponse, + ListReportConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListReportConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_REPORT_CONFIGS_PAGE_STR_DESC, request, context); + return ListReportConfigsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListReportsRequest, ListReportsResponse, ListReportsPagedResponse> + LIST_REPORTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListReportsRequest, ListReportsResponse, ListReportsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListReportsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_REPORTS_PAGE_STR_DESC, request, context); + return ListReportsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listAssets. */ + public PagedCallSettings + listAssetsSettings() { + return listAssetsSettings; + } + + /** Returns the object with the settings used for calls to getAsset. */ + public UnaryCallSettings getAssetSettings() { + return getAssetSettings; + } + + /** Returns the object with the settings used for calls to updateAsset. */ + public UnaryCallSettings updateAssetSettings() { + return updateAssetSettings; + } + + /** Returns the object with the settings used for calls to batchUpdateAssets. */ + public UnaryCallSettings + batchUpdateAssetsSettings() { + return batchUpdateAssetsSettings; + } + + /** Returns the object with the settings used for calls to deleteAsset. */ + public UnaryCallSettings deleteAssetSettings() { + return deleteAssetSettings; + } + + /** Returns the object with the settings used for calls to batchDeleteAssets. */ + public UnaryCallSettings batchDeleteAssetsSettings() { + return batchDeleteAssetsSettings; + } + + /** Returns the object with the settings used for calls to reportAssetFrames. */ + public UnaryCallSettings + reportAssetFramesSettings() { + return reportAssetFramesSettings; + } + + /** Returns the object with the settings used for calls to aggregateAssetsValues. */ + public UnaryCallSettings + aggregateAssetsValuesSettings() { + return aggregateAssetsValuesSettings; + } + + /** Returns the object with the settings used for calls to createImportJob. */ + public UnaryCallSettings createImportJobSettings() { + return createImportJobSettings; + } + + /** Returns the object with the settings used for calls to createImportJob. */ + public OperationCallSettings + createImportJobOperationSettings() { + return createImportJobOperationSettings; + } + + /** Returns the object with the settings used for calls to listImportJobs. */ + public PagedCallSettings< + ListImportJobsRequest, ListImportJobsResponse, ListImportJobsPagedResponse> + listImportJobsSettings() { + return listImportJobsSettings; + } + + /** Returns the object with the settings used for calls to getImportJob. */ + public UnaryCallSettings getImportJobSettings() { + return getImportJobSettings; + } + + /** Returns the object with the settings used for calls to deleteImportJob. */ + public UnaryCallSettings deleteImportJobSettings() { + return deleteImportJobSettings; + } + + /** Returns the object with the settings used for calls to deleteImportJob. */ + public OperationCallSettings + deleteImportJobOperationSettings() { + return deleteImportJobOperationSettings; + } + + /** Returns the object with the settings used for calls to updateImportJob. */ + public UnaryCallSettings updateImportJobSettings() { + return updateImportJobSettings; + } + + /** Returns the object with the settings used for calls to updateImportJob. */ + public OperationCallSettings + updateImportJobOperationSettings() { + return updateImportJobOperationSettings; + } + + /** Returns the object with the settings used for calls to validateImportJob. */ + public UnaryCallSettings validateImportJobSettings() { + return validateImportJobSettings; + } + + /** Returns the object with the settings used for calls to validateImportJob. */ + public OperationCallSettings + validateImportJobOperationSettings() { + return validateImportJobOperationSettings; + } + + /** Returns the object with the settings used for calls to runImportJob. */ + public UnaryCallSettings runImportJobSettings() { + return runImportJobSettings; + } + + /** Returns the object with the settings used for calls to runImportJob. */ + public OperationCallSettings + runImportJobOperationSettings() { + return runImportJobOperationSettings; + } + + /** Returns the object with the settings used for calls to getImportDataFile. */ + public UnaryCallSettings getImportDataFileSettings() { + return getImportDataFileSettings; + } + + /** Returns the object with the settings used for calls to listImportDataFiles. */ + public PagedCallSettings< + ListImportDataFilesRequest, ListImportDataFilesResponse, ListImportDataFilesPagedResponse> + listImportDataFilesSettings() { + return listImportDataFilesSettings; + } + + /** Returns the object with the settings used for calls to createImportDataFile. */ + public UnaryCallSettings createImportDataFileSettings() { + return createImportDataFileSettings; + } + + /** Returns the object with the settings used for calls to createImportDataFile. */ + public OperationCallSettings + createImportDataFileOperationSettings() { + return createImportDataFileOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteImportDataFile. */ + public UnaryCallSettings deleteImportDataFileSettings() { + return deleteImportDataFileSettings; + } + + /** Returns the object with the settings used for calls to deleteImportDataFile. */ + public OperationCallSettings + deleteImportDataFileOperationSettings() { + return deleteImportDataFileOperationSettings; + } + + /** Returns the object with the settings used for calls to listGroups. */ + public PagedCallSettings + listGroupsSettings() { + return listGroupsSettings; + } + + /** Returns the object with the settings used for calls to getGroup. */ + public UnaryCallSettings getGroupSettings() { + return getGroupSettings; + } + + /** Returns the object with the settings used for calls to createGroup. */ + public UnaryCallSettings createGroupSettings() { + return createGroupSettings; + } + + /** Returns the object with the settings used for calls to createGroup. */ + public OperationCallSettings + createGroupOperationSettings() { + return createGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to updateGroup. */ + public UnaryCallSettings updateGroupSettings() { + return updateGroupSettings; + } + + /** Returns the object with the settings used for calls to updateGroup. */ + public OperationCallSettings + updateGroupOperationSettings() { + return updateGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteGroup. */ + public UnaryCallSettings deleteGroupSettings() { + return deleteGroupSettings; + } + + /** Returns the object with the settings used for calls to deleteGroup. */ + public OperationCallSettings + deleteGroupOperationSettings() { + return deleteGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to addAssetsToGroup. */ + public UnaryCallSettings addAssetsToGroupSettings() { + return addAssetsToGroupSettings; + } + + /** Returns the object with the settings used for calls to addAssetsToGroup. */ + public OperationCallSettings + addAssetsToGroupOperationSettings() { + return addAssetsToGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to removeAssetsFromGroup. */ + public UnaryCallSettings + removeAssetsFromGroupSettings() { + return removeAssetsFromGroupSettings; + } + + /** Returns the object with the settings used for calls to removeAssetsFromGroup. */ + public OperationCallSettings + removeAssetsFromGroupOperationSettings() { + return removeAssetsFromGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to listErrorFrames. */ + public PagedCallSettings< + ListErrorFramesRequest, ListErrorFramesResponse, ListErrorFramesPagedResponse> + listErrorFramesSettings() { + return listErrorFramesSettings; + } + + /** Returns the object with the settings used for calls to getErrorFrame. */ + public UnaryCallSettings getErrorFrameSettings() { + return getErrorFrameSettings; + } + + /** Returns the object with the settings used for calls to listSources. */ + public PagedCallSettings + listSourcesSettings() { + return listSourcesSettings; + } + + /** Returns the object with the settings used for calls to getSource. */ + public UnaryCallSettings getSourceSettings() { + return getSourceSettings; + } + + /** Returns the object with the settings used for calls to createSource. */ + public UnaryCallSettings createSourceSettings() { + return createSourceSettings; + } + + /** Returns the object with the settings used for calls to createSource. */ + public OperationCallSettings + createSourceOperationSettings() { + return createSourceOperationSettings; + } + + /** Returns the object with the settings used for calls to updateSource. */ + public UnaryCallSettings updateSourceSettings() { + return updateSourceSettings; + } + + /** Returns the object with the settings used for calls to updateSource. */ + public OperationCallSettings + updateSourceOperationSettings() { + return updateSourceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteSource. */ + public UnaryCallSettings deleteSourceSettings() { + return deleteSourceSettings; + } + + /** Returns the object with the settings used for calls to deleteSource. */ + public OperationCallSettings + deleteSourceOperationSettings() { + return deleteSourceOperationSettings; + } + + /** Returns the object with the settings used for calls to listPreferenceSets. */ + public PagedCallSettings< + ListPreferenceSetsRequest, ListPreferenceSetsResponse, ListPreferenceSetsPagedResponse> + listPreferenceSetsSettings() { + return listPreferenceSetsSettings; + } + + /** Returns the object with the settings used for calls to getPreferenceSet. */ + public UnaryCallSettings getPreferenceSetSettings() { + return getPreferenceSetSettings; + } + + /** Returns the object with the settings used for calls to createPreferenceSet. */ + public UnaryCallSettings createPreferenceSetSettings() { + return createPreferenceSetSettings; + } + + /** Returns the object with the settings used for calls to createPreferenceSet. */ + public OperationCallSettings + createPreferenceSetOperationSettings() { + return createPreferenceSetOperationSettings; + } + + /** Returns the object with the settings used for calls to updatePreferenceSet. */ + public UnaryCallSettings updatePreferenceSetSettings() { + return updatePreferenceSetSettings; + } + + /** Returns the object with the settings used for calls to updatePreferenceSet. */ + public OperationCallSettings + updatePreferenceSetOperationSettings() { + return updatePreferenceSetOperationSettings; + } + + /** Returns the object with the settings used for calls to deletePreferenceSet. */ + public UnaryCallSettings deletePreferenceSetSettings() { + return deletePreferenceSetSettings; + } + + /** Returns the object with the settings used for calls to deletePreferenceSet. */ + public OperationCallSettings + deletePreferenceSetOperationSettings() { + return deletePreferenceSetOperationSettings; + } + + /** Returns the object with the settings used for calls to getSettings. */ + public UnaryCallSettings getSettingsSettings() { + return getSettingsSettings; + } + + /** Returns the object with the settings used for calls to updateSettings. */ + public UnaryCallSettings updateSettingsSettings() { + return updateSettingsSettings; + } + + /** Returns the object with the settings used for calls to updateSettings. */ + public OperationCallSettings + updateSettingsOperationSettings() { + return updateSettingsOperationSettings; + } + + /** Returns the object with the settings used for calls to createReportConfig. */ + public UnaryCallSettings createReportConfigSettings() { + return createReportConfigSettings; + } + + /** Returns the object with the settings used for calls to createReportConfig. */ + public OperationCallSettings + createReportConfigOperationSettings() { + return createReportConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to getReportConfig. */ + public UnaryCallSettings getReportConfigSettings() { + return getReportConfigSettings; + } + + /** Returns the object with the settings used for calls to listReportConfigs. */ + public PagedCallSettings< + ListReportConfigsRequest, ListReportConfigsResponse, ListReportConfigsPagedResponse> + listReportConfigsSettings() { + return listReportConfigsSettings; + } + + /** Returns the object with the settings used for calls to deleteReportConfig. */ + public UnaryCallSettings deleteReportConfigSettings() { + return deleteReportConfigSettings; + } + + /** Returns the object with the settings used for calls to deleteReportConfig. */ + public OperationCallSettings + deleteReportConfigOperationSettings() { + return deleteReportConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to createReport. */ + public UnaryCallSettings createReportSettings() { + return createReportSettings; + } + + /** Returns the object with the settings used for calls to createReport. */ + public OperationCallSettings + createReportOperationSettings() { + return createReportOperationSettings; + } + + /** Returns the object with the settings used for calls to getReport. */ + public UnaryCallSettings getReportSettings() { + return getReportSettings; + } + + /** Returns the object with the settings used for calls to listReports. */ + public PagedCallSettings + listReportsSettings() { + return listReportsSettings; + } + + /** Returns the object with the settings used for calls to deleteReport. */ + public UnaryCallSettings deleteReportSettings() { + return deleteReportSettings; + } + + /** Returns the object with the settings used for calls to deleteReport. */ + public OperationCallSettings + deleteReportOperationSettings() { + return deleteReportOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public MigrationCenterStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcMigrationCenterStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonMigrationCenterStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "migrationcenter.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "migrationcenter.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(MigrationCenterStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(MigrationCenterStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return MigrationCenterStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected MigrationCenterStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listAssetsSettings = settingsBuilder.listAssetsSettings().build(); + getAssetSettings = settingsBuilder.getAssetSettings().build(); + updateAssetSettings = settingsBuilder.updateAssetSettings().build(); + batchUpdateAssetsSettings = settingsBuilder.batchUpdateAssetsSettings().build(); + deleteAssetSettings = settingsBuilder.deleteAssetSettings().build(); + batchDeleteAssetsSettings = settingsBuilder.batchDeleteAssetsSettings().build(); + reportAssetFramesSettings = settingsBuilder.reportAssetFramesSettings().build(); + aggregateAssetsValuesSettings = settingsBuilder.aggregateAssetsValuesSettings().build(); + createImportJobSettings = settingsBuilder.createImportJobSettings().build(); + createImportJobOperationSettings = settingsBuilder.createImportJobOperationSettings().build(); + listImportJobsSettings = settingsBuilder.listImportJobsSettings().build(); + getImportJobSettings = settingsBuilder.getImportJobSettings().build(); + deleteImportJobSettings = settingsBuilder.deleteImportJobSettings().build(); + deleteImportJobOperationSettings = settingsBuilder.deleteImportJobOperationSettings().build(); + updateImportJobSettings = settingsBuilder.updateImportJobSettings().build(); + updateImportJobOperationSettings = settingsBuilder.updateImportJobOperationSettings().build(); + validateImportJobSettings = settingsBuilder.validateImportJobSettings().build(); + validateImportJobOperationSettings = + settingsBuilder.validateImportJobOperationSettings().build(); + runImportJobSettings = settingsBuilder.runImportJobSettings().build(); + runImportJobOperationSettings = settingsBuilder.runImportJobOperationSettings().build(); + getImportDataFileSettings = settingsBuilder.getImportDataFileSettings().build(); + listImportDataFilesSettings = settingsBuilder.listImportDataFilesSettings().build(); + createImportDataFileSettings = settingsBuilder.createImportDataFileSettings().build(); + createImportDataFileOperationSettings = + settingsBuilder.createImportDataFileOperationSettings().build(); + deleteImportDataFileSettings = settingsBuilder.deleteImportDataFileSettings().build(); + deleteImportDataFileOperationSettings = + settingsBuilder.deleteImportDataFileOperationSettings().build(); + listGroupsSettings = settingsBuilder.listGroupsSettings().build(); + getGroupSettings = settingsBuilder.getGroupSettings().build(); + createGroupSettings = settingsBuilder.createGroupSettings().build(); + createGroupOperationSettings = settingsBuilder.createGroupOperationSettings().build(); + updateGroupSettings = settingsBuilder.updateGroupSettings().build(); + updateGroupOperationSettings = settingsBuilder.updateGroupOperationSettings().build(); + deleteGroupSettings = settingsBuilder.deleteGroupSettings().build(); + deleteGroupOperationSettings = settingsBuilder.deleteGroupOperationSettings().build(); + addAssetsToGroupSettings = settingsBuilder.addAssetsToGroupSettings().build(); + addAssetsToGroupOperationSettings = settingsBuilder.addAssetsToGroupOperationSettings().build(); + removeAssetsFromGroupSettings = settingsBuilder.removeAssetsFromGroupSettings().build(); + removeAssetsFromGroupOperationSettings = + settingsBuilder.removeAssetsFromGroupOperationSettings().build(); + listErrorFramesSettings = settingsBuilder.listErrorFramesSettings().build(); + getErrorFrameSettings = settingsBuilder.getErrorFrameSettings().build(); + listSourcesSettings = settingsBuilder.listSourcesSettings().build(); + getSourceSettings = settingsBuilder.getSourceSettings().build(); + createSourceSettings = settingsBuilder.createSourceSettings().build(); + createSourceOperationSettings = settingsBuilder.createSourceOperationSettings().build(); + updateSourceSettings = settingsBuilder.updateSourceSettings().build(); + updateSourceOperationSettings = settingsBuilder.updateSourceOperationSettings().build(); + deleteSourceSettings = settingsBuilder.deleteSourceSettings().build(); + deleteSourceOperationSettings = settingsBuilder.deleteSourceOperationSettings().build(); + listPreferenceSetsSettings = settingsBuilder.listPreferenceSetsSettings().build(); + getPreferenceSetSettings = settingsBuilder.getPreferenceSetSettings().build(); + createPreferenceSetSettings = settingsBuilder.createPreferenceSetSettings().build(); + createPreferenceSetOperationSettings = + settingsBuilder.createPreferenceSetOperationSettings().build(); + updatePreferenceSetSettings = settingsBuilder.updatePreferenceSetSettings().build(); + updatePreferenceSetOperationSettings = + settingsBuilder.updatePreferenceSetOperationSettings().build(); + deletePreferenceSetSettings = settingsBuilder.deletePreferenceSetSettings().build(); + deletePreferenceSetOperationSettings = + settingsBuilder.deletePreferenceSetOperationSettings().build(); + getSettingsSettings = settingsBuilder.getSettingsSettings().build(); + updateSettingsSettings = settingsBuilder.updateSettingsSettings().build(); + updateSettingsOperationSettings = settingsBuilder.updateSettingsOperationSettings().build(); + createReportConfigSettings = settingsBuilder.createReportConfigSettings().build(); + createReportConfigOperationSettings = + settingsBuilder.createReportConfigOperationSettings().build(); + getReportConfigSettings = settingsBuilder.getReportConfigSettings().build(); + listReportConfigsSettings = settingsBuilder.listReportConfigsSettings().build(); + deleteReportConfigSettings = settingsBuilder.deleteReportConfigSettings().build(); + deleteReportConfigOperationSettings = + settingsBuilder.deleteReportConfigOperationSettings().build(); + createReportSettings = settingsBuilder.createReportSettings().build(); + createReportOperationSettings = settingsBuilder.createReportOperationSettings().build(); + getReportSettings = settingsBuilder.getReportSettings().build(); + listReportsSettings = settingsBuilder.listReportsSettings().build(); + deleteReportSettings = settingsBuilder.deleteReportSettings().build(); + deleteReportOperationSettings = settingsBuilder.deleteReportOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for MigrationCenterStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> + listAssetsSettings; + private final UnaryCallSettings.Builder getAssetSettings; + private final UnaryCallSettings.Builder updateAssetSettings; + private final UnaryCallSettings.Builder + batchUpdateAssetsSettings; + private final UnaryCallSettings.Builder deleteAssetSettings; + private final UnaryCallSettings.Builder + batchDeleteAssetsSettings; + private final UnaryCallSettings.Builder + reportAssetFramesSettings; + private final UnaryCallSettings.Builder< + AggregateAssetsValuesRequest, AggregateAssetsValuesResponse> + aggregateAssetsValuesSettings; + private final UnaryCallSettings.Builder + createImportJobSettings; + private final OperationCallSettings.Builder< + CreateImportJobRequest, ImportJob, OperationMetadata> + createImportJobOperationSettings; + private final PagedCallSettings.Builder< + ListImportJobsRequest, ListImportJobsResponse, ListImportJobsPagedResponse> + listImportJobsSettings; + private final UnaryCallSettings.Builder getImportJobSettings; + private final UnaryCallSettings.Builder + deleteImportJobSettings; + private final OperationCallSettings.Builder + deleteImportJobOperationSettings; + private final UnaryCallSettings.Builder + updateImportJobSettings; + private final OperationCallSettings.Builder< + UpdateImportJobRequest, ImportJob, OperationMetadata> + updateImportJobOperationSettings; + private final UnaryCallSettings.Builder + validateImportJobSettings; + private final OperationCallSettings.Builder + validateImportJobOperationSettings; + private final UnaryCallSettings.Builder runImportJobSettings; + private final OperationCallSettings.Builder + runImportJobOperationSettings; + private final UnaryCallSettings.Builder + getImportDataFileSettings; + private final PagedCallSettings.Builder< + ListImportDataFilesRequest, + ListImportDataFilesResponse, + ListImportDataFilesPagedResponse> + listImportDataFilesSettings; + private final UnaryCallSettings.Builder + createImportDataFileSettings; + private final OperationCallSettings.Builder< + CreateImportDataFileRequest, ImportDataFile, OperationMetadata> + createImportDataFileOperationSettings; + private final UnaryCallSettings.Builder + deleteImportDataFileSettings; + private final OperationCallSettings.Builder< + DeleteImportDataFileRequest, Empty, OperationMetadata> + deleteImportDataFileOperationSettings; + private final PagedCallSettings.Builder< + ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse> + listGroupsSettings; + private final UnaryCallSettings.Builder getGroupSettings; + private final UnaryCallSettings.Builder createGroupSettings; + private final OperationCallSettings.Builder + createGroupOperationSettings; + private final UnaryCallSettings.Builder updateGroupSettings; + private final OperationCallSettings.Builder + updateGroupOperationSettings; + private final UnaryCallSettings.Builder deleteGroupSettings; + private final OperationCallSettings.Builder + deleteGroupOperationSettings; + private final UnaryCallSettings.Builder + addAssetsToGroupSettings; + private final OperationCallSettings.Builder + addAssetsToGroupOperationSettings; + private final UnaryCallSettings.Builder + removeAssetsFromGroupSettings; + private final OperationCallSettings.Builder< + RemoveAssetsFromGroupRequest, Group, OperationMetadata> + removeAssetsFromGroupOperationSettings; + private final PagedCallSettings.Builder< + ListErrorFramesRequest, ListErrorFramesResponse, ListErrorFramesPagedResponse> + listErrorFramesSettings; + private final UnaryCallSettings.Builder getErrorFrameSettings; + private final PagedCallSettings.Builder< + ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> + listSourcesSettings; + private final UnaryCallSettings.Builder getSourceSettings; + private final UnaryCallSettings.Builder createSourceSettings; + private final OperationCallSettings.Builder + createSourceOperationSettings; + private final UnaryCallSettings.Builder updateSourceSettings; + private final OperationCallSettings.Builder + updateSourceOperationSettings; + private final UnaryCallSettings.Builder deleteSourceSettings; + private final OperationCallSettings.Builder + deleteSourceOperationSettings; + private final PagedCallSettings.Builder< + ListPreferenceSetsRequest, ListPreferenceSetsResponse, ListPreferenceSetsPagedResponse> + listPreferenceSetsSettings; + private final UnaryCallSettings.Builder + getPreferenceSetSettings; + private final UnaryCallSettings.Builder + createPreferenceSetSettings; + private final OperationCallSettings.Builder< + CreatePreferenceSetRequest, PreferenceSet, OperationMetadata> + createPreferenceSetOperationSettings; + private final UnaryCallSettings.Builder + updatePreferenceSetSettings; + private final OperationCallSettings.Builder< + UpdatePreferenceSetRequest, PreferenceSet, OperationMetadata> + updatePreferenceSetOperationSettings; + private final UnaryCallSettings.Builder + deletePreferenceSetSettings; + private final OperationCallSettings.Builder< + DeletePreferenceSetRequest, Empty, OperationMetadata> + deletePreferenceSetOperationSettings; + private final UnaryCallSettings.Builder getSettingsSettings; + private final UnaryCallSettings.Builder + updateSettingsSettings; + private final OperationCallSettings.Builder + updateSettingsOperationSettings; + private final UnaryCallSettings.Builder + createReportConfigSettings; + private final OperationCallSettings.Builder< + CreateReportConfigRequest, ReportConfig, OperationMetadata> + createReportConfigOperationSettings; + private final UnaryCallSettings.Builder + getReportConfigSettings; + private final PagedCallSettings.Builder< + ListReportConfigsRequest, ListReportConfigsResponse, ListReportConfigsPagedResponse> + listReportConfigsSettings; + private final UnaryCallSettings.Builder + deleteReportConfigSettings; + private final OperationCallSettings.Builder + deleteReportConfigOperationSettings; + private final UnaryCallSettings.Builder createReportSettings; + private final OperationCallSettings.Builder + createReportOperationSettings; + private final UnaryCallSettings.Builder getReportSettings; + private final PagedCallSettings.Builder< + ListReportsRequest, ListReportsResponse, ListReportsPagedResponse> + listReportsSettings; + private final UnaryCallSettings.Builder deleteReportSettings; + private final OperationCallSettings.Builder + deleteReportOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listAssetsSettings = PagedCallSettings.newBuilder(LIST_ASSETS_PAGE_STR_FACT); + getAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchUpdateAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchDeleteAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + reportAssetFramesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + aggregateAssetsValuesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createImportJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createImportJobOperationSettings = OperationCallSettings.newBuilder(); + listImportJobsSettings = PagedCallSettings.newBuilder(LIST_IMPORT_JOBS_PAGE_STR_FACT); + getImportJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteImportJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteImportJobOperationSettings = OperationCallSettings.newBuilder(); + updateImportJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateImportJobOperationSettings = OperationCallSettings.newBuilder(); + validateImportJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + validateImportJobOperationSettings = OperationCallSettings.newBuilder(); + runImportJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + runImportJobOperationSettings = OperationCallSettings.newBuilder(); + getImportDataFileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listImportDataFilesSettings = + PagedCallSettings.newBuilder(LIST_IMPORT_DATA_FILES_PAGE_STR_FACT); + createImportDataFileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createImportDataFileOperationSettings = OperationCallSettings.newBuilder(); + deleteImportDataFileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteImportDataFileOperationSettings = OperationCallSettings.newBuilder(); + listGroupsSettings = PagedCallSettings.newBuilder(LIST_GROUPS_PAGE_STR_FACT); + getGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createGroupOperationSettings = OperationCallSettings.newBuilder(); + updateGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateGroupOperationSettings = OperationCallSettings.newBuilder(); + deleteGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteGroupOperationSettings = OperationCallSettings.newBuilder(); + addAssetsToGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + addAssetsToGroupOperationSettings = OperationCallSettings.newBuilder(); + removeAssetsFromGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + removeAssetsFromGroupOperationSettings = OperationCallSettings.newBuilder(); + listErrorFramesSettings = PagedCallSettings.newBuilder(LIST_ERROR_FRAMES_PAGE_STR_FACT); + getErrorFrameSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listSourcesSettings = PagedCallSettings.newBuilder(LIST_SOURCES_PAGE_STR_FACT); + getSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSourceOperationSettings = OperationCallSettings.newBuilder(); + updateSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSourceOperationSettings = OperationCallSettings.newBuilder(); + deleteSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSourceOperationSettings = OperationCallSettings.newBuilder(); + listPreferenceSetsSettings = PagedCallSettings.newBuilder(LIST_PREFERENCE_SETS_PAGE_STR_FACT); + getPreferenceSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPreferenceSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPreferenceSetOperationSettings = OperationCallSettings.newBuilder(); + updatePreferenceSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePreferenceSetOperationSettings = OperationCallSettings.newBuilder(); + deletePreferenceSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePreferenceSetOperationSettings = OperationCallSettings.newBuilder(); + getSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSettingsOperationSettings = OperationCallSettings.newBuilder(); + createReportConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createReportConfigOperationSettings = OperationCallSettings.newBuilder(); + getReportConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listReportConfigsSettings = PagedCallSettings.newBuilder(LIST_REPORT_CONFIGS_PAGE_STR_FACT); + deleteReportConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteReportConfigOperationSettings = OperationCallSettings.newBuilder(); + createReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createReportOperationSettings = OperationCallSettings.newBuilder(); + getReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listReportsSettings = PagedCallSettings.newBuilder(LIST_REPORTS_PAGE_STR_FACT); + deleteReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteReportOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listAssetsSettings, + getAssetSettings, + updateAssetSettings, + batchUpdateAssetsSettings, + deleteAssetSettings, + batchDeleteAssetsSettings, + reportAssetFramesSettings, + aggregateAssetsValuesSettings, + createImportJobSettings, + listImportJobsSettings, + getImportJobSettings, + deleteImportJobSettings, + updateImportJobSettings, + validateImportJobSettings, + runImportJobSettings, + getImportDataFileSettings, + listImportDataFilesSettings, + createImportDataFileSettings, + deleteImportDataFileSettings, + listGroupsSettings, + getGroupSettings, + createGroupSettings, + updateGroupSettings, + deleteGroupSettings, + addAssetsToGroupSettings, + removeAssetsFromGroupSettings, + listErrorFramesSettings, + getErrorFrameSettings, + listSourcesSettings, + getSourceSettings, + createSourceSettings, + updateSourceSettings, + deleteSourceSettings, + listPreferenceSetsSettings, + getPreferenceSetSettings, + createPreferenceSetSettings, + updatePreferenceSetSettings, + deletePreferenceSetSettings, + getSettingsSettings, + updateSettingsSettings, + createReportConfigSettings, + getReportConfigSettings, + listReportConfigsSettings, + deleteReportConfigSettings, + createReportSettings, + getReportSettings, + listReportsSettings, + deleteReportSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(MigrationCenterStubSettings settings) { + super(settings); + + listAssetsSettings = settings.listAssetsSettings.toBuilder(); + getAssetSettings = settings.getAssetSettings.toBuilder(); + updateAssetSettings = settings.updateAssetSettings.toBuilder(); + batchUpdateAssetsSettings = settings.batchUpdateAssetsSettings.toBuilder(); + deleteAssetSettings = settings.deleteAssetSettings.toBuilder(); + batchDeleteAssetsSettings = settings.batchDeleteAssetsSettings.toBuilder(); + reportAssetFramesSettings = settings.reportAssetFramesSettings.toBuilder(); + aggregateAssetsValuesSettings = settings.aggregateAssetsValuesSettings.toBuilder(); + createImportJobSettings = settings.createImportJobSettings.toBuilder(); + createImportJobOperationSettings = settings.createImportJobOperationSettings.toBuilder(); + listImportJobsSettings = settings.listImportJobsSettings.toBuilder(); + getImportJobSettings = settings.getImportJobSettings.toBuilder(); + deleteImportJobSettings = settings.deleteImportJobSettings.toBuilder(); + deleteImportJobOperationSettings = settings.deleteImportJobOperationSettings.toBuilder(); + updateImportJobSettings = settings.updateImportJobSettings.toBuilder(); + updateImportJobOperationSettings = settings.updateImportJobOperationSettings.toBuilder(); + validateImportJobSettings = settings.validateImportJobSettings.toBuilder(); + validateImportJobOperationSettings = settings.validateImportJobOperationSettings.toBuilder(); + runImportJobSettings = settings.runImportJobSettings.toBuilder(); + runImportJobOperationSettings = settings.runImportJobOperationSettings.toBuilder(); + getImportDataFileSettings = settings.getImportDataFileSettings.toBuilder(); + listImportDataFilesSettings = settings.listImportDataFilesSettings.toBuilder(); + createImportDataFileSettings = settings.createImportDataFileSettings.toBuilder(); + createImportDataFileOperationSettings = + settings.createImportDataFileOperationSettings.toBuilder(); + deleteImportDataFileSettings = settings.deleteImportDataFileSettings.toBuilder(); + deleteImportDataFileOperationSettings = + settings.deleteImportDataFileOperationSettings.toBuilder(); + listGroupsSettings = settings.listGroupsSettings.toBuilder(); + getGroupSettings = settings.getGroupSettings.toBuilder(); + createGroupSettings = settings.createGroupSettings.toBuilder(); + createGroupOperationSettings = settings.createGroupOperationSettings.toBuilder(); + updateGroupSettings = settings.updateGroupSettings.toBuilder(); + updateGroupOperationSettings = settings.updateGroupOperationSettings.toBuilder(); + deleteGroupSettings = settings.deleteGroupSettings.toBuilder(); + deleteGroupOperationSettings = settings.deleteGroupOperationSettings.toBuilder(); + addAssetsToGroupSettings = settings.addAssetsToGroupSettings.toBuilder(); + addAssetsToGroupOperationSettings = settings.addAssetsToGroupOperationSettings.toBuilder(); + removeAssetsFromGroupSettings = settings.removeAssetsFromGroupSettings.toBuilder(); + removeAssetsFromGroupOperationSettings = + settings.removeAssetsFromGroupOperationSettings.toBuilder(); + listErrorFramesSettings = settings.listErrorFramesSettings.toBuilder(); + getErrorFrameSettings = settings.getErrorFrameSettings.toBuilder(); + listSourcesSettings = settings.listSourcesSettings.toBuilder(); + getSourceSettings = settings.getSourceSettings.toBuilder(); + createSourceSettings = settings.createSourceSettings.toBuilder(); + createSourceOperationSettings = settings.createSourceOperationSettings.toBuilder(); + updateSourceSettings = settings.updateSourceSettings.toBuilder(); + updateSourceOperationSettings = settings.updateSourceOperationSettings.toBuilder(); + deleteSourceSettings = settings.deleteSourceSettings.toBuilder(); + deleteSourceOperationSettings = settings.deleteSourceOperationSettings.toBuilder(); + listPreferenceSetsSettings = settings.listPreferenceSetsSettings.toBuilder(); + getPreferenceSetSettings = settings.getPreferenceSetSettings.toBuilder(); + createPreferenceSetSettings = settings.createPreferenceSetSettings.toBuilder(); + createPreferenceSetOperationSettings = + settings.createPreferenceSetOperationSettings.toBuilder(); + updatePreferenceSetSettings = settings.updatePreferenceSetSettings.toBuilder(); + updatePreferenceSetOperationSettings = + settings.updatePreferenceSetOperationSettings.toBuilder(); + deletePreferenceSetSettings = settings.deletePreferenceSetSettings.toBuilder(); + deletePreferenceSetOperationSettings = + settings.deletePreferenceSetOperationSettings.toBuilder(); + getSettingsSettings = settings.getSettingsSettings.toBuilder(); + updateSettingsSettings = settings.updateSettingsSettings.toBuilder(); + updateSettingsOperationSettings = settings.updateSettingsOperationSettings.toBuilder(); + createReportConfigSettings = settings.createReportConfigSettings.toBuilder(); + createReportConfigOperationSettings = + settings.createReportConfigOperationSettings.toBuilder(); + getReportConfigSettings = settings.getReportConfigSettings.toBuilder(); + listReportConfigsSettings = settings.listReportConfigsSettings.toBuilder(); + deleteReportConfigSettings = settings.deleteReportConfigSettings.toBuilder(); + deleteReportConfigOperationSettings = + settings.deleteReportConfigOperationSettings.toBuilder(); + createReportSettings = settings.createReportSettings.toBuilder(); + createReportOperationSettings = settings.createReportOperationSettings.toBuilder(); + getReportSettings = settings.getReportSettings.toBuilder(); + listReportsSettings = settings.listReportsSettings.toBuilder(); + deleteReportSettings = settings.deleteReportSettings.toBuilder(); + deleteReportOperationSettings = settings.deleteReportOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listAssetsSettings, + getAssetSettings, + updateAssetSettings, + batchUpdateAssetsSettings, + deleteAssetSettings, + batchDeleteAssetsSettings, + reportAssetFramesSettings, + aggregateAssetsValuesSettings, + createImportJobSettings, + listImportJobsSettings, + getImportJobSettings, + deleteImportJobSettings, + updateImportJobSettings, + validateImportJobSettings, + runImportJobSettings, + getImportDataFileSettings, + listImportDataFilesSettings, + createImportDataFileSettings, + deleteImportDataFileSettings, + listGroupsSettings, + getGroupSettings, + createGroupSettings, + updateGroupSettings, + deleteGroupSettings, + addAssetsToGroupSettings, + removeAssetsFromGroupSettings, + listErrorFramesSettings, + getErrorFrameSettings, + listSourcesSettings, + getSourceSettings, + createSourceSettings, + updateSourceSettings, + deleteSourceSettings, + listPreferenceSetsSettings, + getPreferenceSetSettings, + createPreferenceSetSettings, + updatePreferenceSetSettings, + deletePreferenceSetSettings, + getSettingsSettings, + updateSettingsSettings, + createReportConfigSettings, + getReportConfigSettings, + listReportConfigsSettings, + deleteReportConfigSettings, + createReportSettings, + getReportSettings, + listReportsSettings, + deleteReportSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .batchUpdateAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .batchDeleteAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .reportAssetFramesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .aggregateAssetsValuesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createImportJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listImportJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getImportJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteImportJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateImportJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .validateImportJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .runImportJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getImportDataFileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listImportDataFilesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createImportDataFileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteImportDataFileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .addAssetsToGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .removeAssetsFromGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listErrorFramesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getErrorFrameSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listSourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getSourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createSourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateSourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteSourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listPreferenceSetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getPreferenceSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createPreferenceSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updatePreferenceSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deletePreferenceSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createReportConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getReportConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listReportConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteReportConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createReportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getReportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listReportsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteReportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createImportJobOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ImportJob.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteImportJobOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateImportJobOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ImportJob.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .validateImportJobOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .runImportJobOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createImportDataFileOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ImportDataFile.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteImportDataFileOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Group.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Group.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .addAssetsToGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Group.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .removeAssetsFromGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Group.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createSourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Source.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateSourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Source.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteSourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createPreferenceSetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PreferenceSet.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updatePreferenceSetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PreferenceSet.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deletePreferenceSetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateSettingsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Settings.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createReportConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ReportConfig.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteReportConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createReportOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Report.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteReportOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listAssets. */ + public PagedCallSettings.Builder + listAssetsSettings() { + return listAssetsSettings; + } + + /** Returns the builder for the settings used for calls to getAsset. */ + public UnaryCallSettings.Builder getAssetSettings() { + return getAssetSettings; + } + + /** Returns the builder for the settings used for calls to updateAsset. */ + public UnaryCallSettings.Builder updateAssetSettings() { + return updateAssetSettings; + } + + /** Returns the builder for the settings used for calls to batchUpdateAssets. */ + public UnaryCallSettings.Builder + batchUpdateAssetsSettings() { + return batchUpdateAssetsSettings; + } + + /** Returns the builder for the settings used for calls to deleteAsset. */ + public UnaryCallSettings.Builder deleteAssetSettings() { + return deleteAssetSettings; + } + + /** Returns the builder for the settings used for calls to batchDeleteAssets. */ + public UnaryCallSettings.Builder batchDeleteAssetsSettings() { + return batchDeleteAssetsSettings; + } + + /** Returns the builder for the settings used for calls to reportAssetFrames. */ + public UnaryCallSettings.Builder + reportAssetFramesSettings() { + return reportAssetFramesSettings; + } + + /** Returns the builder for the settings used for calls to aggregateAssetsValues. */ + public UnaryCallSettings.Builder + aggregateAssetsValuesSettings() { + return aggregateAssetsValuesSettings; + } + + /** Returns the builder for the settings used for calls to createImportJob. */ + public UnaryCallSettings.Builder createImportJobSettings() { + return createImportJobSettings; + } + + /** Returns the builder for the settings used for calls to createImportJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createImportJobOperationSettings() { + return createImportJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to listImportJobs. */ + public PagedCallSettings.Builder< + ListImportJobsRequest, ListImportJobsResponse, ListImportJobsPagedResponse> + listImportJobsSettings() { + return listImportJobsSettings; + } + + /** Returns the builder for the settings used for calls to getImportJob. */ + public UnaryCallSettings.Builder getImportJobSettings() { + return getImportJobSettings; + } + + /** Returns the builder for the settings used for calls to deleteImportJob. */ + public UnaryCallSettings.Builder deleteImportJobSettings() { + return deleteImportJobSettings; + } + + /** Returns the builder for the settings used for calls to deleteImportJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteImportJobOperationSettings() { + return deleteImportJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateImportJob. */ + public UnaryCallSettings.Builder updateImportJobSettings() { + return updateImportJobSettings; + } + + /** Returns the builder for the settings used for calls to updateImportJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateImportJobOperationSettings() { + return updateImportJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to validateImportJob. */ + public UnaryCallSettings.Builder + validateImportJobSettings() { + return validateImportJobSettings; + } + + /** Returns the builder for the settings used for calls to validateImportJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + validateImportJobOperationSettings() { + return validateImportJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to runImportJob. */ + public UnaryCallSettings.Builder runImportJobSettings() { + return runImportJobSettings; + } + + /** Returns the builder for the settings used for calls to runImportJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + runImportJobOperationSettings() { + return runImportJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to getImportDataFile. */ + public UnaryCallSettings.Builder + getImportDataFileSettings() { + return getImportDataFileSettings; + } + + /** Returns the builder for the settings used for calls to listImportDataFiles. */ + public PagedCallSettings.Builder< + ListImportDataFilesRequest, + ListImportDataFilesResponse, + ListImportDataFilesPagedResponse> + listImportDataFilesSettings() { + return listImportDataFilesSettings; + } + + /** Returns the builder for the settings used for calls to createImportDataFile. */ + public UnaryCallSettings.Builder + createImportDataFileSettings() { + return createImportDataFileSettings; + } + + /** Returns the builder for the settings used for calls to createImportDataFile. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateImportDataFileRequest, ImportDataFile, OperationMetadata> + createImportDataFileOperationSettings() { + return createImportDataFileOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteImportDataFile. */ + public UnaryCallSettings.Builder + deleteImportDataFileSettings() { + return deleteImportDataFileSettings; + } + + /** Returns the builder for the settings used for calls to deleteImportDataFile. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteImportDataFileOperationSettings() { + return deleteImportDataFileOperationSettings; + } + + /** Returns the builder for the settings used for calls to listGroups. */ + public PagedCallSettings.Builder + listGroupsSettings() { + return listGroupsSettings; + } + + /** Returns the builder for the settings used for calls to getGroup. */ + public UnaryCallSettings.Builder getGroupSettings() { + return getGroupSettings; + } + + /** Returns the builder for the settings used for calls to createGroup. */ + public UnaryCallSettings.Builder createGroupSettings() { + return createGroupSettings; + } + + /** Returns the builder for the settings used for calls to createGroup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createGroupOperationSettings() { + return createGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateGroup. */ + public UnaryCallSettings.Builder updateGroupSettings() { + return updateGroupSettings; + } + + /** Returns the builder for the settings used for calls to updateGroup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateGroupOperationSettings() { + return updateGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteGroup. */ + public UnaryCallSettings.Builder deleteGroupSettings() { + return deleteGroupSettings; + } + + /** Returns the builder for the settings used for calls to deleteGroup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteGroupOperationSettings() { + return deleteGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to addAssetsToGroup. */ + public UnaryCallSettings.Builder + addAssetsToGroupSettings() { + return addAssetsToGroupSettings; + } + + /** Returns the builder for the settings used for calls to addAssetsToGroup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + addAssetsToGroupOperationSettings() { + return addAssetsToGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to removeAssetsFromGroup. */ + public UnaryCallSettings.Builder + removeAssetsFromGroupSettings() { + return removeAssetsFromGroupSettings; + } + + /** Returns the builder for the settings used for calls to removeAssetsFromGroup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + removeAssetsFromGroupOperationSettings() { + return removeAssetsFromGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to listErrorFrames. */ + public PagedCallSettings.Builder< + ListErrorFramesRequest, ListErrorFramesResponse, ListErrorFramesPagedResponse> + listErrorFramesSettings() { + return listErrorFramesSettings; + } + + /** Returns the builder for the settings used for calls to getErrorFrame. */ + public UnaryCallSettings.Builder getErrorFrameSettings() { + return getErrorFrameSettings; + } + + /** Returns the builder for the settings used for calls to listSources. */ + public PagedCallSettings.Builder< + ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse> + listSourcesSettings() { + return listSourcesSettings; + } + + /** Returns the builder for the settings used for calls to getSource. */ + public UnaryCallSettings.Builder getSourceSettings() { + return getSourceSettings; + } + + /** Returns the builder for the settings used for calls to createSource. */ + public UnaryCallSettings.Builder createSourceSettings() { + return createSourceSettings; + } + + /** Returns the builder for the settings used for calls to createSource. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createSourceOperationSettings() { + return createSourceOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateSource. */ + public UnaryCallSettings.Builder updateSourceSettings() { + return updateSourceSettings; + } + + /** Returns the builder for the settings used for calls to updateSource. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateSourceOperationSettings() { + return updateSourceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteSource. */ + public UnaryCallSettings.Builder deleteSourceSettings() { + return deleteSourceSettings; + } + + /** Returns the builder for the settings used for calls to deleteSource. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteSourceOperationSettings() { + return deleteSourceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listPreferenceSets. */ + public PagedCallSettings.Builder< + ListPreferenceSetsRequest, ListPreferenceSetsResponse, ListPreferenceSetsPagedResponse> + listPreferenceSetsSettings() { + return listPreferenceSetsSettings; + } + + /** Returns the builder for the settings used for calls to getPreferenceSet. */ + public UnaryCallSettings.Builder + getPreferenceSetSettings() { + return getPreferenceSetSettings; + } + + /** Returns the builder for the settings used for calls to createPreferenceSet. */ + public UnaryCallSettings.Builder + createPreferenceSetSettings() { + return createPreferenceSetSettings; + } + + /** Returns the builder for the settings used for calls to createPreferenceSet. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreatePreferenceSetRequest, PreferenceSet, OperationMetadata> + createPreferenceSetOperationSettings() { + return createPreferenceSetOperationSettings; + } + + /** Returns the builder for the settings used for calls to updatePreferenceSet. */ + public UnaryCallSettings.Builder + updatePreferenceSetSettings() { + return updatePreferenceSetSettings; + } + + /** Returns the builder for the settings used for calls to updatePreferenceSet. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdatePreferenceSetRequest, PreferenceSet, OperationMetadata> + updatePreferenceSetOperationSettings() { + return updatePreferenceSetOperationSettings; + } + + /** Returns the builder for the settings used for calls to deletePreferenceSet. */ + public UnaryCallSettings.Builder + deletePreferenceSetSettings() { + return deletePreferenceSetSettings; + } + + /** Returns the builder for the settings used for calls to deletePreferenceSet. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deletePreferenceSetOperationSettings() { + return deletePreferenceSetOperationSettings; + } + + /** Returns the builder for the settings used for calls to getSettings. */ + public UnaryCallSettings.Builder getSettingsSettings() { + return getSettingsSettings; + } + + /** Returns the builder for the settings used for calls to updateSettings. */ + public UnaryCallSettings.Builder updateSettingsSettings() { + return updateSettingsSettings; + } + + /** Returns the builder for the settings used for calls to updateSettings. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateSettingsOperationSettings() { + return updateSettingsOperationSettings; + } + + /** Returns the builder for the settings used for calls to createReportConfig. */ + public UnaryCallSettings.Builder + createReportConfigSettings() { + return createReportConfigSettings; + } + + /** Returns the builder for the settings used for calls to createReportConfig. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createReportConfigOperationSettings() { + return createReportConfigOperationSettings; + } + + /** Returns the builder for the settings used for calls to getReportConfig. */ + public UnaryCallSettings.Builder + getReportConfigSettings() { + return getReportConfigSettings; + } + + /** Returns the builder for the settings used for calls to listReportConfigs. */ + public PagedCallSettings.Builder< + ListReportConfigsRequest, ListReportConfigsResponse, ListReportConfigsPagedResponse> + listReportConfigsSettings() { + return listReportConfigsSettings; + } + + /** Returns the builder for the settings used for calls to deleteReportConfig. */ + public UnaryCallSettings.Builder + deleteReportConfigSettings() { + return deleteReportConfigSettings; + } + + /** Returns the builder for the settings used for calls to deleteReportConfig. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteReportConfigOperationSettings() { + return deleteReportConfigOperationSettings; + } + + /** Returns the builder for the settings used for calls to createReport. */ + public UnaryCallSettings.Builder createReportSettings() { + return createReportSettings; + } + + /** Returns the builder for the settings used for calls to createReport. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createReportOperationSettings() { + return createReportOperationSettings; + } + + /** Returns the builder for the settings used for calls to getReport. */ + public UnaryCallSettings.Builder getReportSettings() { + return getReportSettings; + } + + /** Returns the builder for the settings used for calls to listReports. */ + public PagedCallSettings.Builder< + ListReportsRequest, ListReportsResponse, ListReportsPagedResponse> + listReportsSettings() { + return listReportsSettings; + } + + /** Returns the builder for the settings used for calls to deleteReport. */ + public UnaryCallSettings.Builder deleteReportSettings() { + return deleteReportSettings; + } + + /** Returns the builder for the settings used for calls to deleteReport. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteReportOperationSettings() { + return deleteReportOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public MigrationCenterStubSettings build() throws IOException { + return new MigrationCenterStubSettings(this); + } + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MigrationCenterClientHttpJsonTest.java b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MigrationCenterClientHttpJsonTest.java new file mode 100644 index 000000000000..41501fa71779 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MigrationCenterClientHttpJsonTest.java @@ -0,0 +1,4782 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListAssetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListErrorFramesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListGroupsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportDataFilesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportJobsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListLocationsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListPreferenceSetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportConfigsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListSourcesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.stub.HttpJsonMigrationCenterStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class MigrationCenterClientHttpJsonTest { + private static MockHttpService mockService; + private static MigrationCenterClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonMigrationCenterStub.getMethodDescriptors(), + MigrationCenterSettings.getDefaultEndpoint()); + MigrationCenterSettings settings = + MigrationCenterSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + MigrationCenterSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = MigrationCenterClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listAssetsTest() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAssetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssetsTest2() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAssetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssetTest() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAttributes(new HashMap()) + .setInsightList(InsightList.newBuilder().build()) + .setPerformanceData(AssetPerformanceData.newBuilder().build()) + .addAllSources(new ArrayList()) + .addAllAssignedGroups(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); + + Asset actualResponse = client.getAsset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); + client.getAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssetTest2() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAttributes(new HashMap()) + .setInsightList(InsightList.newBuilder().build()) + .setPerformanceData(AssetPerformanceData.newBuilder().build()) + .addAllSources(new ArrayList()) + .addAllAssignedGroups(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3075/locations/location-3075/assets/asset-3075"; + + Asset actualResponse = client.getAsset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAssetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3075/locations/location-3075/assets/asset-3075"; + client.getAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAssetTest() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAttributes(new HashMap()) + .setInsightList(InsightList.newBuilder().build()) + .setPerformanceData(AssetPerformanceData.newBuilder().build()) + .addAllSources(new ArrayList()) + .addAllAssignedGroups(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + Asset asset = + Asset.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAttributes(new HashMap()) + .setInsightList(InsightList.newBuilder().build()) + .setPerformanceData(AssetPerformanceData.newBuilder().build()) + .addAllSources(new ArrayList()) + .addAllAssignedGroups(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Asset actualResponse = client.updateAsset(asset, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Asset asset = + Asset.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAttributes(new HashMap()) + .setInsightList(InsightList.newBuilder().build()) + .setPerformanceData(AssetPerformanceData.newBuilder().build()) + .addAllSources(new ArrayList()) + .addAllAssignedGroups(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAsset(asset, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchUpdateAssetsTest() throws Exception { + BatchUpdateAssetsResponse expectedResponse = + BatchUpdateAssetsResponse.newBuilder().addAllAssets(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List requests = new ArrayList<>(); + + BatchUpdateAssetsResponse actualResponse = client.batchUpdateAssets(parent, requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchUpdateAssetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List requests = new ArrayList<>(); + client.batchUpdateAssets(parent, requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchUpdateAssetsTest2() throws Exception { + BatchUpdateAssetsResponse expectedResponse = + BatchUpdateAssetsResponse.newBuilder().addAllAssets(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + List requests = new ArrayList<>(); + + BatchUpdateAssetsResponse actualResponse = client.batchUpdateAssets(parent, requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchUpdateAssetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + List requests = new ArrayList<>(); + client.batchUpdateAssets(parent, requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAssetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); + + client.deleteAsset(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); + client.deleteAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAssetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3075/locations/location-3075/assets/asset-3075"; + + client.deleteAsset(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAssetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3075/locations/location-3075/assets/asset-3075"; + client.deleteAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchDeleteAssetsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List names = new ArrayList<>(); + + client.batchDeleteAssets(parent, names); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchDeleteAssetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List names = new ArrayList<>(); + client.batchDeleteAssets(parent, names); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchDeleteAssetsTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + List names = new ArrayList<>(); + + client.batchDeleteAssets(parent, names); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchDeleteAssetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + List names = new ArrayList<>(); + client.batchDeleteAssets(parent, names); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void reportAssetFramesTest() throws Exception { + ReportAssetFramesResponse expectedResponse = ReportAssetFramesResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ReportAssetFramesRequest request = + ReportAssetFramesRequest.newBuilder() + .setParent("projects/project-5833/locations/location-5833") + .setFrames(Frames.newBuilder().build()) + .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + + ReportAssetFramesResponse actualResponse = client.reportAssetFrames(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void reportAssetFramesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReportAssetFramesRequest request = + ReportAssetFramesRequest.newBuilder() + .setParent("projects/project-5833/locations/location-5833") + .setFrames(Frames.newBuilder().build()) + .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + client.reportAssetFrames(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void aggregateAssetsValuesTest() throws Exception { + AggregateAssetsValuesResponse expectedResponse = + AggregateAssetsValuesResponse.newBuilder() + .addAllResults(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + AggregateAssetsValuesRequest request = + AggregateAssetsValuesRequest.newBuilder() + .setParent("projects/project-5833/locations/location-5833") + .addAllAggregations(new ArrayList()) + .setFilter("filter-1274492040") + .build(); + + AggregateAssetsValuesResponse actualResponse = client.aggregateAssetsValues(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void aggregateAssetsValuesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AggregateAssetsValuesRequest request = + AggregateAssetsValuesRequest.newBuilder() + .setParent("projects/project-5833/locations/location-5833") + .addAllAggregations(new ArrayList()) + .setFilter("filter-1274492040") + .build(); + client.aggregateAssetsValues(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createImportJobTest() throws Exception { + ImportJob expectedResponse = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportJob importJob = ImportJob.newBuilder().build(); + String importJobId = "importJobId1449444627"; + + ImportJob actualResponse = client.createImportJobAsync(parent, importJob, importJobId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createImportJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportJob importJob = ImportJob.newBuilder().build(); + String importJobId = "importJobId1449444627"; + client.createImportJobAsync(parent, importJob, importJobId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createImportJobTest2() throws Exception { + ImportJob expectedResponse = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + ImportJob importJob = ImportJob.newBuilder().build(); + String importJobId = "importJobId1449444627"; + + ImportJob actualResponse = client.createImportJobAsync(parent, importJob, importJobId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createImportJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + ImportJob importJob = ImportJob.newBuilder().build(); + String importJobId = "importJobId1449444627"; + client.createImportJobAsync(parent, importJob, importJobId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listImportJobsTest() throws Exception { + ImportJob responsesElement = ImportJob.newBuilder().build(); + ListImportJobsResponse expectedResponse = + ListImportJobsResponse.newBuilder() + .setNextPageToken("") + .addAllImportJobs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListImportJobsPagedResponse pagedListResponse = client.listImportJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getImportJobsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listImportJobsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listImportJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listImportJobsTest2() throws Exception { + ImportJob responsesElement = ImportJob.newBuilder().build(); + ListImportJobsResponse expectedResponse = + ListImportJobsResponse.newBuilder() + .setNextPageToken("") + .addAllImportJobs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListImportJobsPagedResponse pagedListResponse = client.listImportJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getImportJobsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listImportJobsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listImportJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getImportJobTest() throws Exception { + ImportJob expectedResponse = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + + ImportJob actualResponse = client.getImportJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getImportJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + client.getImportJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getImportJobTest2() throws Exception { + ImportJob expectedResponse = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2869/locations/location-2869/importJobs/importJob-2869"; + + ImportJob actualResponse = client.getImportJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getImportJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2869/locations/location-2869/importJobs/importJob-2869"; + client.getImportJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteImportJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + + client.deleteImportJobAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteImportJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + client.deleteImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteImportJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-2869/locations/location-2869/importJobs/importJob-2869"; + + client.deleteImportJobAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteImportJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2869/locations/location-2869/importJobs/importJob-2869"; + client.deleteImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateImportJobTest() throws Exception { + ImportJob expectedResponse = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportJob importJob = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ImportJob actualResponse = client.updateImportJobAsync(importJob, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateImportJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportJob importJob = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateImportJobAsync(importJob, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void validateImportJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("validateImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + + client.validateImportJobAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void validateImportJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + client.validateImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void validateImportJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("validateImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-2869/locations/location-2869/importJobs/importJob-2869"; + + client.validateImportJobAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void validateImportJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2869/locations/location-2869/importJobs/importJob-2869"; + client.validateImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void runImportJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("runImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + + client.runImportJobAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void runImportJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + client.runImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void runImportJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("runImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-2869/locations/location-2869/importJobs/importJob-2869"; + + client.runImportJobAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void runImportJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2869/locations/location-2869/importJobs/importJob-2869"; + client.runImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getImportDataFileTest() throws Exception { + ImportDataFile expectedResponse = + ImportDataFile.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .setDisplayName("displayName1714148973") + .setFormat(ImportJobFormat.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ImportDataFileName name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); + + ImportDataFile actualResponse = client.getImportDataFile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getImportDataFileExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportDataFileName name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); + client.getImportDataFile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getImportDataFileTest2() throws Exception { + ImportDataFile expectedResponse = + ImportDataFile.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .setDisplayName("displayName1714148973") + .setFormat(ImportJobFormat.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9665/locations/location-9665/importJobs/importJob-9665/importDataFiles/importDataFile-9665"; + + ImportDataFile actualResponse = client.getImportDataFile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getImportDataFileExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9665/locations/location-9665/importJobs/importJob-9665/importDataFiles/importDataFile-9665"; + client.getImportDataFile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listImportDataFilesTest() throws Exception { + ImportDataFile responsesElement = ImportDataFile.newBuilder().build(); + ListImportDataFilesResponse expectedResponse = + ListImportDataFilesResponse.newBuilder() + .setNextPageToken("") + .addAllImportDataFiles(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + + ListImportDataFilesPagedResponse pagedListResponse = client.listImportDataFiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getImportDataFilesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listImportDataFilesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + client.listImportDataFiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listImportDataFilesTest2() throws Exception { + ImportDataFile responsesElement = ImportDataFile.newBuilder().build(); + ListImportDataFilesResponse expectedResponse = + ListImportDataFilesResponse.newBuilder() + .setNextPageToken("") + .addAllImportDataFiles(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-900/locations/location-900/importJobs/importJob-900"; + + ListImportDataFilesPagedResponse pagedListResponse = client.listImportDataFiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getImportDataFilesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listImportDataFilesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-900/locations/location-900/importJobs/importJob-900"; + client.listImportDataFiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createImportDataFileTest() throws Exception { + ImportDataFile expectedResponse = + ImportDataFile.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .setDisplayName("displayName1714148973") + .setFormat(ImportJobFormat.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createImportDataFileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); + String importDataFileId = "importDataFileId-1812510330"; + + ImportDataFile actualResponse = + client.createImportDataFileAsync(parent, importDataFile, importDataFileId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createImportDataFileExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); + String importDataFileId = "importDataFileId-1812510330"; + client.createImportDataFileAsync(parent, importDataFile, importDataFileId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createImportDataFileTest2() throws Exception { + ImportDataFile expectedResponse = + ImportDataFile.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .setDisplayName("displayName1714148973") + .setFormat(ImportJobFormat.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createImportDataFileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-900/locations/location-900/importJobs/importJob-900"; + ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); + String importDataFileId = "importDataFileId-1812510330"; + + ImportDataFile actualResponse = + client.createImportDataFileAsync(parent, importDataFile, importDataFileId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createImportDataFileExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-900/locations/location-900/importJobs/importJob-900"; + ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); + String importDataFileId = "importDataFileId-1812510330"; + client.createImportDataFileAsync(parent, importDataFile, importDataFileId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteImportDataFileTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteImportDataFileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportDataFileName name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); + + client.deleteImportDataFileAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteImportDataFileExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportDataFileName name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); + client.deleteImportDataFileAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteImportDataFileTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteImportDataFileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-9665/locations/location-9665/importJobs/importJob-9665/importDataFiles/importDataFile-9665"; + + client.deleteImportDataFileAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteImportDataFileExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9665/locations/location-9665/importJobs/importJob-9665/importDataFiles/importDataFile-9665"; + client.deleteImportDataFileAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listGroupsTest() throws Exception { + Group responsesElement = Group.newBuilder().build(); + ListGroupsResponse expectedResponse = + ListGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllGroups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListGroupsPagedResponse pagedListResponse = client.listGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listGroupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGroupsTest2() throws Exception { + Group responsesElement = Group.newBuilder().build(); + ListGroupsResponse expectedResponse = + ListGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllGroups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListGroupsPagedResponse pagedListResponse = client.listGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listGroupsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + + Group actualResponse = client.getGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + client.getGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGroupTest2() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7380/locations/location-7380/groups/group-7380"; + + Group actualResponse = client.getGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7380/locations/location-7380/groups/group-7380"; + client.getGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Group group = Group.newBuilder().build(); + String groupId = "groupId293428218"; + + Group actualResponse = client.createGroupAsync(parent, group, groupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Group group = Group.newBuilder().build(); + String groupId = "groupId293428218"; + client.createGroupAsync(parent, group, groupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createGroupTest2() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Group group = Group.newBuilder().build(); + String groupId = "groupId293428218"; + + Group actualResponse = client.createGroupAsync(parent, group, groupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Group group = Group.newBuilder().build(); + String groupId = "groupId293428218"; + client.createGroupAsync(parent, group, groupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Group group = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Group actualResponse = client.updateGroupAsync(group, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Group group = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGroupAsync(group, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteGroupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + + client.deleteGroupAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + client.deleteGroupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteGroupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-7380/locations/location-7380/groups/group-7380"; + + client.deleteGroupAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7380/locations/location-7380/groups/group-7380"; + client.deleteGroupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void addAssetsToGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("addAssetsToGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + + Group actualResponse = client.addAssetsToGroupAsync(group).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addAssetsToGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + client.addAssetsToGroupAsync(group).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void addAssetsToGroupTest2() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("addAssetsToGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String group = "projects/project-6176/locations/location-6176/groups/group-6176"; + + Group actualResponse = client.addAssetsToGroupAsync(group).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addAssetsToGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String group = "projects/project-6176/locations/location-6176/groups/group-6176"; + client.addAssetsToGroupAsync(group).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void removeAssetsFromGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("removeAssetsFromGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + + Group actualResponse = client.removeAssetsFromGroupAsync(group).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeAssetsFromGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + client.removeAssetsFromGroupAsync(group).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void removeAssetsFromGroupTest2() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("removeAssetsFromGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String group = "projects/project-6176/locations/location-6176/groups/group-6176"; + + Group actualResponse = client.removeAssetsFromGroupAsync(group).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeAssetsFromGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String group = "projects/project-6176/locations/location-6176/groups/group-6176"; + client.removeAssetsFromGroupAsync(group).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listErrorFramesTest() throws Exception { + ErrorFrame responsesElement = ErrorFrame.newBuilder().build(); + ListErrorFramesResponse expectedResponse = + ListErrorFramesResponse.newBuilder() + .setNextPageToken("") + .addAllErrorFrames(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + + ListErrorFramesPagedResponse pagedListResponse = client.listErrorFrames(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getErrorFramesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listErrorFramesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + client.listErrorFrames(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listErrorFramesTest2() throws Exception { + ErrorFrame responsesElement = ErrorFrame.newBuilder().build(); + ListErrorFramesResponse expectedResponse = + ListErrorFramesResponse.newBuilder() + .setNextPageToken("") + .addAllErrorFrames(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-8435/locations/location-8435/sources/source-8435"; + + ListErrorFramesPagedResponse pagedListResponse = client.listErrorFrames(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getErrorFramesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listErrorFramesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-8435/locations/location-8435/sources/source-8435"; + client.listErrorFrames(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getErrorFrameTest() throws Exception { + ErrorFrame expectedResponse = + ErrorFrame.newBuilder() + .setName( + ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]") + .toString()) + .addAllViolations(new ArrayList()) + .setOriginalFrame(AssetFrame.newBuilder().build()) + .setIngestionTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ErrorFrameName name = ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]"); + + ErrorFrame actualResponse = client.getErrorFrame(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getErrorFrameExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ErrorFrameName name = + ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]"); + client.getErrorFrame(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getErrorFrameTest2() throws Exception { + ErrorFrame expectedResponse = + ErrorFrame.newBuilder() + .setName( + ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]") + .toString()) + .addAllViolations(new ArrayList()) + .setOriginalFrame(AssetFrame.newBuilder().build()) + .setIngestionTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3928/locations/location-3928/sources/source-3928/errorFrames/errorFrame-3928"; + + ErrorFrame actualResponse = client.getErrorFrame(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getErrorFrameExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3928/locations/location-3928/sources/source-3928/errorFrames/errorFrame-3928"; + client.getErrorFrame(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSourcesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest2() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSourcesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + mockService.addResponse(expectedResponse); + + SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + + Source actualResponse = client.getSource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + client.getSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSourceTest2() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2226/locations/location-2226/sources/source-2226"; + + Source actualResponse = client.getSource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSourceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2226/locations/location-2226/sources/source-2226"; + client.getSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Source source = Source.newBuilder().build(); + String sourceId = "sourceId1746327190"; + + Source actualResponse = client.createSourceAsync(parent, source, sourceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Source source = Source.newBuilder().build(); + String sourceId = "sourceId1746327190"; + client.createSourceAsync(parent, source, sourceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createSourceTest2() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Source source = Source.newBuilder().build(); + String sourceId = "sourceId1746327190"; + + Source actualResponse = client.createSourceAsync(parent, source, sourceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSourceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Source source = Source.newBuilder().build(); + String sourceId = "sourceId1746327190"; + client.createSourceAsync(parent, source, sourceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Source source = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Source actualResponse = client.updateSourceAsync(source, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Source source = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSourceAsync(source, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteSourceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + + client.deleteSourceAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + client.deleteSourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteSourceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-2226/locations/location-2226/sources/source-2226"; + + client.deleteSourceAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSourceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2226/locations/location-2226/sources/source-2226"; + client.deleteSourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listPreferenceSetsTest() throws Exception { + PreferenceSet responsesElement = PreferenceSet.newBuilder().build(); + ListPreferenceSetsResponse expectedResponse = + ListPreferenceSetsResponse.newBuilder() + .setNextPageToken("") + .addAllPreferenceSets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPreferenceSetsPagedResponse pagedListResponse = client.listPreferenceSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPreferenceSetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPreferenceSetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPreferenceSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPreferenceSetsTest2() throws Exception { + PreferenceSet responsesElement = PreferenceSet.newBuilder().build(); + ListPreferenceSetsResponse expectedResponse = + ListPreferenceSetsResponse.newBuilder() + .setNextPageToken("") + .addAllPreferenceSets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListPreferenceSetsPagedResponse pagedListResponse = client.listPreferenceSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPreferenceSetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPreferenceSetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listPreferenceSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPreferenceSetTest() throws Exception { + PreferenceSet expectedResponse = + PreferenceSet.newBuilder() + .setName(PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); + + PreferenceSet actualResponse = client.getPreferenceSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPreferenceSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); + client.getPreferenceSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPreferenceSetTest2() throws Exception { + PreferenceSet expectedResponse = + PreferenceSet.newBuilder() + .setName(PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3460/locations/location-3460/preferenceSets/preferenceSet-3460"; + + PreferenceSet actualResponse = client.getPreferenceSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPreferenceSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3460/locations/location-3460/preferenceSets/preferenceSet-3460"; + client.getPreferenceSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPreferenceSetTest() throws Exception { + PreferenceSet expectedResponse = + PreferenceSet.newBuilder() + .setName(PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPreferenceSetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + String preferenceSetId = "preferenceSetId-569419518"; + + PreferenceSet actualResponse = + client.createPreferenceSetAsync(parent, preferenceSet, preferenceSetId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPreferenceSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + String preferenceSetId = "preferenceSetId-569419518"; + client.createPreferenceSetAsync(parent, preferenceSet, preferenceSetId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createPreferenceSetTest2() throws Exception { + PreferenceSet expectedResponse = + PreferenceSet.newBuilder() + .setName(PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPreferenceSetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + String preferenceSetId = "preferenceSetId-569419518"; + + PreferenceSet actualResponse = + client.createPreferenceSetAsync(parent, preferenceSet, preferenceSetId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPreferenceSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + String preferenceSetId = "preferenceSetId-569419518"; + client.createPreferenceSetAsync(parent, preferenceSet, preferenceSetId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updatePreferenceSetTest() throws Exception { + PreferenceSet expectedResponse = + PreferenceSet.newBuilder() + .setName(PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePreferenceSetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PreferenceSet preferenceSet = + PreferenceSet.newBuilder() + .setName(PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PreferenceSet actualResponse = client.updatePreferenceSetAsync(preferenceSet, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updatePreferenceSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PreferenceSet preferenceSet = + PreferenceSet.newBuilder() + .setName( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePreferenceSetAsync(preferenceSet, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePreferenceSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePreferenceSetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); + + client.deletePreferenceSetAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePreferenceSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); + client.deletePreferenceSetAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePreferenceSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePreferenceSetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-3460/locations/location-3460/preferenceSets/preferenceSet-3460"; + + client.deletePreferenceSetAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePreferenceSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3460/locations/location-3460/preferenceSets/preferenceSet-3460"; + client.deletePreferenceSetAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) + .setPreferenceSet( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + SettingsName name = SettingsName.of("[PROJECT]", "[LOCATION]"); + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SettingsName name = SettingsName.of("[PROJECT]", "[LOCATION]"); + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSettingsTest2() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) + .setPreferenceSet( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7640/locations/location-7640/settings"; + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSettingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7640/locations/location-7640/settings"; + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) + .setPreferenceSet( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSettingsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Settings settings = + Settings.newBuilder() + .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) + .setPreferenceSet( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Settings actualResponse = client.updateSettingsAsync(settings, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Settings settings = + Settings.newBuilder() + .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) + .setPreferenceSet( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSettingsAsync(settings, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createReportConfigTest() throws Exception { + ReportConfig expectedResponse = + ReportConfig.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupPreferencesetAssignments( + new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createReportConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ReportConfig reportConfig = ReportConfig.newBuilder().build(); + String reportConfigId = "reportConfigId1951664465"; + + ReportConfig actualResponse = + client.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createReportConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ReportConfig reportConfig = ReportConfig.newBuilder().build(); + String reportConfigId = "reportConfigId1951664465"; + client.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createReportConfigTest2() throws Exception { + ReportConfig expectedResponse = + ReportConfig.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupPreferencesetAssignments( + new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createReportConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + ReportConfig reportConfig = ReportConfig.newBuilder().build(); + String reportConfigId = "reportConfigId1951664465"; + + ReportConfig actualResponse = + client.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createReportConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + ReportConfig reportConfig = ReportConfig.newBuilder().build(); + String reportConfigId = "reportConfigId1951664465"; + client.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getReportConfigTest() throws Exception { + ReportConfig expectedResponse = + ReportConfig.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupPreferencesetAssignments( + new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + + ReportConfig actualResponse = client.getReportConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getReportConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + client.getReportConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReportConfigTest2() throws Exception { + ReportConfig expectedResponse = + ReportConfig.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupPreferencesetAssignments( + new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2365/locations/location-2365/reportConfigs/reportConfig-2365"; + + ReportConfig actualResponse = client.getReportConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getReportConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2365/locations/location-2365/reportConfigs/reportConfig-2365"; + client.getReportConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReportConfigsTest() throws Exception { + ReportConfig responsesElement = ReportConfig.newBuilder().build(); + ListReportConfigsResponse expectedResponse = + ListReportConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllReportConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListReportConfigsPagedResponse pagedListResponse = client.listReportConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReportConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listReportConfigsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listReportConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReportConfigsTest2() throws Exception { + ReportConfig responsesElement = ReportConfig.newBuilder().build(); + ListReportConfigsResponse expectedResponse = + ListReportConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllReportConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListReportConfigsPagedResponse pagedListResponse = client.listReportConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReportConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listReportConfigsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listReportConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReportConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteReportConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + + client.deleteReportConfigAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteReportConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + client.deleteReportConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteReportConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteReportConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-2365/locations/location-2365/reportConfigs/reportConfig-2365"; + + client.deleteReportConfigAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteReportConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2365/locations/location-2365/reportConfigs/reportConfig-2365"; + client.deleteReportConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createReportTest() throws Exception { + Report expectedResponse = + Report.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSummary(ReportSummary.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createReportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + Report report = Report.newBuilder().build(); + String reportId = "reportId-427040401"; + + Report actualResponse = client.createReportAsync(parent, report, reportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createReportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + Report report = Report.newBuilder().build(); + String reportId = "reportId-427040401"; + client.createReportAsync(parent, report, reportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createReportTest2() throws Exception { + Report expectedResponse = + Report.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSummary(ReportSummary.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createReportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-9026/locations/location-9026/reportConfigs/reportConfig-9026"; + Report report = Report.newBuilder().build(); + String reportId = "reportId-427040401"; + + Report actualResponse = client.createReportAsync(parent, report, reportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createReportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-9026/locations/location-9026/reportConfigs/reportConfig-9026"; + Report report = Report.newBuilder().build(); + String reportId = "reportId-427040401"; + client.createReportAsync(parent, report, reportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getReportTest() throws Exception { + Report expectedResponse = + Report.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSummary(ReportSummary.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); + + Report actualResponse = client.getReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getReportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); + client.getReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReportTest2() throws Exception { + Report expectedResponse = + Report.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSummary(ReportSummary.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6286/locations/location-6286/reportConfigs/reportConfig-6286/reports/report-6286"; + + Report actualResponse = client.getReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getReportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6286/locations/location-6286/reportConfigs/reportConfig-6286/reports/report-6286"; + client.getReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReportsTest() throws Exception { + Report responsesElement = Report.newBuilder().build(); + ListReportsResponse expectedResponse = + ListReportsResponse.newBuilder() + .setNextPageToken("") + .addAllReports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + + ListReportsPagedResponse pagedListResponse = client.listReports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listReportsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + client.listReports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReportsTest2() throws Exception { + Report responsesElement = Report.newBuilder().build(); + ListReportsResponse expectedResponse = + ListReportsResponse.newBuilder() + .setNextPageToken("") + .addAllReports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9026/locations/location-9026/reportConfigs/reportConfig-9026"; + + ListReportsPagedResponse pagedListResponse = client.listReports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listReportsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-9026/locations/location-9026/reportConfigs/reportConfig-9026"; + client.listReports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReportTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteReportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); + + client.deleteReportAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteReportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); + client.deleteReportAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteReportTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteReportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-6286/locations/location-6286/reportConfigs/reportConfig-6286/reports/report-6286"; + + client.deleteReportAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteReportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6286/locations/location-6286/reportConfigs/reportConfig-6286/reports/report-6286"; + client.deleteReportAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MigrationCenterClientTest.java b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MigrationCenterClientTest.java new file mode 100644 index 000000000000..4b0e919ed257 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MigrationCenterClientTest.java @@ -0,0 +1,4299 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListAssetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListErrorFramesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListGroupsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportDataFilesPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportJobsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListLocationsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListPreferenceSetsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportConfigsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportsPagedResponse; +import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListSourcesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class MigrationCenterClientTest { + private static MockLocations mockLocations; + private static MockMigrationCenter mockMigrationCenter; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private MigrationCenterClient client; + + @BeforeClass + public static void startStaticServer() { + mockMigrationCenter = new MockMigrationCenter(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockMigrationCenter, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + MigrationCenterSettings settings = + MigrationCenterSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = MigrationCenterClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listAssetsTest() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssetsTest2() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAssetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssetTest() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAttributes(new HashMap()) + .setInsightList(InsightList.newBuilder().build()) + .setPerformanceData(AssetPerformanceData.newBuilder().build()) + .addAllSources(new ArrayList()) + .addAllAssignedGroups(new ArrayList()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); + + Asset actualResponse = client.getAsset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAssetRequest actualRequest = ((GetAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); + client.getAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssetTest2() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAttributes(new HashMap()) + .setInsightList(InsightList.newBuilder().build()) + .setPerformanceData(AssetPerformanceData.newBuilder().build()) + .addAllSources(new ArrayList()) + .addAllAssignedGroups(new ArrayList()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + Asset actualResponse = client.getAsset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAssetRequest actualRequest = ((GetAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAssetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.getAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAssetTest() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAttributes(new HashMap()) + .setInsightList(InsightList.newBuilder().build()) + .setPerformanceData(AssetPerformanceData.newBuilder().build()) + .addAllSources(new ArrayList()) + .addAllAssignedGroups(new ArrayList()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + Asset asset = Asset.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Asset actualResponse = client.updateAsset(asset, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAssetRequest actualRequest = ((UpdateAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(asset, actualRequest.getAsset()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + Asset asset = Asset.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAsset(asset, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchUpdateAssetsTest() throws Exception { + BatchUpdateAssetsResponse expectedResponse = + BatchUpdateAssetsResponse.newBuilder().addAllAssets(new ArrayList()).build(); + mockMigrationCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List requests = new ArrayList<>(); + + BatchUpdateAssetsResponse actualResponse = client.batchUpdateAssets(parent, requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchUpdateAssetsRequest actualRequest = ((BatchUpdateAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchUpdateAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List requests = new ArrayList<>(); + client.batchUpdateAssets(parent, requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchUpdateAssetsTest2() throws Exception { + BatchUpdateAssetsResponse expectedResponse = + BatchUpdateAssetsResponse.newBuilder().addAllAssets(new ArrayList()).build(); + mockMigrationCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + List requests = new ArrayList<>(); + + BatchUpdateAssetsResponse actualResponse = client.batchUpdateAssets(parent, requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchUpdateAssetsRequest actualRequest = ((BatchUpdateAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchUpdateAssetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + List requests = new ArrayList<>(); + client.batchUpdateAssets(parent, requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAssetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockMigrationCenter.addResponse(expectedResponse); + + AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); + + client.deleteAsset(name); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAssetRequest actualRequest = ((DeleteAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); + client.deleteAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAssetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockMigrationCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteAsset(name); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAssetRequest actualRequest = ((DeleteAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAssetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.deleteAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchDeleteAssetsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockMigrationCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List names = new ArrayList<>(); + + client.batchDeleteAssets(parent, names); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteAssetsRequest actualRequest = ((BatchDeleteAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(names, actualRequest.getNamesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchDeleteAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List names = new ArrayList<>(); + client.batchDeleteAssets(parent, names); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchDeleteAssetsTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockMigrationCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + List names = new ArrayList<>(); + + client.batchDeleteAssets(parent, names); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteAssetsRequest actualRequest = ((BatchDeleteAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(names, actualRequest.getNamesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchDeleteAssetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + List names = new ArrayList<>(); + client.batchDeleteAssets(parent, names); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void reportAssetFramesTest() throws Exception { + ReportAssetFramesResponse expectedResponse = ReportAssetFramesResponse.newBuilder().build(); + mockMigrationCenter.addResponse(expectedResponse); + + ReportAssetFramesRequest request = + ReportAssetFramesRequest.newBuilder() + .setParent("parent-995424086") + .setFrames(Frames.newBuilder().build()) + .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + + ReportAssetFramesResponse actualResponse = client.reportAssetFrames(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReportAssetFramesRequest actualRequest = ((ReportAssetFramesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getFrames(), actualRequest.getFrames()); + Assert.assertEquals(request.getSource(), actualRequest.getSource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void reportAssetFramesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ReportAssetFramesRequest request = + ReportAssetFramesRequest.newBuilder() + .setParent("parent-995424086") + .setFrames(Frames.newBuilder().build()) + .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + client.reportAssetFrames(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void aggregateAssetsValuesTest() throws Exception { + AggregateAssetsValuesResponse expectedResponse = + AggregateAssetsValuesResponse.newBuilder() + .addAllResults(new ArrayList()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + AggregateAssetsValuesRequest request = + AggregateAssetsValuesRequest.newBuilder() + .setParent("parent-995424086") + .addAllAggregations(new ArrayList()) + .setFilter("filter-1274492040") + .build(); + + AggregateAssetsValuesResponse actualResponse = client.aggregateAssetsValues(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AggregateAssetsValuesRequest actualRequest = + ((AggregateAssetsValuesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getAggregationsList(), actualRequest.getAggregationsList()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void aggregateAssetsValuesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + AggregateAssetsValuesRequest request = + AggregateAssetsValuesRequest.newBuilder() + .setParent("parent-995424086") + .addAllAggregations(new ArrayList()) + .setFilter("filter-1274492040") + .build(); + client.aggregateAssetsValues(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createImportJobTest() throws Exception { + ImportJob expectedResponse = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportJob importJob = ImportJob.newBuilder().build(); + String importJobId = "importJobId1449444627"; + + ImportJob actualResponse = client.createImportJobAsync(parent, importJob, importJobId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateImportJobRequest actualRequest = ((CreateImportJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(importJob, actualRequest.getImportJob()); + Assert.assertEquals(importJobId, actualRequest.getImportJobId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createImportJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportJob importJob = ImportJob.newBuilder().build(); + String importJobId = "importJobId1449444627"; + client.createImportJobAsync(parent, importJob, importJobId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createImportJobTest2() throws Exception { + ImportJob expectedResponse = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String parent = "parent-995424086"; + ImportJob importJob = ImportJob.newBuilder().build(); + String importJobId = "importJobId1449444627"; + + ImportJob actualResponse = client.createImportJobAsync(parent, importJob, importJobId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateImportJobRequest actualRequest = ((CreateImportJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(importJob, actualRequest.getImportJob()); + Assert.assertEquals(importJobId, actualRequest.getImportJobId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createImportJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + ImportJob importJob = ImportJob.newBuilder().build(); + String importJobId = "importJobId1449444627"; + client.createImportJobAsync(parent, importJob, importJobId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listImportJobsTest() throws Exception { + ImportJob responsesElement = ImportJob.newBuilder().build(); + ListImportJobsResponse expectedResponse = + ListImportJobsResponse.newBuilder() + .setNextPageToken("") + .addAllImportJobs(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListImportJobsPagedResponse pagedListResponse = client.listImportJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getImportJobsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListImportJobsRequest actualRequest = ((ListImportJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listImportJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listImportJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listImportJobsTest2() throws Exception { + ImportJob responsesElement = ImportJob.newBuilder().build(); + ListImportJobsResponse expectedResponse = + ListImportJobsResponse.newBuilder() + .setNextPageToken("") + .addAllImportJobs(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListImportJobsPagedResponse pagedListResponse = client.listImportJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getImportJobsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListImportJobsRequest actualRequest = ((ListImportJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listImportJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listImportJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getImportJobTest() throws Exception { + ImportJob expectedResponse = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + + ImportJob actualResponse = client.getImportJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetImportJobRequest actualRequest = ((GetImportJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getImportJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + client.getImportJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getImportJobTest2() throws Exception { + ImportJob expectedResponse = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + ImportJob actualResponse = client.getImportJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetImportJobRequest actualRequest = ((GetImportJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getImportJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.getImportJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteImportJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + + client.deleteImportJobAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteImportJobRequest actualRequest = ((DeleteImportJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteImportJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + client.deleteImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteImportJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteImportJobAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteImportJobRequest actualRequest = ((DeleteImportJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteImportJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.deleteImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateImportJobTest() throws Exception { + ImportJob expectedResponse = + ImportJob.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCompleteTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAssetSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + ImportJob importJob = ImportJob.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ImportJob actualResponse = client.updateImportJobAsync(importJob, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateImportJobRequest actualRequest = ((UpdateImportJobRequest) actualRequests.get(0)); + + Assert.assertEquals(importJob, actualRequest.getImportJob()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateImportJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ImportJob importJob = ImportJob.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateImportJobAsync(importJob, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void validateImportJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("validateImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + + client.validateImportJobAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ValidateImportJobRequest actualRequest = ((ValidateImportJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void validateImportJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + client.validateImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void validateImportJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("validateImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String name = "name3373707"; + + client.validateImportJobAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ValidateImportJobRequest actualRequest = ((ValidateImportJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void validateImportJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.validateImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void runImportJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("runImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + + client.runImportJobAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RunImportJobRequest actualRequest = ((RunImportJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void runImportJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + client.runImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void runImportJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("runImportJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String name = "name3373707"; + + client.runImportJobAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RunImportJobRequest actualRequest = ((RunImportJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void runImportJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.runImportJobAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getImportDataFileTest() throws Exception { + ImportDataFile expectedResponse = + ImportDataFile.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .setDisplayName("displayName1714148973") + .setFormat(ImportJobFormat.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + ImportDataFileName name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); + + ImportDataFile actualResponse = client.getImportDataFile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetImportDataFileRequest actualRequest = ((GetImportDataFileRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getImportDataFileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ImportDataFileName name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); + client.getImportDataFile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getImportDataFileTest2() throws Exception { + ImportDataFile expectedResponse = + ImportDataFile.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .setDisplayName("displayName1714148973") + .setFormat(ImportJobFormat.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + ImportDataFile actualResponse = client.getImportDataFile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetImportDataFileRequest actualRequest = ((GetImportDataFileRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getImportDataFileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.getImportDataFile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listImportDataFilesTest() throws Exception { + ImportDataFile responsesElement = ImportDataFile.newBuilder().build(); + ListImportDataFilesResponse expectedResponse = + ListImportDataFilesResponse.newBuilder() + .setNextPageToken("") + .addAllImportDataFiles(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + + ListImportDataFilesPagedResponse pagedListResponse = client.listImportDataFiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getImportDataFilesList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListImportDataFilesRequest actualRequest = ((ListImportDataFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listImportDataFilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + client.listImportDataFiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listImportDataFilesTest2() throws Exception { + ImportDataFile responsesElement = ImportDataFile.newBuilder().build(); + ListImportDataFilesResponse expectedResponse = + ListImportDataFilesResponse.newBuilder() + .setNextPageToken("") + .addAllImportDataFiles(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListImportDataFilesPagedResponse pagedListResponse = client.listImportDataFiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getImportDataFilesList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListImportDataFilesRequest actualRequest = ((ListImportDataFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listImportDataFilesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listImportDataFiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createImportDataFileTest() throws Exception { + ImportDataFile expectedResponse = + ImportDataFile.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .setDisplayName("displayName1714148973") + .setFormat(ImportJobFormat.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createImportDataFileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); + String importDataFileId = "importDataFileId-1812510330"; + + ImportDataFile actualResponse = + client.createImportDataFileAsync(parent, importDataFile, importDataFileId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateImportDataFileRequest actualRequest = + ((CreateImportDataFileRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(importDataFile, actualRequest.getImportDataFile()); + Assert.assertEquals(importDataFileId, actualRequest.getImportDataFileId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createImportDataFileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); + String importDataFileId = "importDataFileId-1812510330"; + client.createImportDataFileAsync(parent, importDataFile, importDataFileId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createImportDataFileTest2() throws Exception { + ImportDataFile expectedResponse = + ImportDataFile.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .setDisplayName("displayName1714148973") + .setFormat(ImportJobFormat.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createImportDataFileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String parent = "parent-995424086"; + ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); + String importDataFileId = "importDataFileId-1812510330"; + + ImportDataFile actualResponse = + client.createImportDataFileAsync(parent, importDataFile, importDataFileId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateImportDataFileRequest actualRequest = + ((CreateImportDataFileRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(importDataFile, actualRequest.getImportDataFile()); + Assert.assertEquals(importDataFileId, actualRequest.getImportDataFileId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createImportDataFileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); + String importDataFileId = "importDataFileId-1812510330"; + client.createImportDataFileAsync(parent, importDataFile, importDataFileId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteImportDataFileTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteImportDataFileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + ImportDataFileName name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); + + client.deleteImportDataFileAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteImportDataFileRequest actualRequest = + ((DeleteImportDataFileRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteImportDataFileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ImportDataFileName name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); + client.deleteImportDataFileAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteImportDataFileTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteImportDataFileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteImportDataFileAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteImportDataFileRequest actualRequest = + ((DeleteImportDataFileRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteImportDataFileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.deleteImportDataFileAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listGroupsTest() throws Exception { + Group responsesElement = Group.newBuilder().build(); + ListGroupsResponse expectedResponse = + ListGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllGroups(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListGroupsPagedResponse pagedListResponse = client.listGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListGroupsRequest actualRequest = ((ListGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGroupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGroupsTest2() throws Exception { + Group responsesElement = Group.newBuilder().build(); + ListGroupsResponse expectedResponse = + ListGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllGroups(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListGroupsPagedResponse pagedListResponse = client.listGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListGroupsRequest actualRequest = ((ListGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGroupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + + Group actualResponse = client.getGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGroupRequest actualRequest = ((GetGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + client.getGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGroupTest2() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + Group actualResponse = client.getGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGroupRequest actualRequest = ((GetGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.getGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Group group = Group.newBuilder().build(); + String groupId = "groupId293428218"; + + Group actualResponse = client.createGroupAsync(parent, group, groupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateGroupRequest actualRequest = ((CreateGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(group, actualRequest.getGroup()); + Assert.assertEquals(groupId, actualRequest.getGroupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Group group = Group.newBuilder().build(); + String groupId = "groupId293428218"; + client.createGroupAsync(parent, group, groupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createGroupTest2() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String parent = "parent-995424086"; + Group group = Group.newBuilder().build(); + String groupId = "groupId293428218"; + + Group actualResponse = client.createGroupAsync(parent, group, groupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateGroupRequest actualRequest = ((CreateGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(group, actualRequest.getGroup()); + Assert.assertEquals(groupId, actualRequest.getGroupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + Group group = Group.newBuilder().build(); + String groupId = "groupId293428218"; + client.createGroupAsync(parent, group, groupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + Group group = Group.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Group actualResponse = client.updateGroupAsync(group, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateGroupRequest actualRequest = ((UpdateGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(group, actualRequest.getGroup()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + Group group = Group.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGroupAsync(group, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteGroupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + + client.deleteGroupAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteGroupRequest actualRequest = ((DeleteGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + client.deleteGroupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteGroupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteGroupAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteGroupRequest actualRequest = ((DeleteGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.deleteGroupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void addAssetsToGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("addAssetsToGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + + Group actualResponse = client.addAssetsToGroupAsync(group).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddAssetsToGroupRequest actualRequest = ((AddAssetsToGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(group.toString(), actualRequest.getGroup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addAssetsToGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + client.addAssetsToGroupAsync(group).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void addAssetsToGroupTest2() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("addAssetsToGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String group = "group98629247"; + + Group actualResponse = client.addAssetsToGroupAsync(group).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddAssetsToGroupRequest actualRequest = ((AddAssetsToGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(group, actualRequest.getGroup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addAssetsToGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String group = "group98629247"; + client.addAssetsToGroupAsync(group).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void removeAssetsFromGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("removeAssetsFromGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + + Group actualResponse = client.removeAssetsFromGroupAsync(group).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveAssetsFromGroupRequest actualRequest = + ((RemoveAssetsFromGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(group.toString(), actualRequest.getGroup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeAssetsFromGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + client.removeAssetsFromGroupAsync(group).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void removeAssetsFromGroupTest2() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("removeAssetsFromGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String group = "group98629247"; + + Group actualResponse = client.removeAssetsFromGroupAsync(group).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveAssetsFromGroupRequest actualRequest = + ((RemoveAssetsFromGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(group, actualRequest.getGroup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeAssetsFromGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String group = "group98629247"; + client.removeAssetsFromGroupAsync(group).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listErrorFramesTest() throws Exception { + ErrorFrame responsesElement = ErrorFrame.newBuilder().build(); + ListErrorFramesResponse expectedResponse = + ListErrorFramesResponse.newBuilder() + .setNextPageToken("") + .addAllErrorFrames(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + + ListErrorFramesPagedResponse pagedListResponse = client.listErrorFrames(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getErrorFramesList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListErrorFramesRequest actualRequest = ((ListErrorFramesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listErrorFramesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + client.listErrorFrames(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listErrorFramesTest2() throws Exception { + ErrorFrame responsesElement = ErrorFrame.newBuilder().build(); + ListErrorFramesResponse expectedResponse = + ListErrorFramesResponse.newBuilder() + .setNextPageToken("") + .addAllErrorFrames(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListErrorFramesPagedResponse pagedListResponse = client.listErrorFrames(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getErrorFramesList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListErrorFramesRequest actualRequest = ((ListErrorFramesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listErrorFramesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listErrorFrames(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getErrorFrameTest() throws Exception { + ErrorFrame expectedResponse = + ErrorFrame.newBuilder() + .setName( + ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]") + .toString()) + .addAllViolations(new ArrayList()) + .setOriginalFrame(AssetFrame.newBuilder().build()) + .setIngestionTime(Timestamp.newBuilder().build()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + ErrorFrameName name = ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]"); + + ErrorFrame actualResponse = client.getErrorFrame(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetErrorFrameRequest actualRequest = ((GetErrorFrameRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getErrorFrameExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ErrorFrameName name = + ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]"); + client.getErrorFrame(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getErrorFrameTest2() throws Exception { + ErrorFrame expectedResponse = + ErrorFrame.newBuilder() + .setName( + ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]") + .toString()) + .addAllViolations(new ArrayList()) + .setOriginalFrame(AssetFrame.newBuilder().build()) + .setIngestionTime(Timestamp.newBuilder().build()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + ErrorFrame actualResponse = client.getErrorFrame(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetErrorFrameRequest actualRequest = ((GetErrorFrameRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getErrorFrameExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.getErrorFrame(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSourcesRequest actualRequest = ((ListSourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSourcesTest2() throws Exception { + Source responsesElement = Source.newBuilder().build(); + ListSourcesResponse expectedResponse = + ListSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllSources(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSourcesPagedResponse pagedListResponse = client.listSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSourcesList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSourcesRequest actualRequest = ((ListSourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSourcesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + + Source actualResponse = client.getSource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSourceRequest actualRequest = ((GetSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + client.getSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSourceTest2() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + Source actualResponse = client.getSource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSourceRequest actualRequest = ((GetSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.getSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Source source = Source.newBuilder().build(); + String sourceId = "sourceId1746327190"; + + Source actualResponse = client.createSourceAsync(parent, source, sourceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSourceRequest actualRequest = ((CreateSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(source, actualRequest.getSource()); + Assert.assertEquals(sourceId, actualRequest.getSourceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Source source = Source.newBuilder().build(); + String sourceId = "sourceId1746327190"; + client.createSourceAsync(parent, source, sourceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createSourceTest2() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String parent = "parent-995424086"; + Source source = Source.newBuilder().build(); + String sourceId = "sourceId1746327190"; + + Source actualResponse = client.createSourceAsync(parent, source, sourceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSourceRequest actualRequest = ((CreateSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(source, actualRequest.getSource()); + Assert.assertEquals(sourceId, actualRequest.getSourceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + Source source = Source.newBuilder().build(); + String sourceId = "sourceId1746327190"; + client.createSourceAsync(parent, source, sourceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateSourceTest() throws Exception { + Source expectedResponse = + Source.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPriority(-1165461084) + .setManaged(true) + .setPendingFrameCount(322639125) + .setErrorFrameCount(1431911430) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + Source source = Source.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Source actualResponse = client.updateSourceAsync(source, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSourceRequest actualRequest = ((UpdateSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(source, actualRequest.getSource()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + Source source = Source.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSourceAsync(source, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteSourceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + + client.deleteSourceAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSourceRequest actualRequest = ((DeleteSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + client.deleteSourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteSourceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteSourceAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSourceRequest actualRequest = ((DeleteSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.deleteSourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listPreferenceSetsTest() throws Exception { + PreferenceSet responsesElement = PreferenceSet.newBuilder().build(); + ListPreferenceSetsResponse expectedResponse = + ListPreferenceSetsResponse.newBuilder() + .setNextPageToken("") + .addAllPreferenceSets(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPreferenceSetsPagedResponse pagedListResponse = client.listPreferenceSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPreferenceSetsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPreferenceSetsRequest actualRequest = ((ListPreferenceSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPreferenceSetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPreferenceSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPreferenceSetsTest2() throws Exception { + PreferenceSet responsesElement = PreferenceSet.newBuilder().build(); + ListPreferenceSetsResponse expectedResponse = + ListPreferenceSetsResponse.newBuilder() + .setNextPageToken("") + .addAllPreferenceSets(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPreferenceSetsPagedResponse pagedListResponse = client.listPreferenceSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPreferenceSetsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPreferenceSetsRequest actualRequest = ((ListPreferenceSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPreferenceSetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPreferenceSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPreferenceSetTest() throws Exception { + PreferenceSet expectedResponse = + PreferenceSet.newBuilder() + .setName(PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); + + PreferenceSet actualResponse = client.getPreferenceSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPreferenceSetRequest actualRequest = ((GetPreferenceSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPreferenceSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); + client.getPreferenceSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPreferenceSetTest2() throws Exception { + PreferenceSet expectedResponse = + PreferenceSet.newBuilder() + .setName(PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + PreferenceSet actualResponse = client.getPreferenceSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPreferenceSetRequest actualRequest = ((GetPreferenceSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPreferenceSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.getPreferenceSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPreferenceSetTest() throws Exception { + PreferenceSet expectedResponse = + PreferenceSet.newBuilder() + .setName(PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPreferenceSetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + String preferenceSetId = "preferenceSetId-569419518"; + + PreferenceSet actualResponse = + client.createPreferenceSetAsync(parent, preferenceSet, preferenceSetId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePreferenceSetRequest actualRequest = ((CreatePreferenceSetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(preferenceSet, actualRequest.getPreferenceSet()); + Assert.assertEquals(preferenceSetId, actualRequest.getPreferenceSetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPreferenceSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + String preferenceSetId = "preferenceSetId-569419518"; + client.createPreferenceSetAsync(parent, preferenceSet, preferenceSetId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createPreferenceSetTest2() throws Exception { + PreferenceSet expectedResponse = + PreferenceSet.newBuilder() + .setName(PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPreferenceSetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String parent = "parent-995424086"; + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + String preferenceSetId = "preferenceSetId-569419518"; + + PreferenceSet actualResponse = + client.createPreferenceSetAsync(parent, preferenceSet, preferenceSetId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePreferenceSetRequest actualRequest = ((CreatePreferenceSetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(preferenceSet, actualRequest.getPreferenceSet()); + Assert.assertEquals(preferenceSetId, actualRequest.getPreferenceSetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPreferenceSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + String preferenceSetId = "preferenceSetId-569419518"; + client.createPreferenceSetAsync(parent, preferenceSet, preferenceSetId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updatePreferenceSetTest() throws Exception { + PreferenceSet expectedResponse = + PreferenceSet.newBuilder() + .setName(PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVirtualMachinePreferences(VirtualMachinePreferences.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePreferenceSetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PreferenceSet actualResponse = client.updatePreferenceSetAsync(preferenceSet, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePreferenceSetRequest actualRequest = ((UpdatePreferenceSetRequest) actualRequests.get(0)); + + Assert.assertEquals(preferenceSet, actualRequest.getPreferenceSet()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePreferenceSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePreferenceSetAsync(preferenceSet, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePreferenceSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePreferenceSetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); + + client.deletePreferenceSetAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePreferenceSetRequest actualRequest = ((DeletePreferenceSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePreferenceSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); + client.deletePreferenceSetAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePreferenceSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePreferenceSetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String name = "name3373707"; + + client.deletePreferenceSetAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePreferenceSetRequest actualRequest = ((DeletePreferenceSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePreferenceSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.deletePreferenceSetAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) + .setPreferenceSet( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + SettingsName name = SettingsName.of("[PROJECT]", "[LOCATION]"); + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSettingsRequest actualRequest = ((GetSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + SettingsName name = SettingsName.of("[PROJECT]", "[LOCATION]"); + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSettingsTest2() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) + .setPreferenceSet( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSettingsRequest actualRequest = ((GetSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSettingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) + .setPreferenceSet( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSettingsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + Settings settings = Settings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Settings actualResponse = client.updateSettingsAsync(settings, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSettingsRequest actualRequest = ((UpdateSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(settings, actualRequest.getSettings()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + Settings settings = Settings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSettingsAsync(settings, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createReportConfigTest() throws Exception { + ReportConfig expectedResponse = + ReportConfig.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupPreferencesetAssignments( + new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createReportConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ReportConfig reportConfig = ReportConfig.newBuilder().build(); + String reportConfigId = "reportConfigId1951664465"; + + ReportConfig actualResponse = + client.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReportConfigRequest actualRequest = ((CreateReportConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(reportConfig, actualRequest.getReportConfig()); + Assert.assertEquals(reportConfigId, actualRequest.getReportConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReportConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ReportConfig reportConfig = ReportConfig.newBuilder().build(); + String reportConfigId = "reportConfigId1951664465"; + client.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createReportConfigTest2() throws Exception { + ReportConfig expectedResponse = + ReportConfig.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupPreferencesetAssignments( + new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createReportConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String parent = "parent-995424086"; + ReportConfig reportConfig = ReportConfig.newBuilder().build(); + String reportConfigId = "reportConfigId1951664465"; + + ReportConfig actualResponse = + client.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReportConfigRequest actualRequest = ((CreateReportConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(reportConfig, actualRequest.getReportConfig()); + Assert.assertEquals(reportConfigId, actualRequest.getReportConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReportConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + ReportConfig reportConfig = ReportConfig.newBuilder().build(); + String reportConfigId = "reportConfigId1951664465"; + client.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getReportConfigTest() throws Exception { + ReportConfig expectedResponse = + ReportConfig.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupPreferencesetAssignments( + new ArrayList()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + + ReportConfig actualResponse = client.getReportConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReportConfigRequest actualRequest = ((GetReportConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReportConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + client.getReportConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReportConfigTest2() throws Exception { + ReportConfig expectedResponse = + ReportConfig.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupPreferencesetAssignments( + new ArrayList()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + ReportConfig actualResponse = client.getReportConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReportConfigRequest actualRequest = ((GetReportConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReportConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.getReportConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReportConfigsTest() throws Exception { + ReportConfig responsesElement = ReportConfig.newBuilder().build(); + ListReportConfigsResponse expectedResponse = + ListReportConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllReportConfigs(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListReportConfigsPagedResponse pagedListResponse = client.listReportConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReportConfigsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReportConfigsRequest actualRequest = ((ListReportConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReportConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listReportConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReportConfigsTest2() throws Exception { + ReportConfig responsesElement = ReportConfig.newBuilder().build(); + ListReportConfigsResponse expectedResponse = + ListReportConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllReportConfigs(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListReportConfigsPagedResponse pagedListResponse = client.listReportConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReportConfigsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReportConfigsRequest actualRequest = ((ListReportConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReportConfigsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listReportConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReportConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteReportConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + + client.deleteReportConfigAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteReportConfigRequest actualRequest = ((DeleteReportConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteReportConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + client.deleteReportConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteReportConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteReportConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteReportConfigAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteReportConfigRequest actualRequest = ((DeleteReportConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteReportConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.deleteReportConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createReportTest() throws Exception { + Report expectedResponse = + Report.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSummary(ReportSummary.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createReportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + Report report = Report.newBuilder().build(); + String reportId = "reportId-427040401"; + + Report actualResponse = client.createReportAsync(parent, report, reportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReportRequest actualRequest = ((CreateReportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(report, actualRequest.getReport()); + Assert.assertEquals(reportId, actualRequest.getReportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + Report report = Report.newBuilder().build(); + String reportId = "reportId-427040401"; + client.createReportAsync(parent, report, reportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createReportTest2() throws Exception { + Report expectedResponse = + Report.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSummary(ReportSummary.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createReportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String parent = "parent-995424086"; + Report report = Report.newBuilder().build(); + String reportId = "reportId-427040401"; + + Report actualResponse = client.createReportAsync(parent, report, reportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReportRequest actualRequest = ((CreateReportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(report, actualRequest.getReport()); + Assert.assertEquals(reportId, actualRequest.getReportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + Report report = Report.newBuilder().build(); + String reportId = "reportId-427040401"; + client.createReportAsync(parent, report, reportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getReportTest() throws Exception { + Report expectedResponse = + Report.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSummary(ReportSummary.newBuilder().build()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); + + Report actualResponse = client.getReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReportRequest actualRequest = ((GetReportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); + client.getReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReportTest2() throws Exception { + Report expectedResponse = + Report.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSummary(ReportSummary.newBuilder().build()) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String name = "name3373707"; + + Report actualResponse = client.getReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReportRequest actualRequest = ((GetReportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.getReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReportsTest() throws Exception { + Report responsesElement = Report.newBuilder().build(); + ListReportsResponse expectedResponse = + ListReportsResponse.newBuilder() + .setNextPageToken("") + .addAllReports(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + + ListReportsPagedResponse pagedListResponse = client.listReports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReportsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReportsRequest actualRequest = ((ListReportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReportsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + client.listReports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReportsTest2() throws Exception { + Report responsesElement = Report.newBuilder().build(); + ListReportsResponse expectedResponse = + ListReportsResponse.newBuilder() + .setNextPageToken("") + .addAllReports(Arrays.asList(responsesElement)) + .build(); + mockMigrationCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListReportsPagedResponse pagedListResponse = client.listReports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReportsList().get(0), resources.get(0)); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReportsRequest actualRequest = ((ListReportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReportsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String parent = "parent-995424086"; + client.listReports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReportTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteReportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); + + client.deleteReportAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteReportRequest actualRequest = ((DeleteReportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteReportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); + client.deleteReportAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteReportTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteReportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockMigrationCenter.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteReportAsync(name).get(); + + List actualRequests = mockMigrationCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteReportRequest actualRequest = ((DeleteReportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteReportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockMigrationCenter.addException(exception); + + try { + String name = "name3373707"; + client.deleteReportAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockLocations.java b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockLocations.java new file mode 100644 index 000000000000..b8c992bcb853 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockLocationsImpl.java b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..742b1ddbd8b6 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockMigrationCenter.java b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockMigrationCenter.java new file mode 100644 index 000000000000..4a44db55bb13 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockMigrationCenter.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockMigrationCenter implements MockGrpcService { + private final MockMigrationCenterImpl serviceImpl; + + public MockMigrationCenter() { + serviceImpl = new MockMigrationCenterImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockMigrationCenterImpl.java b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockMigrationCenterImpl.java new file mode 100644 index 000000000000..0ebd5b9042d6 --- /dev/null +++ b/java-migrationcenter/google-cloud-migrationcenter/src/test/java/com/google/cloud/migrationcenter/v1/MockMigrationCenterImpl.java @@ -0,0 +1,1066 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.migrationcenter.v1.MigrationCenterGrpc.MigrationCenterImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockMigrationCenterImpl extends MigrationCenterImplBase { + private List requests; + private Queue responses; + + public MockMigrationCenterImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listAssets( + ListAssetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAssetsResponse) { + requests.add(request); + responseObserver.onNext(((ListAssetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAssetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAsset(GetAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Asset) { + requests.add(request); + responseObserver.onNext(((Asset) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Asset.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAsset(UpdateAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Asset) { + requests.add(request); + responseObserver.onNext(((Asset) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Asset.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchUpdateAssets( + BatchUpdateAssetsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchUpdateAssetsResponse) { + requests.add(request); + responseObserver.onNext(((BatchUpdateAssetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchUpdateAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchUpdateAssetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAsset(DeleteAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchDeleteAssets( + BatchDeleteAssetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchDeleteAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void reportAssetFrames( + ReportAssetFramesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ReportAssetFramesResponse) { + requests.add(request); + responseObserver.onNext(((ReportAssetFramesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ReportAssetFrames, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReportAssetFramesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void aggregateAssetsValues( + AggregateAssetsValuesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AggregateAssetsValuesResponse) { + requests.add(request); + responseObserver.onNext(((AggregateAssetsValuesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AggregateAssetsValues, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AggregateAssetsValuesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createImportJob( + CreateImportJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateImportJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listImportJobs( + ListImportJobsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListImportJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListImportJobsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListImportJobs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListImportJobsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getImportJob( + GetImportJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ImportJob) { + requests.add(request); + responseObserver.onNext(((ImportJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetImportJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ImportJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteImportJob( + DeleteImportJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteImportJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateImportJob( + UpdateImportJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateImportJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void validateImportJob( + ValidateImportJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ValidateImportJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void runImportJob( + RunImportJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RunImportJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getImportDataFile( + GetImportDataFileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ImportDataFile) { + requests.add(request); + responseObserver.onNext(((ImportDataFile) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetImportDataFile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ImportDataFile.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listImportDataFiles( + ListImportDataFilesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListImportDataFilesResponse) { + requests.add(request); + responseObserver.onNext(((ListImportDataFilesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListImportDataFiles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListImportDataFilesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createImportDataFile( + CreateImportDataFileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateImportDataFile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteImportDataFile( + DeleteImportDataFileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteImportDataFile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listGroups( + ListGroupsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListGroupsResponse) { + requests.add(request); + responseObserver.onNext(((ListGroupsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListGroups, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListGroupsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getGroup(GetGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Group) { + requests.add(request); + responseObserver.onNext(((Group) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Group.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createGroup(CreateGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateGroup(UpdateGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteGroup(DeleteGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void addAssetsToGroup( + AddAssetsToGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AddAssetsToGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void removeAssetsFromGroup( + RemoveAssetsFromGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RemoveAssetsFromGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listErrorFrames( + ListErrorFramesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListErrorFramesResponse) { + requests.add(request); + responseObserver.onNext(((ListErrorFramesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListErrorFrames, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListErrorFramesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getErrorFrame( + GetErrorFrameRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ErrorFrame) { + requests.add(request); + responseObserver.onNext(((ErrorFrame) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetErrorFrame, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ErrorFrame.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSources( + ListSourcesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSourcesResponse) { + requests.add(request); + responseObserver.onNext(((ListSourcesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSources, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSourcesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSource(GetSourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Source) { + requests.add(request); + responseObserver.onNext(((Source) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Source.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSource( + CreateSourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSource( + UpdateSourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSource( + DeleteSourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPreferenceSets( + ListPreferenceSetsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPreferenceSetsResponse) { + requests.add(request); + responseObserver.onNext(((ListPreferenceSetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPreferenceSets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPreferenceSetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPreferenceSet( + GetPreferenceSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PreferenceSet) { + requests.add(request); + responseObserver.onNext(((PreferenceSet) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPreferenceSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PreferenceSet.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createPreferenceSet( + CreatePreferenceSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePreferenceSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePreferenceSet( + UpdatePreferenceSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePreferenceSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePreferenceSet( + DeletePreferenceSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePreferenceSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSettings(GetSettingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Settings) { + requests.add(request); + responseObserver.onNext(((Settings) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Settings.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSettings( + UpdateSettingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createReportConfig( + CreateReportConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateReportConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getReportConfig( + GetReportConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ReportConfig) { + requests.add(request); + responseObserver.onNext(((ReportConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetReportConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReportConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listReportConfigs( + ListReportConfigsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListReportConfigsResponse) { + requests.add(request); + responseObserver.onNext(((ListReportConfigsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListReportConfigs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListReportConfigsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteReportConfig( + DeleteReportConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteReportConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createReport( + CreateReportRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateReport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getReport(GetReportRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Report) { + requests.add(request); + responseObserver.onNext(((Report) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetReport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Report.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listReports( + ListReportsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListReportsResponse) { + requests.add(request); + responseObserver.onNext(((ListReportsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListReports, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListReportsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteReport( + DeleteReportRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteReport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-migrationcenter/grpc-google-cloud-migrationcenter-v1/pom.xml b/java-migrationcenter/grpc-google-cloud-migrationcenter-v1/pom.xml new file mode 100644 index 000000000000..54a4e8ebfee3 --- /dev/null +++ b/java-migrationcenter/grpc-google-cloud-migrationcenter-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-migrationcenter-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-migrationcenter-v1 + GRPC library for google-cloud-migrationcenter + + com.google.cloud + google-cloud-migrationcenter-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-migrationcenter-v1 + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-migrationcenter/grpc-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterGrpc.java b/java-migrationcenter/grpc-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterGrpc.java new file mode 100644 index 000000000000..a6fd4e7640c8 --- /dev/null +++ b/java-migrationcenter/grpc-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterGrpc.java @@ -0,0 +1,5886 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.migrationcenter.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service describing handlers for resources.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/migrationcenter/v1/migrationcenter.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class MigrationCenterGrpc { + + private MigrationCenterGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.migrationcenter.v1.MigrationCenter"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListAssetsRequest, + com.google.cloud.migrationcenter.v1.ListAssetsResponse> + getListAssetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAssets", + requestType = com.google.cloud.migrationcenter.v1.ListAssetsRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ListAssetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListAssetsRequest, + com.google.cloud.migrationcenter.v1.ListAssetsResponse> + getListAssetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListAssetsRequest, + com.google.cloud.migrationcenter.v1.ListAssetsResponse> + getListAssetsMethod; + if ((getListAssetsMethod = MigrationCenterGrpc.getListAssetsMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getListAssetsMethod = MigrationCenterGrpc.getListAssetsMethod) == null) { + MigrationCenterGrpc.getListAssetsMethod = + getListAssetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAssets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListAssetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListAssetsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("ListAssets")) + .build(); + } + } + } + return getListAssetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetAssetRequest, + com.google.cloud.migrationcenter.v1.Asset> + getGetAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAsset", + requestType = com.google.cloud.migrationcenter.v1.GetAssetRequest.class, + responseType = com.google.cloud.migrationcenter.v1.Asset.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetAssetRequest, + com.google.cloud.migrationcenter.v1.Asset> + getGetAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetAssetRequest, + com.google.cloud.migrationcenter.v1.Asset> + getGetAssetMethod; + if ((getGetAssetMethod = MigrationCenterGrpc.getGetAssetMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getGetAssetMethod = MigrationCenterGrpc.getGetAssetMethod) == null) { + MigrationCenterGrpc.getGetAssetMethod = + getGetAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.GetAssetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance())) + .setSchemaDescriptor(new MigrationCenterMethodDescriptorSupplier("GetAsset")) + .build(); + } + } + } + return getGetAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateAssetRequest, + com.google.cloud.migrationcenter.v1.Asset> + getUpdateAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAsset", + requestType = com.google.cloud.migrationcenter.v1.UpdateAssetRequest.class, + responseType = com.google.cloud.migrationcenter.v1.Asset.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateAssetRequest, + com.google.cloud.migrationcenter.v1.Asset> + getUpdateAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateAssetRequest, + com.google.cloud.migrationcenter.v1.Asset> + getUpdateAssetMethod; + if ((getUpdateAssetMethod = MigrationCenterGrpc.getUpdateAssetMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getUpdateAssetMethod = MigrationCenterGrpc.getUpdateAssetMethod) == null) { + MigrationCenterGrpc.getUpdateAssetMethod = + getUpdateAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.UpdateAssetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("UpdateAsset")) + .build(); + } + } + } + return getUpdateAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest, + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse> + getBatchUpdateAssetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchUpdateAssets", + requestType = com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest.class, + responseType = com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest, + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse> + getBatchUpdateAssetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest, + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse> + getBatchUpdateAssetsMethod; + if ((getBatchUpdateAssetsMethod = MigrationCenterGrpc.getBatchUpdateAssetsMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getBatchUpdateAssetsMethod = MigrationCenterGrpc.getBatchUpdateAssetsMethod) == null) { + MigrationCenterGrpc.getBatchUpdateAssetsMethod = + getBatchUpdateAssetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchUpdateAssets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("BatchUpdateAssets")) + .build(); + } + } + } + return getBatchUpdateAssetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteAssetRequest, com.google.protobuf.Empty> + getDeleteAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAsset", + requestType = com.google.cloud.migrationcenter.v1.DeleteAssetRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteAssetRequest, com.google.protobuf.Empty> + getDeleteAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteAssetRequest, com.google.protobuf.Empty> + getDeleteAssetMethod; + if ((getDeleteAssetMethod = MigrationCenterGrpc.getDeleteAssetMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getDeleteAssetMethod = MigrationCenterGrpc.getDeleteAssetMethod) == null) { + MigrationCenterGrpc.getDeleteAssetMethod = + getDeleteAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.DeleteAssetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("DeleteAsset")) + .build(); + } + } + } + return getDeleteAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest, com.google.protobuf.Empty> + getBatchDeleteAssetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchDeleteAssets", + requestType = com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest, com.google.protobuf.Empty> + getBatchDeleteAssetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest, com.google.protobuf.Empty> + getBatchDeleteAssetsMethod; + if ((getBatchDeleteAssetsMethod = MigrationCenterGrpc.getBatchDeleteAssetsMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getBatchDeleteAssetsMethod = MigrationCenterGrpc.getBatchDeleteAssetsMethod) == null) { + MigrationCenterGrpc.getBatchDeleteAssetsMethod = + getBatchDeleteAssetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchDeleteAssets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("BatchDeleteAssets")) + .build(); + } + } + } + return getBatchDeleteAssetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest, + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse> + getReportAssetFramesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReportAssetFrames", + requestType = com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest, + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse> + getReportAssetFramesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest, + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse> + getReportAssetFramesMethod; + if ((getReportAssetFramesMethod = MigrationCenterGrpc.getReportAssetFramesMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getReportAssetFramesMethod = MigrationCenterGrpc.getReportAssetFramesMethod) == null) { + MigrationCenterGrpc.getReportAssetFramesMethod = + getReportAssetFramesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReportAssetFrames")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("ReportAssetFrames")) + .build(); + } + } + } + return getReportAssetFramesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest, + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse> + getAggregateAssetsValuesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AggregateAssetsValues", + requestType = com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest.class, + responseType = com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest, + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse> + getAggregateAssetsValuesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest, + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse> + getAggregateAssetsValuesMethod; + if ((getAggregateAssetsValuesMethod = MigrationCenterGrpc.getAggregateAssetsValuesMethod) + == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getAggregateAssetsValuesMethod = MigrationCenterGrpc.getAggregateAssetsValuesMethod) + == null) { + MigrationCenterGrpc.getAggregateAssetsValuesMethod = + getAggregateAssetsValuesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "AggregateAssetsValues")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("AggregateAssetsValues")) + .build(); + } + } + } + return getAggregateAssetsValuesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateImportJobRequest, + com.google.longrunning.Operation> + getCreateImportJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateImportJob", + requestType = com.google.cloud.migrationcenter.v1.CreateImportJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateImportJobRequest, + com.google.longrunning.Operation> + getCreateImportJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateImportJobRequest, + com.google.longrunning.Operation> + getCreateImportJobMethod; + if ((getCreateImportJobMethod = MigrationCenterGrpc.getCreateImportJobMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getCreateImportJobMethod = MigrationCenterGrpc.getCreateImportJobMethod) == null) { + MigrationCenterGrpc.getCreateImportJobMethod = + getCreateImportJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateImportJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.CreateImportJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("CreateImportJob")) + .build(); + } + } + } + return getCreateImportJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListImportJobsRequest, + com.google.cloud.migrationcenter.v1.ListImportJobsResponse> + getListImportJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListImportJobs", + requestType = com.google.cloud.migrationcenter.v1.ListImportJobsRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ListImportJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListImportJobsRequest, + com.google.cloud.migrationcenter.v1.ListImportJobsResponse> + getListImportJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListImportJobsRequest, + com.google.cloud.migrationcenter.v1.ListImportJobsResponse> + getListImportJobsMethod; + if ((getListImportJobsMethod = MigrationCenterGrpc.getListImportJobsMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getListImportJobsMethod = MigrationCenterGrpc.getListImportJobsMethod) == null) { + MigrationCenterGrpc.getListImportJobsMethod = + getListImportJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListImportJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListImportJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListImportJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("ListImportJobs")) + .build(); + } + } + } + return getListImportJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetImportJobRequest, + com.google.cloud.migrationcenter.v1.ImportJob> + getGetImportJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetImportJob", + requestType = com.google.cloud.migrationcenter.v1.GetImportJobRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ImportJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetImportJobRequest, + com.google.cloud.migrationcenter.v1.ImportJob> + getGetImportJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetImportJobRequest, + com.google.cloud.migrationcenter.v1.ImportJob> + getGetImportJobMethod; + if ((getGetImportJobMethod = MigrationCenterGrpc.getGetImportJobMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getGetImportJobMethod = MigrationCenterGrpc.getGetImportJobMethod) == null) { + MigrationCenterGrpc.getGetImportJobMethod = + getGetImportJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetImportJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.GetImportJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("GetImportJob")) + .build(); + } + } + } + return getGetImportJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest, + com.google.longrunning.Operation> + getDeleteImportJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteImportJob", + requestType = com.google.cloud.migrationcenter.v1.DeleteImportJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest, + com.google.longrunning.Operation> + getDeleteImportJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest, + com.google.longrunning.Operation> + getDeleteImportJobMethod; + if ((getDeleteImportJobMethod = MigrationCenterGrpc.getDeleteImportJobMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getDeleteImportJobMethod = MigrationCenterGrpc.getDeleteImportJobMethod) == null) { + MigrationCenterGrpc.getDeleteImportJobMethod = + getDeleteImportJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteImportJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("DeleteImportJob")) + .build(); + } + } + } + return getDeleteImportJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest, + com.google.longrunning.Operation> + getUpdateImportJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateImportJob", + requestType = com.google.cloud.migrationcenter.v1.UpdateImportJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest, + com.google.longrunning.Operation> + getUpdateImportJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest, + com.google.longrunning.Operation> + getUpdateImportJobMethod; + if ((getUpdateImportJobMethod = MigrationCenterGrpc.getUpdateImportJobMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getUpdateImportJobMethod = MigrationCenterGrpc.getUpdateImportJobMethod) == null) { + MigrationCenterGrpc.getUpdateImportJobMethod = + getUpdateImportJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateImportJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("UpdateImportJob")) + .build(); + } + } + } + return getUpdateImportJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest, + com.google.longrunning.Operation> + getValidateImportJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidateImportJob", + requestType = com.google.cloud.migrationcenter.v1.ValidateImportJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest, + com.google.longrunning.Operation> + getValidateImportJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest, + com.google.longrunning.Operation> + getValidateImportJobMethod; + if ((getValidateImportJobMethod = MigrationCenterGrpc.getValidateImportJobMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getValidateImportJobMethod = MigrationCenterGrpc.getValidateImportJobMethod) == null) { + MigrationCenterGrpc.getValidateImportJobMethod = + getValidateImportJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidateImportJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("ValidateImportJob")) + .build(); + } + } + } + return getValidateImportJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.RunImportJobRequest, com.google.longrunning.Operation> + getRunImportJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RunImportJob", + requestType = com.google.cloud.migrationcenter.v1.RunImportJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.RunImportJobRequest, com.google.longrunning.Operation> + getRunImportJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.RunImportJobRequest, + com.google.longrunning.Operation> + getRunImportJobMethod; + if ((getRunImportJobMethod = MigrationCenterGrpc.getRunImportJobMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getRunImportJobMethod = MigrationCenterGrpc.getRunImportJobMethod) == null) { + MigrationCenterGrpc.getRunImportJobMethod = + getRunImportJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunImportJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.RunImportJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("RunImportJob")) + .build(); + } + } + } + return getRunImportJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest, + com.google.cloud.migrationcenter.v1.ImportDataFile> + getGetImportDataFileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetImportDataFile", + requestType = com.google.cloud.migrationcenter.v1.GetImportDataFileRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ImportDataFile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest, + com.google.cloud.migrationcenter.v1.ImportDataFile> + getGetImportDataFileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest, + com.google.cloud.migrationcenter.v1.ImportDataFile> + getGetImportDataFileMethod; + if ((getGetImportDataFileMethod = MigrationCenterGrpc.getGetImportDataFileMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getGetImportDataFileMethod = MigrationCenterGrpc.getGetImportDataFileMethod) == null) { + MigrationCenterGrpc.getGetImportDataFileMethod = + getGetImportDataFileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetImportDataFile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ImportDataFile + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("GetImportDataFile")) + .build(); + } + } + } + return getGetImportDataFileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest, + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse> + getListImportDataFilesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListImportDataFiles", + requestType = com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest, + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse> + getListImportDataFilesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest, + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse> + getListImportDataFilesMethod; + if ((getListImportDataFilesMethod = MigrationCenterGrpc.getListImportDataFilesMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getListImportDataFilesMethod = MigrationCenterGrpc.getListImportDataFilesMethod) + == null) { + MigrationCenterGrpc.getListImportDataFilesMethod = + getListImportDataFilesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListImportDataFiles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("ListImportDataFiles")) + .build(); + } + } + } + return getListImportDataFilesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest, + com.google.longrunning.Operation> + getCreateImportDataFileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateImportDataFile", + requestType = com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest, + com.google.longrunning.Operation> + getCreateImportDataFileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest, + com.google.longrunning.Operation> + getCreateImportDataFileMethod; + if ((getCreateImportDataFileMethod = MigrationCenterGrpc.getCreateImportDataFileMethod) + == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getCreateImportDataFileMethod = MigrationCenterGrpc.getCreateImportDataFileMethod) + == null) { + MigrationCenterGrpc.getCreateImportDataFileMethod = + getCreateImportDataFileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateImportDataFile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("CreateImportDataFile")) + .build(); + } + } + } + return getCreateImportDataFileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest, + com.google.longrunning.Operation> + getDeleteImportDataFileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteImportDataFile", + requestType = com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest, + com.google.longrunning.Operation> + getDeleteImportDataFileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest, + com.google.longrunning.Operation> + getDeleteImportDataFileMethod; + if ((getDeleteImportDataFileMethod = MigrationCenterGrpc.getDeleteImportDataFileMethod) + == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getDeleteImportDataFileMethod = MigrationCenterGrpc.getDeleteImportDataFileMethod) + == null) { + MigrationCenterGrpc.getDeleteImportDataFileMethod = + getDeleteImportDataFileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteImportDataFile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("DeleteImportDataFile")) + .build(); + } + } + } + return getDeleteImportDataFileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListGroupsRequest, + com.google.cloud.migrationcenter.v1.ListGroupsResponse> + getListGroupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListGroups", + requestType = com.google.cloud.migrationcenter.v1.ListGroupsRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ListGroupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListGroupsRequest, + com.google.cloud.migrationcenter.v1.ListGroupsResponse> + getListGroupsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListGroupsRequest, + com.google.cloud.migrationcenter.v1.ListGroupsResponse> + getListGroupsMethod; + if ((getListGroupsMethod = MigrationCenterGrpc.getListGroupsMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getListGroupsMethod = MigrationCenterGrpc.getListGroupsMethod) == null) { + MigrationCenterGrpc.getListGroupsMethod = + getListGroupsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListGroups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListGroupsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListGroupsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("ListGroups")) + .build(); + } + } + } + return getListGroupsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetGroupRequest, + com.google.cloud.migrationcenter.v1.Group> + getGetGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetGroup", + requestType = com.google.cloud.migrationcenter.v1.GetGroupRequest.class, + responseType = com.google.cloud.migrationcenter.v1.Group.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetGroupRequest, + com.google.cloud.migrationcenter.v1.Group> + getGetGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetGroupRequest, + com.google.cloud.migrationcenter.v1.Group> + getGetGroupMethod; + if ((getGetGroupMethod = MigrationCenterGrpc.getGetGroupMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getGetGroupMethod = MigrationCenterGrpc.getGetGroupMethod) == null) { + MigrationCenterGrpc.getGetGroupMethod = + getGetGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.GetGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.Group.getDefaultInstance())) + .setSchemaDescriptor(new MigrationCenterMethodDescriptorSupplier("GetGroup")) + .build(); + } + } + } + return getGetGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateGroupRequest, com.google.longrunning.Operation> + getCreateGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateGroup", + requestType = com.google.cloud.migrationcenter.v1.CreateGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateGroupRequest, com.google.longrunning.Operation> + getCreateGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateGroupRequest, + com.google.longrunning.Operation> + getCreateGroupMethod; + if ((getCreateGroupMethod = MigrationCenterGrpc.getCreateGroupMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getCreateGroupMethod = MigrationCenterGrpc.getCreateGroupMethod) == null) { + MigrationCenterGrpc.getCreateGroupMethod = + getCreateGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.CreateGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("CreateGroup")) + .build(); + } + } + } + return getCreateGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateGroupRequest, com.google.longrunning.Operation> + getUpdateGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateGroup", + requestType = com.google.cloud.migrationcenter.v1.UpdateGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateGroupRequest, com.google.longrunning.Operation> + getUpdateGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateGroupRequest, + com.google.longrunning.Operation> + getUpdateGroupMethod; + if ((getUpdateGroupMethod = MigrationCenterGrpc.getUpdateGroupMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getUpdateGroupMethod = MigrationCenterGrpc.getUpdateGroupMethod) == null) { + MigrationCenterGrpc.getUpdateGroupMethod = + getUpdateGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.UpdateGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("UpdateGroup")) + .build(); + } + } + } + return getUpdateGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteGroupRequest, com.google.longrunning.Operation> + getDeleteGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteGroup", + requestType = com.google.cloud.migrationcenter.v1.DeleteGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteGroupRequest, com.google.longrunning.Operation> + getDeleteGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteGroupRequest, + com.google.longrunning.Operation> + getDeleteGroupMethod; + if ((getDeleteGroupMethod = MigrationCenterGrpc.getDeleteGroupMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getDeleteGroupMethod = MigrationCenterGrpc.getDeleteGroupMethod) == null) { + MigrationCenterGrpc.getDeleteGroupMethod = + getDeleteGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.DeleteGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("DeleteGroup")) + .build(); + } + } + } + return getDeleteGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest, + com.google.longrunning.Operation> + getAddAssetsToGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AddAssetsToGroup", + requestType = com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest, + com.google.longrunning.Operation> + getAddAssetsToGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest, + com.google.longrunning.Operation> + getAddAssetsToGroupMethod; + if ((getAddAssetsToGroupMethod = MigrationCenterGrpc.getAddAssetsToGroupMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getAddAssetsToGroupMethod = MigrationCenterGrpc.getAddAssetsToGroupMethod) == null) { + MigrationCenterGrpc.getAddAssetsToGroupMethod = + getAddAssetsToGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddAssetsToGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("AddAssetsToGroup")) + .build(); + } + } + } + return getAddAssetsToGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest, + com.google.longrunning.Operation> + getRemoveAssetsFromGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveAssetsFromGroup", + requestType = com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest, + com.google.longrunning.Operation> + getRemoveAssetsFromGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest, + com.google.longrunning.Operation> + getRemoveAssetsFromGroupMethod; + if ((getRemoveAssetsFromGroupMethod = MigrationCenterGrpc.getRemoveAssetsFromGroupMethod) + == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getRemoveAssetsFromGroupMethod = MigrationCenterGrpc.getRemoveAssetsFromGroupMethod) + == null) { + MigrationCenterGrpc.getRemoveAssetsFromGroupMethod = + getRemoveAssetsFromGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RemoveAssetsFromGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("RemoveAssetsFromGroup")) + .build(); + } + } + } + return getRemoveAssetsFromGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest, + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse> + getListErrorFramesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListErrorFrames", + requestType = com.google.cloud.migrationcenter.v1.ListErrorFramesRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ListErrorFramesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest, + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse> + getListErrorFramesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest, + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse> + getListErrorFramesMethod; + if ((getListErrorFramesMethod = MigrationCenterGrpc.getListErrorFramesMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getListErrorFramesMethod = MigrationCenterGrpc.getListErrorFramesMethod) == null) { + MigrationCenterGrpc.getListErrorFramesMethod = + getListErrorFramesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListErrorFrames")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("ListErrorFrames")) + .build(); + } + } + } + return getListErrorFramesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest, + com.google.cloud.migrationcenter.v1.ErrorFrame> + getGetErrorFrameMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetErrorFrame", + requestType = com.google.cloud.migrationcenter.v1.GetErrorFrameRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ErrorFrame.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest, + com.google.cloud.migrationcenter.v1.ErrorFrame> + getGetErrorFrameMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest, + com.google.cloud.migrationcenter.v1.ErrorFrame> + getGetErrorFrameMethod; + if ((getGetErrorFrameMethod = MigrationCenterGrpc.getGetErrorFrameMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getGetErrorFrameMethod = MigrationCenterGrpc.getGetErrorFrameMethod) == null) { + MigrationCenterGrpc.getGetErrorFrameMethod = + getGetErrorFrameMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetErrorFrame")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ErrorFrame.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("GetErrorFrame")) + .build(); + } + } + } + return getGetErrorFrameMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListSourcesRequest, + com.google.cloud.migrationcenter.v1.ListSourcesResponse> + getListSourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSources", + requestType = com.google.cloud.migrationcenter.v1.ListSourcesRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ListSourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListSourcesRequest, + com.google.cloud.migrationcenter.v1.ListSourcesResponse> + getListSourcesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListSourcesRequest, + com.google.cloud.migrationcenter.v1.ListSourcesResponse> + getListSourcesMethod; + if ((getListSourcesMethod = MigrationCenterGrpc.getListSourcesMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getListSourcesMethod = MigrationCenterGrpc.getListSourcesMethod) == null) { + MigrationCenterGrpc.getListSourcesMethod = + getListSourcesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListSourcesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListSourcesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("ListSources")) + .build(); + } + } + } + return getListSourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetSourceRequest, + com.google.cloud.migrationcenter.v1.Source> + getGetSourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSource", + requestType = com.google.cloud.migrationcenter.v1.GetSourceRequest.class, + responseType = com.google.cloud.migrationcenter.v1.Source.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetSourceRequest, + com.google.cloud.migrationcenter.v1.Source> + getGetSourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetSourceRequest, + com.google.cloud.migrationcenter.v1.Source> + getGetSourceMethod; + if ((getGetSourceMethod = MigrationCenterGrpc.getGetSourceMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getGetSourceMethod = MigrationCenterGrpc.getGetSourceMethod) == null) { + MigrationCenterGrpc.getGetSourceMethod = + getGetSourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.GetSourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.Source.getDefaultInstance())) + .setSchemaDescriptor(new MigrationCenterMethodDescriptorSupplier("GetSource")) + .build(); + } + } + } + return getGetSourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateSourceRequest, com.google.longrunning.Operation> + getCreateSourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSource", + requestType = com.google.cloud.migrationcenter.v1.CreateSourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateSourceRequest, com.google.longrunning.Operation> + getCreateSourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateSourceRequest, + com.google.longrunning.Operation> + getCreateSourceMethod; + if ((getCreateSourceMethod = MigrationCenterGrpc.getCreateSourceMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getCreateSourceMethod = MigrationCenterGrpc.getCreateSourceMethod) == null) { + MigrationCenterGrpc.getCreateSourceMethod = + getCreateSourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.CreateSourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("CreateSource")) + .build(); + } + } + } + return getCreateSourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateSourceRequest, com.google.longrunning.Operation> + getUpdateSourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSource", + requestType = com.google.cloud.migrationcenter.v1.UpdateSourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateSourceRequest, com.google.longrunning.Operation> + getUpdateSourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateSourceRequest, + com.google.longrunning.Operation> + getUpdateSourceMethod; + if ((getUpdateSourceMethod = MigrationCenterGrpc.getUpdateSourceMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getUpdateSourceMethod = MigrationCenterGrpc.getUpdateSourceMethod) == null) { + MigrationCenterGrpc.getUpdateSourceMethod = + getUpdateSourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.UpdateSourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("UpdateSource")) + .build(); + } + } + } + return getUpdateSourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteSourceRequest, com.google.longrunning.Operation> + getDeleteSourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSource", + requestType = com.google.cloud.migrationcenter.v1.DeleteSourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteSourceRequest, com.google.longrunning.Operation> + getDeleteSourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteSourceRequest, + com.google.longrunning.Operation> + getDeleteSourceMethod; + if ((getDeleteSourceMethod = MigrationCenterGrpc.getDeleteSourceMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getDeleteSourceMethod = MigrationCenterGrpc.getDeleteSourceMethod) == null) { + MigrationCenterGrpc.getDeleteSourceMethod = + getDeleteSourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.DeleteSourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("DeleteSource")) + .build(); + } + } + } + return getDeleteSourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest, + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse> + getListPreferenceSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPreferenceSets", + requestType = com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest, + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse> + getListPreferenceSetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest, + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse> + getListPreferenceSetsMethod; + if ((getListPreferenceSetsMethod = MigrationCenterGrpc.getListPreferenceSetsMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getListPreferenceSetsMethod = MigrationCenterGrpc.getListPreferenceSetsMethod) + == null) { + MigrationCenterGrpc.getListPreferenceSetsMethod = + getListPreferenceSetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPreferenceSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("ListPreferenceSets")) + .build(); + } + } + } + return getListPreferenceSetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest, + com.google.cloud.migrationcenter.v1.PreferenceSet> + getGetPreferenceSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPreferenceSet", + requestType = com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest.class, + responseType = com.google.cloud.migrationcenter.v1.PreferenceSet.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest, + com.google.cloud.migrationcenter.v1.PreferenceSet> + getGetPreferenceSetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest, + com.google.cloud.migrationcenter.v1.PreferenceSet> + getGetPreferenceSetMethod; + if ((getGetPreferenceSetMethod = MigrationCenterGrpc.getGetPreferenceSetMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getGetPreferenceSetMethod = MigrationCenterGrpc.getGetPreferenceSetMethod) == null) { + MigrationCenterGrpc.getGetPreferenceSetMethod = + getGetPreferenceSetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPreferenceSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.PreferenceSet + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("GetPreferenceSet")) + .build(); + } + } + } + return getGetPreferenceSetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest, + com.google.longrunning.Operation> + getCreatePreferenceSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePreferenceSet", + requestType = com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest, + com.google.longrunning.Operation> + getCreatePreferenceSetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest, + com.google.longrunning.Operation> + getCreatePreferenceSetMethod; + if ((getCreatePreferenceSetMethod = MigrationCenterGrpc.getCreatePreferenceSetMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getCreatePreferenceSetMethod = MigrationCenterGrpc.getCreatePreferenceSetMethod) + == null) { + MigrationCenterGrpc.getCreatePreferenceSetMethod = + getCreatePreferenceSetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreatePreferenceSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("CreatePreferenceSet")) + .build(); + } + } + } + return getCreatePreferenceSetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest, + com.google.longrunning.Operation> + getUpdatePreferenceSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePreferenceSet", + requestType = com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest, + com.google.longrunning.Operation> + getUpdatePreferenceSetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest, + com.google.longrunning.Operation> + getUpdatePreferenceSetMethod; + if ((getUpdatePreferenceSetMethod = MigrationCenterGrpc.getUpdatePreferenceSetMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getUpdatePreferenceSetMethod = MigrationCenterGrpc.getUpdatePreferenceSetMethod) + == null) { + MigrationCenterGrpc.getUpdatePreferenceSetMethod = + getUpdatePreferenceSetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdatePreferenceSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("UpdatePreferenceSet")) + .build(); + } + } + } + return getUpdatePreferenceSetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest, + com.google.longrunning.Operation> + getDeletePreferenceSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePreferenceSet", + requestType = com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest, + com.google.longrunning.Operation> + getDeletePreferenceSetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest, + com.google.longrunning.Operation> + getDeletePreferenceSetMethod; + if ((getDeletePreferenceSetMethod = MigrationCenterGrpc.getDeletePreferenceSetMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getDeletePreferenceSetMethod = MigrationCenterGrpc.getDeletePreferenceSetMethod) + == null) { + MigrationCenterGrpc.getDeletePreferenceSetMethod = + getDeletePreferenceSetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeletePreferenceSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("DeletePreferenceSet")) + .build(); + } + } + } + return getDeletePreferenceSetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetSettingsRequest, + com.google.cloud.migrationcenter.v1.Settings> + getGetSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSettings", + requestType = com.google.cloud.migrationcenter.v1.GetSettingsRequest.class, + responseType = com.google.cloud.migrationcenter.v1.Settings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetSettingsRequest, + com.google.cloud.migrationcenter.v1.Settings> + getGetSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetSettingsRequest, + com.google.cloud.migrationcenter.v1.Settings> + getGetSettingsMethod; + if ((getGetSettingsMethod = MigrationCenterGrpc.getGetSettingsMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getGetSettingsMethod = MigrationCenterGrpc.getGetSettingsMethod) == null) { + MigrationCenterGrpc.getGetSettingsMethod = + getGetSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.GetSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.Settings.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("GetSettings")) + .build(); + } + } + } + return getGetSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest, + com.google.longrunning.Operation> + getUpdateSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSettings", + requestType = com.google.cloud.migrationcenter.v1.UpdateSettingsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest, + com.google.longrunning.Operation> + getUpdateSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest, + com.google.longrunning.Operation> + getUpdateSettingsMethod; + if ((getUpdateSettingsMethod = MigrationCenterGrpc.getUpdateSettingsMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getUpdateSettingsMethod = MigrationCenterGrpc.getUpdateSettingsMethod) == null) { + MigrationCenterGrpc.getUpdateSettingsMethod = + getUpdateSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("UpdateSettings")) + .build(); + } + } + } + return getUpdateSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest, + com.google.longrunning.Operation> + getCreateReportConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateReportConfig", + requestType = com.google.cloud.migrationcenter.v1.CreateReportConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest, + com.google.longrunning.Operation> + getCreateReportConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest, + com.google.longrunning.Operation> + getCreateReportConfigMethod; + if ((getCreateReportConfigMethod = MigrationCenterGrpc.getCreateReportConfigMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getCreateReportConfigMethod = MigrationCenterGrpc.getCreateReportConfigMethod) + == null) { + MigrationCenterGrpc.getCreateReportConfigMethod = + getCreateReportConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateReportConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("CreateReportConfig")) + .build(); + } + } + } + return getCreateReportConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetReportConfigRequest, + com.google.cloud.migrationcenter.v1.ReportConfig> + getGetReportConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetReportConfig", + requestType = com.google.cloud.migrationcenter.v1.GetReportConfigRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ReportConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetReportConfigRequest, + com.google.cloud.migrationcenter.v1.ReportConfig> + getGetReportConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetReportConfigRequest, + com.google.cloud.migrationcenter.v1.ReportConfig> + getGetReportConfigMethod; + if ((getGetReportConfigMethod = MigrationCenterGrpc.getGetReportConfigMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getGetReportConfigMethod = MigrationCenterGrpc.getGetReportConfigMethod) == null) { + MigrationCenterGrpc.getGetReportConfigMethod = + getGetReportConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetReportConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.GetReportConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ReportConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("GetReportConfig")) + .build(); + } + } + } + return getGetReportConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest, + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse> + getListReportConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListReportConfigs", + requestType = com.google.cloud.migrationcenter.v1.ListReportConfigsRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ListReportConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest, + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse> + getListReportConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest, + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse> + getListReportConfigsMethod; + if ((getListReportConfigsMethod = MigrationCenterGrpc.getListReportConfigsMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getListReportConfigsMethod = MigrationCenterGrpc.getListReportConfigsMethod) == null) { + MigrationCenterGrpc.getListReportConfigsMethod = + getListReportConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListReportConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("ListReportConfigs")) + .build(); + } + } + } + return getListReportConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest, + com.google.longrunning.Operation> + getDeleteReportConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteReportConfig", + requestType = com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest, + com.google.longrunning.Operation> + getDeleteReportConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest, + com.google.longrunning.Operation> + getDeleteReportConfigMethod; + if ((getDeleteReportConfigMethod = MigrationCenterGrpc.getDeleteReportConfigMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getDeleteReportConfigMethod = MigrationCenterGrpc.getDeleteReportConfigMethod) + == null) { + MigrationCenterGrpc.getDeleteReportConfigMethod = + getDeleteReportConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteReportConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("DeleteReportConfig")) + .build(); + } + } + } + return getDeleteReportConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateReportRequest, com.google.longrunning.Operation> + getCreateReportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateReport", + requestType = com.google.cloud.migrationcenter.v1.CreateReportRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateReportRequest, com.google.longrunning.Operation> + getCreateReportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.CreateReportRequest, + com.google.longrunning.Operation> + getCreateReportMethod; + if ((getCreateReportMethod = MigrationCenterGrpc.getCreateReportMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getCreateReportMethod = MigrationCenterGrpc.getCreateReportMethod) == null) { + MigrationCenterGrpc.getCreateReportMethod = + getCreateReportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateReport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.CreateReportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("CreateReport")) + .build(); + } + } + } + return getCreateReportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetReportRequest, + com.google.cloud.migrationcenter.v1.Report> + getGetReportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetReport", + requestType = com.google.cloud.migrationcenter.v1.GetReportRequest.class, + responseType = com.google.cloud.migrationcenter.v1.Report.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetReportRequest, + com.google.cloud.migrationcenter.v1.Report> + getGetReportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.GetReportRequest, + com.google.cloud.migrationcenter.v1.Report> + getGetReportMethod; + if ((getGetReportMethod = MigrationCenterGrpc.getGetReportMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getGetReportMethod = MigrationCenterGrpc.getGetReportMethod) == null) { + MigrationCenterGrpc.getGetReportMethod = + getGetReportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetReport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.GetReportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.Report.getDefaultInstance())) + .setSchemaDescriptor(new MigrationCenterMethodDescriptorSupplier("GetReport")) + .build(); + } + } + } + return getGetReportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListReportsRequest, + com.google.cloud.migrationcenter.v1.ListReportsResponse> + getListReportsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListReports", + requestType = com.google.cloud.migrationcenter.v1.ListReportsRequest.class, + responseType = com.google.cloud.migrationcenter.v1.ListReportsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListReportsRequest, + com.google.cloud.migrationcenter.v1.ListReportsResponse> + getListReportsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.ListReportsRequest, + com.google.cloud.migrationcenter.v1.ListReportsResponse> + getListReportsMethod; + if ((getListReportsMethod = MigrationCenterGrpc.getListReportsMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getListReportsMethod = MigrationCenterGrpc.getListReportsMethod) == null) { + MigrationCenterGrpc.getListReportsMethod = + getListReportsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListReports")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListReportsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.ListReportsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("ListReports")) + .build(); + } + } + } + return getListReportsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteReportRequest, com.google.longrunning.Operation> + getDeleteReportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteReport", + requestType = com.google.cloud.migrationcenter.v1.DeleteReportRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteReportRequest, com.google.longrunning.Operation> + getDeleteReportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.migrationcenter.v1.DeleteReportRequest, + com.google.longrunning.Operation> + getDeleteReportMethod; + if ((getDeleteReportMethod = MigrationCenterGrpc.getDeleteReportMethod) == null) { + synchronized (MigrationCenterGrpc.class) { + if ((getDeleteReportMethod = MigrationCenterGrpc.getDeleteReportMethod) == null) { + MigrationCenterGrpc.getDeleteReportMethod = + getDeleteReportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteReport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.migrationcenter.v1.DeleteReportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationCenterMethodDescriptorSupplier("DeleteReport")) + .build(); + } + } + } + return getDeleteReportMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static MigrationCenterStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MigrationCenterStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationCenterStub(channel, callOptions); + } + }; + return MigrationCenterStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static MigrationCenterBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MigrationCenterBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationCenterBlockingStub(channel, callOptions); + } + }; + return MigrationCenterBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static MigrationCenterFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MigrationCenterFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationCenterFutureStub(channel, callOptions); + } + }; + return MigrationCenterFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service describing handlers for resources.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists all the assets in a given project and location.
+     * 
+ */ + default void listAssets( + com.google.cloud.migrationcenter.v1.ListAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAssetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of an asset.
+     * 
+ */ + default void getAsset( + com.google.cloud.migrationcenter.v1.GetAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of an asset.
+     * 
+ */ + default void updateAsset( + com.google.cloud.migrationcenter.v1.UpdateAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a list of assets.
+     * 
+ */ + default void batchUpdateAssets( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchUpdateAssetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an asset.
+     * 
+ */ + default void deleteAsset( + com.google.cloud.migrationcenter.v1.DeleteAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes list of Assets.
+     * 
+ */ + default void batchDeleteAssets( + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchDeleteAssetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Reports a set of frames.
+     * 
+ */ + default void reportAssetFrames( + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReportAssetFramesMethod(), responseObserver); + } + + /** + * + * + *
+     * Aggregates the requested fields based on provided function.
+     * 
+ */ + default void aggregateAssetsValues( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAggregateAssetsValuesMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an import job.
+     * 
+ */ + default void createImportJob( + com.google.cloud.migrationcenter.v1.CreateImportJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateImportJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all import jobs.
+     * 
+ */ + default void listImportJobs( + com.google.cloud.migrationcenter.v1.ListImportJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListImportJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of an import job.
+     * 
+ */ + default void getImportJob( + com.google.cloud.migrationcenter.v1.GetImportJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetImportJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an import job.
+     * 
+ */ + default void deleteImportJob( + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteImportJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an import job.
+     * 
+ */ + default void updateImportJob( + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateImportJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Validates an import job.
+     * 
+ */ + default void validateImportJob( + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getValidateImportJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Runs an import job.
+     * 
+ */ + default void runImportJob( + com.google.cloud.migrationcenter.v1.RunImportJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRunImportJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets an import data file.
+     * 
+ */ + default void getImportDataFile( + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetImportDataFileMethod(), responseObserver); + } + + /** + * + * + *
+     * List import data files.
+     * 
+ */ + default void listImportDataFiles( + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListImportDataFilesMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an import data file.
+     * 
+ */ + default void createImportDataFile( + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateImportDataFileMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete an import data file.
+     * 
+ */ + default void deleteImportDataFile( + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteImportDataFileMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all groups in a given project and location.
+     * 
+ */ + default void listGroups( + com.google.cloud.migrationcenter.v1.ListGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListGroupsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a group.
+     * 
+ */ + default void getGroup( + com.google.cloud.migrationcenter.v1.GetGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new group in a given project and location.
+     * 
+ */ + default void createGroup( + com.google.cloud.migrationcenter.v1.CreateGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a group.
+     * 
+ */ + default void updateGroup( + com.google.cloud.migrationcenter.v1.UpdateGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a group.
+     * 
+ */ + default void deleteGroup( + com.google.cloud.migrationcenter.v1.DeleteGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Adds assets to a group.
+     * 
+ */ + default void addAssetsToGroup( + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAddAssetsToGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Removes assets from a group.
+     * 
+ */ + default void removeAssetsFromGroup( + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRemoveAssetsFromGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all error frames in a given source and location.
+     * 
+ */ + default void listErrorFrames( + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListErrorFramesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of an error frame.
+     * 
+ */ + default void getErrorFrame( + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetErrorFrameMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all the sources in a given project and location.
+     * 
+ */ + default void listSources( + com.google.cloud.migrationcenter.v1.ListSourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSourcesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a source.
+     * 
+ */ + default void getSource( + com.google.cloud.migrationcenter.v1.GetSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new source in a given project and location.
+     * 
+ */ + default void createSource( + com.google.cloud.migrationcenter.v1.CreateSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a source.
+     * 
+ */ + default void updateSource( + com.google.cloud.migrationcenter.v1.UpdateSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a source.
+     * 
+ */ + default void deleteSource( + com.google.cloud.migrationcenter.v1.DeleteSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteSourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all the preference sets in a given project and location.
+     * 
+ */ + default void listPreferenceSets( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPreferenceSetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a preference set.
+     * 
+ */ + default void getPreferenceSet( + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPreferenceSetMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new preference set in a given project and location.
+     * 
+ */ + default void createPreferenceSet( + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePreferenceSetMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a preference set.
+     * 
+ */ + default void updatePreferenceSet( + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePreferenceSetMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a preference set.
+     * 
+ */ + default void deletePreferenceSet( + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePreferenceSetMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of regional settings.
+     * 
+ */ + default void getSettings( + com.google.cloud.migrationcenter.v1.GetSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the regional-level project settings.
+     * 
+ */ + default void updateSettings( + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a report configuration.
+     * 
+ */ + default void createReportConfig( + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateReportConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single ReportConfig.
+     * 
+ */ + default void getReportConfig( + com.google.cloud.migrationcenter.v1.GetReportConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetReportConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists ReportConfigs in a given project and location.
+     * 
+ */ + default void listReportConfigs( + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListReportConfigsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a ReportConfig.
+     * 
+ */ + default void deleteReportConfig( + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteReportConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a report.
+     * 
+ */ + default void createReport( + com.google.cloud.migrationcenter.v1.CreateReportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateReportMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Report.
+     * 
+ */ + default void getReport( + com.google.cloud.migrationcenter.v1.GetReportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetReportMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Reports in a given ReportConfig.
+     * 
+ */ + default void listReports( + com.google.cloud.migrationcenter.v1.ListReportsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListReportsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a Report.
+     * 
+ */ + default void deleteReport( + com.google.cloud.migrationcenter.v1.DeleteReportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteReportMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service MigrationCenter. + * + *
+   * Service describing handlers for resources.
+   * 
+ */ + public abstract static class MigrationCenterImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return MigrationCenterGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service MigrationCenter. + * + *
+   * Service describing handlers for resources.
+   * 
+ */ + public static final class MigrationCenterStub + extends io.grpc.stub.AbstractAsyncStub { + private MigrationCenterStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MigrationCenterStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationCenterStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all the assets in a given project and location.
+     * 
+ */ + public void listAssets( + com.google.cloud.migrationcenter.v1.ListAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAssetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets the details of an asset.
+     * 
+ */ + public void getAsset( + com.google.cloud.migrationcenter.v1.GetAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAssetMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of an asset.
+     * 
+ */ + public void updateAsset( + com.google.cloud.migrationcenter.v1.UpdateAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAssetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a list of assets.
+     * 
+ */ + public void batchUpdateAssets( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchUpdateAssetsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an asset.
+     * 
+ */ + public void deleteAsset( + com.google.cloud.migrationcenter.v1.DeleteAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAssetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes list of Assets.
+     * 
+ */ + public void batchDeleteAssets( + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchDeleteAssetsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Reports a set of frames.
+     * 
+ */ + public void reportAssetFrames( + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReportAssetFramesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Aggregates the requested fields based on provided function.
+     * 
+ */ + public void aggregateAssetsValues( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAggregateAssetsValuesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an import job.
+     * 
+ */ + public void createImportJob( + com.google.cloud.migrationcenter.v1.CreateImportJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateImportJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all import jobs.
+     * 
+ */ + public void listImportJobs( + com.google.cloud.migrationcenter.v1.ListImportJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListImportJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of an import job.
+     * 
+ */ + public void getImportJob( + com.google.cloud.migrationcenter.v1.GetImportJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetImportJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an import job.
+     * 
+ */ + public void deleteImportJob( + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteImportJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an import job.
+     * 
+ */ + public void updateImportJob( + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateImportJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Validates an import job.
+     * 
+ */ + public void validateImportJob( + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getValidateImportJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Runs an import job.
+     * 
+ */ + public void runImportJob( + com.google.cloud.migrationcenter.v1.RunImportJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRunImportJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an import data file.
+     * 
+ */ + public void getImportDataFile( + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetImportDataFileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List import data files.
+     * 
+ */ + public void listImportDataFiles( + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListImportDataFilesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an import data file.
+     * 
+ */ + public void createImportDataFile( + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateImportDataFileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete an import data file.
+     * 
+ */ + public void deleteImportDataFile( + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteImportDataFileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all groups in a given project and location.
+     * 
+ */ + public void listGroups( + com.google.cloud.migrationcenter.v1.ListGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListGroupsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets the details of a group.
+     * 
+ */ + public void getGroup( + com.google.cloud.migrationcenter.v1.GetGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGroupMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new group in a given project and location.
+     * 
+ */ + public void createGroup( + com.google.cloud.migrationcenter.v1.CreateGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a group.
+     * 
+ */ + public void updateGroup( + com.google.cloud.migrationcenter.v1.UpdateGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a group.
+     * 
+ */ + public void deleteGroup( + com.google.cloud.migrationcenter.v1.DeleteGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Adds assets to a group.
+     * 
+ */ + public void addAssetsToGroup( + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAddAssetsToGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Removes assets from a group.
+     * 
+ */ + public void removeAssetsFromGroup( + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveAssetsFromGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all error frames in a given source and location.
+     * 
+ */ + public void listErrorFrames( + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListErrorFramesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of an error frame.
+     * 
+ */ + public void getErrorFrame( + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetErrorFrameMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all the sources in a given project and location.
+     * 
+ */ + public void listSources( + com.google.cloud.migrationcenter.v1.ListSourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSourcesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a source.
+     * 
+ */ + public void getSource( + com.google.cloud.migrationcenter.v1.GetSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSourceMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new source in a given project and location.
+     * 
+ */ + public void createSource( + com.google.cloud.migrationcenter.v1.CreateSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a source.
+     * 
+ */ + public void updateSource( + com.google.cloud.migrationcenter.v1.UpdateSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a source.
+     * 
+ */ + public void deleteSource( + com.google.cloud.migrationcenter.v1.DeleteSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all the preference sets in a given project and location.
+     * 
+ */ + public void listPreferenceSets( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPreferenceSetsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a preference set.
+     * 
+ */ + public void getPreferenceSet( + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPreferenceSetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new preference set in a given project and location.
+     * 
+ */ + public void createPreferenceSet( + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePreferenceSetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a preference set.
+     * 
+ */ + public void updatePreferenceSet( + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePreferenceSetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a preference set.
+     * 
+ */ + public void deletePreferenceSet( + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePreferenceSetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of regional settings.
+     * 
+ */ + public void getSettings( + com.google.cloud.migrationcenter.v1.GetSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the regional-level project settings.
+     * 
+ */ + public void updateSettings( + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a report configuration.
+     * 
+ */ + public void createReportConfig( + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateReportConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single ReportConfig.
+     * 
+ */ + public void getReportConfig( + com.google.cloud.migrationcenter.v1.GetReportConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetReportConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists ReportConfigs in a given project and location.
+     * 
+ */ + public void listReportConfigs( + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListReportConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a ReportConfig.
+     * 
+ */ + public void deleteReportConfig( + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteReportConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a report.
+     * 
+ */ + public void createReport( + com.google.cloud.migrationcenter.v1.CreateReportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateReportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Report.
+     * 
+ */ + public void getReport( + com.google.cloud.migrationcenter.v1.GetReportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetReportMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists Reports in a given ReportConfig.
+     * 
+ */ + public void listReports( + com.google.cloud.migrationcenter.v1.ListReportsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListReportsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a Report.
+     * 
+ */ + public void deleteReport( + com.google.cloud.migrationcenter.v1.DeleteReportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteReportMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service MigrationCenter. + * + *
+   * Service describing handlers for resources.
+   * 
+ */ + public static final class MigrationCenterBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private MigrationCenterBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MigrationCenterBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationCenterBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all the assets in a given project and location.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ListAssetsResponse listAssets( + com.google.cloud.migrationcenter.v1.ListAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAssetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of an asset.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.Asset getAsset( + com.google.cloud.migrationcenter.v1.GetAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of an asset.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.Asset updateAsset( + com.google.cloud.migrationcenter.v1.UpdateAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a list of assets.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse batchUpdateAssets( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchUpdateAssetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an asset.
+     * 
+ */ + public com.google.protobuf.Empty deleteAsset( + com.google.cloud.migrationcenter.v1.DeleteAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes list of Assets.
+     * 
+ */ + public com.google.protobuf.Empty batchDeleteAssets( + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchDeleteAssetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Reports a set of frames.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse reportAssetFrames( + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReportAssetFramesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Aggregates the requested fields based on provided function.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse aggregateAssetsValues( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAggregateAssetsValuesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an import job.
+     * 
+ */ + public com.google.longrunning.Operation createImportJob( + com.google.cloud.migrationcenter.v1.CreateImportJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateImportJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all import jobs.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ListImportJobsResponse listImportJobs( + com.google.cloud.migrationcenter.v1.ListImportJobsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListImportJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of an import job.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ImportJob getImportJob( + com.google.cloud.migrationcenter.v1.GetImportJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetImportJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an import job.
+     * 
+ */ + public com.google.longrunning.Operation deleteImportJob( + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteImportJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an import job.
+     * 
+ */ + public com.google.longrunning.Operation updateImportJob( + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateImportJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Validates an import job.
+     * 
+ */ + public com.google.longrunning.Operation validateImportJob( + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getValidateImportJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Runs an import job.
+     * 
+ */ + public com.google.longrunning.Operation runImportJob( + com.google.cloud.migrationcenter.v1.RunImportJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRunImportJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an import data file.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ImportDataFile getImportDataFile( + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetImportDataFileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List import data files.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse listImportDataFiles( + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListImportDataFilesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an import data file.
+     * 
+ */ + public com.google.longrunning.Operation createImportDataFile( + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateImportDataFileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete an import data file.
+     * 
+ */ + public com.google.longrunning.Operation deleteImportDataFile( + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteImportDataFileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all groups in a given project and location.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ListGroupsResponse listGroups( + com.google.cloud.migrationcenter.v1.ListGroupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListGroupsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a group.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.Group getGroup( + com.google.cloud.migrationcenter.v1.GetGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new group in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createGroup( + com.google.cloud.migrationcenter.v1.CreateGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a group.
+     * 
+ */ + public com.google.longrunning.Operation updateGroup( + com.google.cloud.migrationcenter.v1.UpdateGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a group.
+     * 
+ */ + public com.google.longrunning.Operation deleteGroup( + com.google.cloud.migrationcenter.v1.DeleteGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Adds assets to a group.
+     * 
+ */ + public com.google.longrunning.Operation addAssetsToGroup( + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAddAssetsToGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Removes assets from a group.
+     * 
+ */ + public com.google.longrunning.Operation removeAssetsFromGroup( + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveAssetsFromGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all error frames in a given source and location.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ListErrorFramesResponse listErrorFrames( + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListErrorFramesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of an error frame.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ErrorFrame getErrorFrame( + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetErrorFrameMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all the sources in a given project and location.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ListSourcesResponse listSources( + com.google.cloud.migrationcenter.v1.ListSourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSourcesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a source.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.Source getSource( + com.google.cloud.migrationcenter.v1.GetSourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new source in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createSource( + com.google.cloud.migrationcenter.v1.CreateSourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a source.
+     * 
+ */ + public com.google.longrunning.Operation updateSource( + com.google.cloud.migrationcenter.v1.UpdateSourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a source.
+     * 
+ */ + public com.google.longrunning.Operation deleteSource( + com.google.cloud.migrationcenter.v1.DeleteSourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all the preference sets in a given project and location.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse listPreferenceSets( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPreferenceSetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a preference set.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.PreferenceSet getPreferenceSet( + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPreferenceSetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new preference set in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createPreferenceSet( + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePreferenceSetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a preference set.
+     * 
+ */ + public com.google.longrunning.Operation updatePreferenceSet( + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePreferenceSetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a preference set.
+     * 
+ */ + public com.google.longrunning.Operation deletePreferenceSet( + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePreferenceSetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of regional settings.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.Settings getSettings( + com.google.cloud.migrationcenter.v1.GetSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the regional-level project settings.
+     * 
+ */ + public com.google.longrunning.Operation updateSettings( + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a report configuration.
+     * 
+ */ + public com.google.longrunning.Operation createReportConfig( + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateReportConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single ReportConfig.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ReportConfig getReportConfig( + com.google.cloud.migrationcenter.v1.GetReportConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetReportConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists ReportConfigs in a given project and location.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ListReportConfigsResponse listReportConfigs( + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListReportConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a ReportConfig.
+     * 
+ */ + public com.google.longrunning.Operation deleteReportConfig( + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteReportConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a report.
+     * 
+ */ + public com.google.longrunning.Operation createReport( + com.google.cloud.migrationcenter.v1.CreateReportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateReportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Report.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.Report getReport( + com.google.cloud.migrationcenter.v1.GetReportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetReportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Reports in a given ReportConfig.
+     * 
+ */ + public com.google.cloud.migrationcenter.v1.ListReportsResponse listReports( + com.google.cloud.migrationcenter.v1.ListReportsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListReportsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Report.
+     * 
+ */ + public com.google.longrunning.Operation deleteReport( + com.google.cloud.migrationcenter.v1.DeleteReportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteReportMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service MigrationCenter. + * + *
+   * Service describing handlers for resources.
+   * 
+ */ + public static final class MigrationCenterFutureStub + extends io.grpc.stub.AbstractFutureStub { + private MigrationCenterFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MigrationCenterFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationCenterFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all the assets in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ListAssetsResponse> + listAssets(com.google.cloud.migrationcenter.v1.ListAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAssetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of an asset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.Asset> + getAsset(com.google.cloud.migrationcenter.v1.GetAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of an asset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.Asset> + updateAsset(com.google.cloud.migrationcenter.v1.UpdateAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a list of assets.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse> + batchUpdateAssets(com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchUpdateAssetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an asset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAsset(com.google.cloud.migrationcenter.v1.DeleteAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes list of Assets.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchDeleteAssets(com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchDeleteAssetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Reports a set of frames.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse> + reportAssetFrames(com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReportAssetFramesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Aggregates the requested fields based on provided function.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse> + aggregateAssetsValues( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAggregateAssetsValuesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an import job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createImportJob(com.google.cloud.migrationcenter.v1.CreateImportJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateImportJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all import jobs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ListImportJobsResponse> + listImportJobs(com.google.cloud.migrationcenter.v1.ListImportJobsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListImportJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of an import job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ImportJob> + getImportJob(com.google.cloud.migrationcenter.v1.GetImportJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetImportJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an import job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteImportJob(com.google.cloud.migrationcenter.v1.DeleteImportJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteImportJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an import job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateImportJob(com.google.cloud.migrationcenter.v1.UpdateImportJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateImportJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Validates an import job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + validateImportJob(com.google.cloud.migrationcenter.v1.ValidateImportJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getValidateImportJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Runs an import job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + runImportJob(com.google.cloud.migrationcenter.v1.RunImportJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRunImportJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an import data file.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ImportDataFile> + getImportDataFile(com.google.cloud.migrationcenter.v1.GetImportDataFileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetImportDataFileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List import data files.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse> + listImportDataFiles( + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListImportDataFilesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an import data file.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createImportDataFile( + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateImportDataFileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete an import data file.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteImportDataFile( + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteImportDataFileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all groups in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ListGroupsResponse> + listGroups(com.google.cloud.migrationcenter.v1.ListGroupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListGroupsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.Group> + getGroup(com.google.cloud.migrationcenter.v1.GetGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new group in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createGroup(com.google.cloud.migrationcenter.v1.CreateGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateGroup(com.google.cloud.migrationcenter.v1.UpdateGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteGroup(com.google.cloud.migrationcenter.v1.DeleteGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Adds assets to a group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + addAssetsToGroup(com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAddAssetsToGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Removes assets from a group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + removeAssetsFromGroup( + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveAssetsFromGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all error frames in a given source and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse> + listErrorFrames(com.google.cloud.migrationcenter.v1.ListErrorFramesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListErrorFramesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of an error frame.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ErrorFrame> + getErrorFrame(com.google.cloud.migrationcenter.v1.GetErrorFrameRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetErrorFrameMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all the sources in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ListSourcesResponse> + listSources(com.google.cloud.migrationcenter.v1.ListSourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSourcesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a source.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.Source> + getSource(com.google.cloud.migrationcenter.v1.GetSourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new source in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createSource(com.google.cloud.migrationcenter.v1.CreateSourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a source.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateSource(com.google.cloud.migrationcenter.v1.UpdateSourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a source.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSource(com.google.cloud.migrationcenter.v1.DeleteSourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all the preference sets in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse> + listPreferenceSets(com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPreferenceSetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a preference set.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.PreferenceSet> + getPreferenceSet(com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPreferenceSetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new preference set in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createPreferenceSet( + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePreferenceSetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a preference set.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updatePreferenceSet( + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePreferenceSetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a preference set.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePreferenceSet( + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePreferenceSetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of regional settings.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.Settings> + getSettings(com.google.cloud.migrationcenter.v1.GetSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the regional-level project settings.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateSettings(com.google.cloud.migrationcenter.v1.UpdateSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a report configuration.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createReportConfig(com.google.cloud.migrationcenter.v1.CreateReportConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateReportConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single ReportConfig.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ReportConfig> + getReportConfig(com.google.cloud.migrationcenter.v1.GetReportConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetReportConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists ReportConfigs in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse> + listReportConfigs(com.google.cloud.migrationcenter.v1.ListReportConfigsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListReportConfigsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a ReportConfig.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteReportConfig(com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteReportConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a report.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createReport(com.google.cloud.migrationcenter.v1.CreateReportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateReportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Report.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.Report> + getReport(com.google.cloud.migrationcenter.v1.GetReportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetReportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Reports in a given ReportConfig.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.migrationcenter.v1.ListReportsResponse> + listReports(com.google.cloud.migrationcenter.v1.ListReportsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListReportsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a Report.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteReport(com.google.cloud.migrationcenter.v1.DeleteReportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteReportMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_ASSETS = 0; + private static final int METHODID_GET_ASSET = 1; + private static final int METHODID_UPDATE_ASSET = 2; + private static final int METHODID_BATCH_UPDATE_ASSETS = 3; + private static final int METHODID_DELETE_ASSET = 4; + private static final int METHODID_BATCH_DELETE_ASSETS = 5; + private static final int METHODID_REPORT_ASSET_FRAMES = 6; + private static final int METHODID_AGGREGATE_ASSETS_VALUES = 7; + private static final int METHODID_CREATE_IMPORT_JOB = 8; + private static final int METHODID_LIST_IMPORT_JOBS = 9; + private static final int METHODID_GET_IMPORT_JOB = 10; + private static final int METHODID_DELETE_IMPORT_JOB = 11; + private static final int METHODID_UPDATE_IMPORT_JOB = 12; + private static final int METHODID_VALIDATE_IMPORT_JOB = 13; + private static final int METHODID_RUN_IMPORT_JOB = 14; + private static final int METHODID_GET_IMPORT_DATA_FILE = 15; + private static final int METHODID_LIST_IMPORT_DATA_FILES = 16; + private static final int METHODID_CREATE_IMPORT_DATA_FILE = 17; + private static final int METHODID_DELETE_IMPORT_DATA_FILE = 18; + private static final int METHODID_LIST_GROUPS = 19; + private static final int METHODID_GET_GROUP = 20; + private static final int METHODID_CREATE_GROUP = 21; + private static final int METHODID_UPDATE_GROUP = 22; + private static final int METHODID_DELETE_GROUP = 23; + private static final int METHODID_ADD_ASSETS_TO_GROUP = 24; + private static final int METHODID_REMOVE_ASSETS_FROM_GROUP = 25; + private static final int METHODID_LIST_ERROR_FRAMES = 26; + private static final int METHODID_GET_ERROR_FRAME = 27; + private static final int METHODID_LIST_SOURCES = 28; + private static final int METHODID_GET_SOURCE = 29; + private static final int METHODID_CREATE_SOURCE = 30; + private static final int METHODID_UPDATE_SOURCE = 31; + private static final int METHODID_DELETE_SOURCE = 32; + private static final int METHODID_LIST_PREFERENCE_SETS = 33; + private static final int METHODID_GET_PREFERENCE_SET = 34; + private static final int METHODID_CREATE_PREFERENCE_SET = 35; + private static final int METHODID_UPDATE_PREFERENCE_SET = 36; + private static final int METHODID_DELETE_PREFERENCE_SET = 37; + private static final int METHODID_GET_SETTINGS = 38; + private static final int METHODID_UPDATE_SETTINGS = 39; + private static final int METHODID_CREATE_REPORT_CONFIG = 40; + private static final int METHODID_GET_REPORT_CONFIG = 41; + private static final int METHODID_LIST_REPORT_CONFIGS = 42; + private static final int METHODID_DELETE_REPORT_CONFIG = 43; + private static final int METHODID_CREATE_REPORT = 44; + private static final int METHODID_GET_REPORT = 45; + private static final int METHODID_LIST_REPORTS = 46; + private static final int METHODID_DELETE_REPORT = 47; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_ASSETS: + serviceImpl.listAssets( + (com.google.cloud.migrationcenter.v1.ListAssetsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ASSET: + serviceImpl.getAsset( + (com.google.cloud.migrationcenter.v1.GetAssetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_ASSET: + serviceImpl.updateAsset( + (com.google.cloud.migrationcenter.v1.UpdateAssetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_BATCH_UPDATE_ASSETS: + serviceImpl.batchUpdateAssets( + (com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse>) + responseObserver); + break; + case METHODID_DELETE_ASSET: + serviceImpl.deleteAsset( + (com.google.cloud.migrationcenter.v1.DeleteAssetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_DELETE_ASSETS: + serviceImpl.batchDeleteAssets( + (com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REPORT_ASSET_FRAMES: + serviceImpl.reportAssetFrames( + (com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse>) + responseObserver); + break; + case METHODID_AGGREGATE_ASSETS_VALUES: + serviceImpl.aggregateAssetsValues( + (com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse>) + responseObserver); + break; + case METHODID_CREATE_IMPORT_JOB: + serviceImpl.createImportJob( + (com.google.cloud.migrationcenter.v1.CreateImportJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_IMPORT_JOBS: + serviceImpl.listImportJobs( + (com.google.cloud.migrationcenter.v1.ListImportJobsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.migrationcenter.v1.ListImportJobsResponse>) + responseObserver); + break; + case METHODID_GET_IMPORT_JOB: + serviceImpl.getImportJob( + (com.google.cloud.migrationcenter.v1.GetImportJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_IMPORT_JOB: + serviceImpl.deleteImportJob( + (com.google.cloud.migrationcenter.v1.DeleteImportJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_IMPORT_JOB: + serviceImpl.updateImportJob( + (com.google.cloud.migrationcenter.v1.UpdateImportJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VALIDATE_IMPORT_JOB: + serviceImpl.validateImportJob( + (com.google.cloud.migrationcenter.v1.ValidateImportJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RUN_IMPORT_JOB: + serviceImpl.runImportJob( + (com.google.cloud.migrationcenter.v1.RunImportJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_IMPORT_DATA_FILE: + serviceImpl.getImportDataFile( + (com.google.cloud.migrationcenter.v1.GetImportDataFileRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_IMPORT_DATA_FILES: + serviceImpl.listImportDataFiles( + (com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse>) + responseObserver); + break; + case METHODID_CREATE_IMPORT_DATA_FILE: + serviceImpl.createImportDataFile( + (com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_IMPORT_DATA_FILE: + serviceImpl.deleteImportDataFile( + (com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_GROUPS: + serviceImpl.listGroups( + (com.google.cloud.migrationcenter.v1.ListGroupsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_GROUP: + serviceImpl.getGroup( + (com.google.cloud.migrationcenter.v1.GetGroupRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_GROUP: + serviceImpl.createGroup( + (com.google.cloud.migrationcenter.v1.CreateGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_GROUP: + serviceImpl.updateGroup( + (com.google.cloud.migrationcenter.v1.UpdateGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_GROUP: + serviceImpl.deleteGroup( + (com.google.cloud.migrationcenter.v1.DeleteGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ADD_ASSETS_TO_GROUP: + serviceImpl.addAssetsToGroup( + (com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_ASSETS_FROM_GROUP: + serviceImpl.removeAssetsFromGroup( + (com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ERROR_FRAMES: + serviceImpl.listErrorFrames( + (com.google.cloud.migrationcenter.v1.ListErrorFramesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse>) + responseObserver); + break; + case METHODID_GET_ERROR_FRAME: + serviceImpl.getErrorFrame( + (com.google.cloud.migrationcenter.v1.GetErrorFrameRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_SOURCES: + serviceImpl.listSources( + (com.google.cloud.migrationcenter.v1.ListSourcesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_SOURCE: + serviceImpl.getSource( + (com.google.cloud.migrationcenter.v1.GetSourceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_SOURCE: + serviceImpl.createSource( + (com.google.cloud.migrationcenter.v1.CreateSourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SOURCE: + serviceImpl.updateSource( + (com.google.cloud.migrationcenter.v1.UpdateSourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SOURCE: + serviceImpl.deleteSource( + (com.google.cloud.migrationcenter.v1.DeleteSourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PREFERENCE_SETS: + serviceImpl.listPreferenceSets( + (com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse>) + responseObserver); + break; + case METHODID_GET_PREFERENCE_SET: + serviceImpl.getPreferenceSet( + (com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_PREFERENCE_SET: + serviceImpl.createPreferenceSet( + (com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PREFERENCE_SET: + serviceImpl.updatePreferenceSet( + (com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PREFERENCE_SET: + serviceImpl.deletePreferenceSet( + (com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SETTINGS: + serviceImpl.getSettings( + (com.google.cloud.migrationcenter.v1.GetSettingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_SETTINGS: + serviceImpl.updateSettings( + (com.google.cloud.migrationcenter.v1.UpdateSettingsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_REPORT_CONFIG: + serviceImpl.createReportConfig( + (com.google.cloud.migrationcenter.v1.CreateReportConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_REPORT_CONFIG: + serviceImpl.getReportConfig( + (com.google.cloud.migrationcenter.v1.GetReportConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_REPORT_CONFIGS: + serviceImpl.listReportConfigs( + (com.google.cloud.migrationcenter.v1.ListReportConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse>) + responseObserver); + break; + case METHODID_DELETE_REPORT_CONFIG: + serviceImpl.deleteReportConfig( + (com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_REPORT: + serviceImpl.createReport( + (com.google.cloud.migrationcenter.v1.CreateReportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_REPORT: + serviceImpl.getReport( + (com.google.cloud.migrationcenter.v1.GetReportRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_REPORTS: + serviceImpl.listReports( + (com.google.cloud.migrationcenter.v1.ListReportsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_REPORT: + serviceImpl.deleteReport( + (com.google.cloud.migrationcenter.v1.DeleteReportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.ListAssetsRequest, + com.google.cloud.migrationcenter.v1.ListAssetsResponse>( + service, METHODID_LIST_ASSETS))) + .addMethod( + getGetAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.GetAssetRequest, + com.google.cloud.migrationcenter.v1.Asset>(service, METHODID_GET_ASSET))) + .addMethod( + getUpdateAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.UpdateAssetRequest, + com.google.cloud.migrationcenter.v1.Asset>(service, METHODID_UPDATE_ASSET))) + .addMethod( + getBatchUpdateAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest, + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse>( + service, METHODID_BATCH_UPDATE_ASSETS))) + .addMethod( + getDeleteAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.DeleteAssetRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_ASSET))) + .addMethod( + getBatchDeleteAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest, + com.google.protobuf.Empty>(service, METHODID_BATCH_DELETE_ASSETS))) + .addMethod( + getReportAssetFramesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest, + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse>( + service, METHODID_REPORT_ASSET_FRAMES))) + .addMethod( + getAggregateAssetsValuesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest, + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse>( + service, METHODID_AGGREGATE_ASSETS_VALUES))) + .addMethod( + getCreateImportJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.CreateImportJobRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_IMPORT_JOB))) + .addMethod( + getListImportJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.ListImportJobsRequest, + com.google.cloud.migrationcenter.v1.ListImportJobsResponse>( + service, METHODID_LIST_IMPORT_JOBS))) + .addMethod( + getGetImportJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.GetImportJobRequest, + com.google.cloud.migrationcenter.v1.ImportJob>( + service, METHODID_GET_IMPORT_JOB))) + .addMethod( + getDeleteImportJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_IMPORT_JOB))) + .addMethod( + getUpdateImportJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_IMPORT_JOB))) + .addMethod( + getValidateImportJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest, + com.google.longrunning.Operation>(service, METHODID_VALIDATE_IMPORT_JOB))) + .addMethod( + getRunImportJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.RunImportJobRequest, + com.google.longrunning.Operation>(service, METHODID_RUN_IMPORT_JOB))) + .addMethod( + getGetImportDataFileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest, + com.google.cloud.migrationcenter.v1.ImportDataFile>( + service, METHODID_GET_IMPORT_DATA_FILE))) + .addMethod( + getListImportDataFilesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest, + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse>( + service, METHODID_LIST_IMPORT_DATA_FILES))) + .addMethod( + getCreateImportDataFileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_IMPORT_DATA_FILE))) + .addMethod( + getDeleteImportDataFileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_IMPORT_DATA_FILE))) + .addMethod( + getListGroupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.ListGroupsRequest, + com.google.cloud.migrationcenter.v1.ListGroupsResponse>( + service, METHODID_LIST_GROUPS))) + .addMethod( + getGetGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.GetGroupRequest, + com.google.cloud.migrationcenter.v1.Group>(service, METHODID_GET_GROUP))) + .addMethod( + getCreateGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.CreateGroupRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_GROUP))) + .addMethod( + getUpdateGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.UpdateGroupRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_GROUP))) + .addMethod( + getDeleteGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.DeleteGroupRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_GROUP))) + .addMethod( + getAddAssetsToGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest, + com.google.longrunning.Operation>(service, METHODID_ADD_ASSETS_TO_GROUP))) + .addMethod( + getRemoveAssetsFromGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest, + com.google.longrunning.Operation>(service, METHODID_REMOVE_ASSETS_FROM_GROUP))) + .addMethod( + getListErrorFramesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest, + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse>( + service, METHODID_LIST_ERROR_FRAMES))) + .addMethod( + getGetErrorFrameMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest, + com.google.cloud.migrationcenter.v1.ErrorFrame>( + service, METHODID_GET_ERROR_FRAME))) + .addMethod( + getListSourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.ListSourcesRequest, + com.google.cloud.migrationcenter.v1.ListSourcesResponse>( + service, METHODID_LIST_SOURCES))) + .addMethod( + getGetSourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.GetSourceRequest, + com.google.cloud.migrationcenter.v1.Source>(service, METHODID_GET_SOURCE))) + .addMethod( + getCreateSourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.CreateSourceRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_SOURCE))) + .addMethod( + getUpdateSourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.UpdateSourceRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_SOURCE))) + .addMethod( + getDeleteSourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.DeleteSourceRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_SOURCE))) + .addMethod( + getListPreferenceSetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest, + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse>( + service, METHODID_LIST_PREFERENCE_SETS))) + .addMethod( + getGetPreferenceSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest, + com.google.cloud.migrationcenter.v1.PreferenceSet>( + service, METHODID_GET_PREFERENCE_SET))) + .addMethod( + getCreatePreferenceSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_PREFERENCE_SET))) + .addMethod( + getUpdatePreferenceSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_PREFERENCE_SET))) + .addMethod( + getDeletePreferenceSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_PREFERENCE_SET))) + .addMethod( + getGetSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.GetSettingsRequest, + com.google.cloud.migrationcenter.v1.Settings>(service, METHODID_GET_SETTINGS))) + .addMethod( + getUpdateSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_SETTINGS))) + .addMethod( + getCreateReportConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_REPORT_CONFIG))) + .addMethod( + getGetReportConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.GetReportConfigRequest, + com.google.cloud.migrationcenter.v1.ReportConfig>( + service, METHODID_GET_REPORT_CONFIG))) + .addMethod( + getListReportConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest, + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse>( + service, METHODID_LIST_REPORT_CONFIGS))) + .addMethod( + getDeleteReportConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_REPORT_CONFIG))) + .addMethod( + getCreateReportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.CreateReportRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_REPORT))) + .addMethod( + getGetReportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.GetReportRequest, + com.google.cloud.migrationcenter.v1.Report>(service, METHODID_GET_REPORT))) + .addMethod( + getListReportsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.ListReportsRequest, + com.google.cloud.migrationcenter.v1.ListReportsResponse>( + service, METHODID_LIST_REPORTS))) + .addMethod( + getDeleteReportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.migrationcenter.v1.DeleteReportRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_REPORT))) + .build(); + } + + private abstract static class MigrationCenterBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + MigrationCenterBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("MigrationCenter"); + } + } + + private static final class MigrationCenterFileDescriptorSupplier + extends MigrationCenterBaseDescriptorSupplier { + MigrationCenterFileDescriptorSupplier() {} + } + + private static final class MigrationCenterMethodDescriptorSupplier + extends MigrationCenterBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + MigrationCenterMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (MigrationCenterGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new MigrationCenterFileDescriptorSupplier()) + .addMethod(getListAssetsMethod()) + .addMethod(getGetAssetMethod()) + .addMethod(getUpdateAssetMethod()) + .addMethod(getBatchUpdateAssetsMethod()) + .addMethod(getDeleteAssetMethod()) + .addMethod(getBatchDeleteAssetsMethod()) + .addMethod(getReportAssetFramesMethod()) + .addMethod(getAggregateAssetsValuesMethod()) + .addMethod(getCreateImportJobMethod()) + .addMethod(getListImportJobsMethod()) + .addMethod(getGetImportJobMethod()) + .addMethod(getDeleteImportJobMethod()) + .addMethod(getUpdateImportJobMethod()) + .addMethod(getValidateImportJobMethod()) + .addMethod(getRunImportJobMethod()) + .addMethod(getGetImportDataFileMethod()) + .addMethod(getListImportDataFilesMethod()) + .addMethod(getCreateImportDataFileMethod()) + .addMethod(getDeleteImportDataFileMethod()) + .addMethod(getListGroupsMethod()) + .addMethod(getGetGroupMethod()) + .addMethod(getCreateGroupMethod()) + .addMethod(getUpdateGroupMethod()) + .addMethod(getDeleteGroupMethod()) + .addMethod(getAddAssetsToGroupMethod()) + .addMethod(getRemoveAssetsFromGroupMethod()) + .addMethod(getListErrorFramesMethod()) + .addMethod(getGetErrorFrameMethod()) + .addMethod(getListSourcesMethod()) + .addMethod(getGetSourceMethod()) + .addMethod(getCreateSourceMethod()) + .addMethod(getUpdateSourceMethod()) + .addMethod(getDeleteSourceMethod()) + .addMethod(getListPreferenceSetsMethod()) + .addMethod(getGetPreferenceSetMethod()) + .addMethod(getCreatePreferenceSetMethod()) + .addMethod(getUpdatePreferenceSetMethod()) + .addMethod(getDeletePreferenceSetMethod()) + .addMethod(getGetSettingsMethod()) + .addMethod(getUpdateSettingsMethod()) + .addMethod(getCreateReportConfigMethod()) + .addMethod(getGetReportConfigMethod()) + .addMethod(getListReportConfigsMethod()) + .addMethod(getDeleteReportConfigMethod()) + .addMethod(getCreateReportMethod()) + .addMethod(getGetReportMethod()) + .addMethod(getListReportsMethod()) + .addMethod(getDeleteReportMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-migrationcenter/owlbot.py b/java-migrationcenter/owlbot.py new file mode 100644 index 000000000000..03c0f6686d3f --- /dev/null +++ b/java-migrationcenter/owlbot.py @@ -0,0 +1,36 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates(monorepo=True, excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore" +]) \ No newline at end of file diff --git a/java-migrationcenter/pom.xml b/java-migrationcenter/pom.xml new file mode 100644 index 000000000000..ee949ec3b514 --- /dev/null +++ b/java-migrationcenter/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + com.google.cloud + google-cloud-migrationcenter-parent + pom + 0.0.1-SNAPSHOT + Google Migration Center API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.13.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-migrationcenter-parent + + + + + + com.google.cloud + google-cloud-migrationcenter + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-migrationcenter-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-migrationcenter-v1 + 0.0.1-SNAPSHOT + + + + + + google-cloud-migrationcenter + grpc-google-cloud-migrationcenter-v1 + proto-google-cloud-migrationcenter-v1 + google-cloud-migrationcenter-bom + + diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/clirr-ignored-differences.xml b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..97fbf7935d64 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/migrationcenter/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/migrationcenter/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/migrationcenter/v1/*OrBuilder + boolean has*(*) + + diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/pom.xml b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/pom.xml new file mode 100644 index 000000000000..86932d0fd67f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-migrationcenter-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-migrationcenter-v1 + Proto library for google-cloud-migrationcenter + + com.google.cloud + google-cloud-migrationcenter-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AddAssetsToGroupRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AddAssetsToGroupRequest.java new file mode 100644 index 000000000000..c3dd2b9f74d1 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AddAssetsToGroupRequest.java @@ -0,0 +1,1331 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to add assets to a group.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AddAssetsToGroupRequest} + */ +public final class AddAssetsToGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AddAssetsToGroupRequest) + AddAssetsToGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddAssetsToGroupRequest.newBuilder() to construct. + private AddAssetsToGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AddAssetsToGroupRequest() { + group_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AddAssetsToGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AddAssetsToGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AddAssetsToGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest.class, + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest.Builder.class); + } + + public static final int GROUP_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object group_ = ""; + /** + * + * + *
+   * Required. Group reference.
+   * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + @java.lang.Override + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Group reference.
+   * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSETS_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.AssetList assets_; + /** + * + * + *
+   * Required. List of assets to be added.
+   * The maximum number of assets that can be added in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assets field is set. + */ + @java.lang.Override + public boolean hasAssets() { + return assets_ != null; + } + /** + * + * + *
+   * Required. List of assets to be added.
+   * The maximum number of assets that can be added in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assets. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetList getAssets() { + return assets_ == null + ? com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance() + : assets_; + } + /** + * + * + *
+   * Required. List of assets to be added.
+   * The maximum number of assets that can be added in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetListOrBuilder getAssetsOrBuilder() { + return assets_ == null + ? com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance() + : assets_; + } + + public static final int ALLOW_EXISTING_FIELD_NUMBER = 4; + private boolean allowExisting_ = false; + /** + * + * + *
+   * Optional. When this value is set to `false` and one of the given assets is
+   * already an existing member of the group, the operation fails with an
+   * `Already Exists` error. When set to `true` this situation is silently
+   * ignored by the server.
+   *
+   * Default value is `false`.
+   * 
+ * + * bool allow_existing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowExisting. + */ + @java.lang.Override + public boolean getAllowExisting() { + return allowExisting_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, group_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (assets_ != null) { + output.writeMessage(3, getAssets()); + } + if (allowExisting_ != false) { + output.writeBool(4, allowExisting_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, group_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (assets_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAssets()); + } + if (allowExisting_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowExisting_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest other = + (com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest) obj; + + if (!getGroup().equals(other.getGroup())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (hasAssets() != other.hasAssets()) return false; + if (hasAssets()) { + if (!getAssets().equals(other.getAssets())) return false; + } + if (getAllowExisting() != other.getAllowExisting()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + if (hasAssets()) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssets().hashCode(); + } + hash = (37 * hash) + ALLOW_EXISTING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowExisting()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to add assets to a group.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AddAssetsToGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AddAssetsToGroupRequest) + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AddAssetsToGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AddAssetsToGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest.class, + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + group_ = ""; + requestId_ = ""; + assets_ = null; + if (assetsBuilder_ != null) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + } + allowExisting_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AddAssetsToGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest build() { + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest buildPartial() { + com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest result = + new com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.group_ = group_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.assets_ = assetsBuilder_ == null ? assets_ : assetsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.allowExisting_ = allowExisting_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest other) { + if (other == com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest.getDefaultInstance()) + return this; + if (!other.getGroup().isEmpty()) { + group_ = other.group_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAssets()) { + mergeAssets(other.getAssets()); + } + if (other.getAllowExisting() != false) { + setAllowExisting(other.getAllowExisting()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + group_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getAssetsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + allowExisting_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object group_ = ""; + /** + * + * + *
+     * Required. Group reference.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Group reference.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Group reference.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The group to set. + * @return This builder for chaining. + */ + public Builder setGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + group_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Group reference.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearGroup() { + group_ = getDefaultInstance().getGroup(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Group reference.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for group to set. + * @return This builder for chaining. + */ + public Builder setGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + group_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.AssetList assets_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetList, + com.google.cloud.migrationcenter.v1.AssetList.Builder, + com.google.cloud.migrationcenter.v1.AssetListOrBuilder> + assetsBuilder_; + /** + * + * + *
+     * Required. List of assets to be added.
+     * The maximum number of assets that can be added in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assets field is set. + */ + public boolean hasAssets() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. List of assets to be added.
+     * The maximum number of assets that can be added in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assets. + */ + public com.google.cloud.migrationcenter.v1.AssetList getAssets() { + if (assetsBuilder_ == null) { + return assets_ == null + ? com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance() + : assets_; + } else { + return assetsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. List of assets to be added.
+     * The maximum number of assets that can be added in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAssets(com.google.cloud.migrationcenter.v1.AssetList value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + assets_ = value; + } else { + assetsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of assets to be added.
+     * The maximum number of assets that can be added in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAssets( + com.google.cloud.migrationcenter.v1.AssetList.Builder builderForValue) { + if (assetsBuilder_ == null) { + assets_ = builderForValue.build(); + } else { + assetsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of assets to be added.
+     * The maximum number of assets that can be added in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAssets(com.google.cloud.migrationcenter.v1.AssetList value) { + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && assets_ != null + && assets_ != com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance()) { + getAssetsBuilder().mergeFrom(value); + } else { + assets_ = value; + } + } else { + assetsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of assets to be added.
+     * The maximum number of assets that can be added in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAssets() { + bitField0_ = (bitField0_ & ~0x00000004); + assets_ = null; + if (assetsBuilder_ != null) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of assets to be added.
+     * The maximum number of assets that can be added in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.AssetList.Builder getAssetsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAssetsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. List of assets to be added.
+     * The maximum number of assets that can be added in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.AssetListOrBuilder getAssetsOrBuilder() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilder(); + } else { + return assets_ == null + ? com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance() + : assets_; + } + } + /** + * + * + *
+     * Required. List of assets to be added.
+     * The maximum number of assets that can be added in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetList, + com.google.cloud.migrationcenter.v1.AssetList.Builder, + com.google.cloud.migrationcenter.v1.AssetListOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetList, + com.google.cloud.migrationcenter.v1.AssetList.Builder, + com.google.cloud.migrationcenter.v1.AssetListOrBuilder>( + getAssets(), getParentForChildren(), isClean()); + assets_ = null; + } + return assetsBuilder_; + } + + private boolean allowExisting_; + /** + * + * + *
+     * Optional. When this value is set to `false` and one of the given assets is
+     * already an existing member of the group, the operation fails with an
+     * `Already Exists` error. When set to `true` this situation is silently
+     * ignored by the server.
+     *
+     * Default value is `false`.
+     * 
+ * + * bool allow_existing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowExisting. + */ + @java.lang.Override + public boolean getAllowExisting() { + return allowExisting_; + } + /** + * + * + *
+     * Optional. When this value is set to `false` and one of the given assets is
+     * already an existing member of the group, the operation fails with an
+     * `Already Exists` error. When set to `true` this situation is silently
+     * ignored by the server.
+     *
+     * Default value is `false`.
+     * 
+ * + * bool allow_existing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowExisting to set. + * @return This builder for chaining. + */ + public Builder setAllowExisting(boolean value) { + + allowExisting_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When this value is set to `false` and one of the given assets is
+     * already an existing member of the group, the operation fails with an
+     * `Already Exists` error. When set to `true` this situation is silently
+     * ignored by the server.
+     *
+     * Default value is `false`.
+     * 
+ * + * bool allow_existing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowExisting() { + bitField0_ = (bitField0_ & ~0x00000008); + allowExisting_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AddAssetsToGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AddAssetsToGroupRequest) + private static final com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest(); + } + + public static com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddAssetsToGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AddAssetsToGroupRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AddAssetsToGroupRequestOrBuilder.java new file mode 100644 index 000000000000..09a1dd529373 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AddAssetsToGroupRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface AddAssetsToGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AddAssetsToGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Group reference.
+   * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + java.lang.String getGroup(); + /** + * + * + *
+   * Required. Group reference.
+   * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + com.google.protobuf.ByteString getGroupBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Required. List of assets to be added.
+   * The maximum number of assets that can be added in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assets field is set. + */ + boolean hasAssets(); + /** + * + * + *
+   * Required. List of assets to be added.
+   * The maximum number of assets that can be added in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assets. + */ + com.google.cloud.migrationcenter.v1.AssetList getAssets(); + /** + * + * + *
+   * Required. List of assets to be added.
+   * The maximum number of assets that can be added in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.AssetListOrBuilder getAssetsOrBuilder(); + + /** + * + * + *
+   * Optional. When this value is set to `false` and one of the given assets is
+   * already an existing member of the group, the operation fails with an
+   * `Already Exists` error. When set to `true` this situation is silently
+   * ignored by the server.
+   *
+   * Default value is `false`.
+   * 
+ * + * bool allow_existing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowExisting. + */ + boolean getAllowExisting(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesRequest.java new file mode 100644 index 000000000000..a7daf940b8d9 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesRequest.java @@ -0,0 +1,1339 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to aggregate one or more values.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest} + */ +public final class AggregateAssetsValuesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest) + AggregateAssetsValuesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AggregateAssetsValuesRequest.newBuilder() to construct. + private AggregateAssetsValuesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AggregateAssetsValuesRequest() { + parent_ = ""; + aggregations_ = java.util.Collections.emptyList(); + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AggregateAssetsValuesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest.class, + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for `AggregateAssetsValuesRequest`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for `AggregateAssetsValuesRequest`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGGREGATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List aggregations_; + /** + * + * + *
+   * Array of aggregations to perform.
+   * Up to 25 aggregations can be defined.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + @java.lang.Override + public java.util.List getAggregationsList() { + return aggregations_; + } + /** + * + * + *
+   * Array of aggregations to perform.
+   * Up to 25 aggregations can be defined.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + @java.lang.Override + public java.util.List + getAggregationsOrBuilderList() { + return aggregations_; + } + /** + * + * + *
+   * Array of aggregations to perform.
+   * Up to 25 aggregations can be defined.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + @java.lang.Override + public int getAggregationsCount() { + return aggregations_.size(); + } + /** + * + * + *
+   * Array of aggregations to perform.
+   * Up to 25 aggregations can be defined.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation getAggregations(int index) { + return aggregations_.get(index); + } + /** + * + * + *
+   * Array of aggregations to perform.
+   * Up to 25 aggregations can be defined.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationOrBuilder getAggregationsOrBuilder( + int index) { + return aggregations_.get(index); + } + + public static final int FILTER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * The aggregation will be performed on assets that match the provided filter.
+   * 
+ * + * string filter = 3; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The aggregation will be performed on assets that match the provided filter.
+   * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < aggregations_.size(); i++) { + output.writeMessage(2, aggregations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (int i = 0; i < aggregations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, aggregations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest other = + (com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getAggregationsList().equals(other.getAggregationsList())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getAggregationsCount() > 0) { + hash = (37 * hash) + AGGREGATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAggregationsList().hashCode(); + } + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to aggregate one or more values.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest) + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest.class, + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + if (aggregationsBuilder_ == null) { + aggregations_ = java.util.Collections.emptyList(); + } else { + aggregations_ = null; + aggregationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest build() { + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest buildPartial() { + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest result = + new com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest result) { + if (aggregationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + aggregations_ = java.util.Collections.unmodifiableList(aggregations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.aggregations_ = aggregations_; + } else { + result.aggregations_ = aggregationsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (aggregationsBuilder_ == null) { + if (!other.aggregations_.isEmpty()) { + if (aggregations_.isEmpty()) { + aggregations_ = other.aggregations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAggregationsIsMutable(); + aggregations_.addAll(other.aggregations_); + } + onChanged(); + } + } else { + if (!other.aggregations_.isEmpty()) { + if (aggregationsBuilder_.isEmpty()) { + aggregationsBuilder_.dispose(); + aggregationsBuilder_ = null; + aggregations_ = other.aggregations_; + bitField0_ = (bitField0_ & ~0x00000002); + aggregationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAggregationsFieldBuilder() + : null; + } else { + aggregationsBuilder_.addAllMessages(other.aggregations_); + } + } + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.migrationcenter.v1.Aggregation m = + input.readMessage( + com.google.cloud.migrationcenter.v1.Aggregation.parser(), + extensionRegistry); + if (aggregationsBuilder_ == null) { + ensureAggregationsIsMutable(); + aggregations_.add(m); + } else { + aggregationsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for `AggregateAssetsValuesRequest`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `AggregateAssetsValuesRequest`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `AggregateAssetsValuesRequest`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `AggregateAssetsValuesRequest`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `AggregateAssetsValuesRequest`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List aggregations_ = + java.util.Collections.emptyList(); + + private void ensureAggregationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + aggregations_ = + new java.util.ArrayList(aggregations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation, + com.google.cloud.migrationcenter.v1.Aggregation.Builder, + com.google.cloud.migrationcenter.v1.AggregationOrBuilder> + aggregationsBuilder_; + + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public java.util.List getAggregationsList() { + if (aggregationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(aggregations_); + } else { + return aggregationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public int getAggregationsCount() { + if (aggregationsBuilder_ == null) { + return aggregations_.size(); + } else { + return aggregationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public com.google.cloud.migrationcenter.v1.Aggregation getAggregations(int index) { + if (aggregationsBuilder_ == null) { + return aggregations_.get(index); + } else { + return aggregationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public Builder setAggregations( + int index, com.google.cloud.migrationcenter.v1.Aggregation value) { + if (aggregationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggregationsIsMutable(); + aggregations_.set(index, value); + onChanged(); + } else { + aggregationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public Builder setAggregations( + int index, com.google.cloud.migrationcenter.v1.Aggregation.Builder builderForValue) { + if (aggregationsBuilder_ == null) { + ensureAggregationsIsMutable(); + aggregations_.set(index, builderForValue.build()); + onChanged(); + } else { + aggregationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public Builder addAggregations(com.google.cloud.migrationcenter.v1.Aggregation value) { + if (aggregationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggregationsIsMutable(); + aggregations_.add(value); + onChanged(); + } else { + aggregationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public Builder addAggregations( + int index, com.google.cloud.migrationcenter.v1.Aggregation value) { + if (aggregationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggregationsIsMutable(); + aggregations_.add(index, value); + onChanged(); + } else { + aggregationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public Builder addAggregations( + com.google.cloud.migrationcenter.v1.Aggregation.Builder builderForValue) { + if (aggregationsBuilder_ == null) { + ensureAggregationsIsMutable(); + aggregations_.add(builderForValue.build()); + onChanged(); + } else { + aggregationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public Builder addAggregations( + int index, com.google.cloud.migrationcenter.v1.Aggregation.Builder builderForValue) { + if (aggregationsBuilder_ == null) { + ensureAggregationsIsMutable(); + aggregations_.add(index, builderForValue.build()); + onChanged(); + } else { + aggregationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public Builder addAllAggregations( + java.lang.Iterable values) { + if (aggregationsBuilder_ == null) { + ensureAggregationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, aggregations_); + onChanged(); + } else { + aggregationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public Builder clearAggregations() { + if (aggregationsBuilder_ == null) { + aggregations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + aggregationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public Builder removeAggregations(int index) { + if (aggregationsBuilder_ == null) { + ensureAggregationsIsMutable(); + aggregations_.remove(index); + onChanged(); + } else { + aggregationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public com.google.cloud.migrationcenter.v1.Aggregation.Builder getAggregationsBuilder( + int index) { + return getAggregationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public com.google.cloud.migrationcenter.v1.AggregationOrBuilder getAggregationsOrBuilder( + int index) { + if (aggregationsBuilder_ == null) { + return aggregations_.get(index); + } else { + return aggregationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public java.util.List + getAggregationsOrBuilderList() { + if (aggregationsBuilder_ != null) { + return aggregationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(aggregations_); + } + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public com.google.cloud.migrationcenter.v1.Aggregation.Builder addAggregationsBuilder() { + return getAggregationsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.Aggregation.getDefaultInstance()); + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public com.google.cloud.migrationcenter.v1.Aggregation.Builder addAggregationsBuilder( + int index) { + return getAggregationsFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.Aggregation.getDefaultInstance()); + } + /** + * + * + *
+     * Array of aggregations to perform.
+     * Up to 25 aggregations can be defined.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + public java.util.List + getAggregationsBuilderList() { + return getAggregationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation, + com.google.cloud.migrationcenter.v1.Aggregation.Builder, + com.google.cloud.migrationcenter.v1.AggregationOrBuilder> + getAggregationsFieldBuilder() { + if (aggregationsBuilder_ == null) { + aggregationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation, + com.google.cloud.migrationcenter.v1.Aggregation.Builder, + com.google.cloud.migrationcenter.v1.AggregationOrBuilder>( + aggregations_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + aggregations_ = null; + } + return aggregationsBuilder_; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The aggregation will be performed on assets that match the provided filter.
+     * 
+ * + * string filter = 3; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The aggregation will be performed on assets that match the provided filter.
+     * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The aggregation will be performed on assets that match the provided filter.
+     * 
+ * + * string filter = 3; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The aggregation will be performed on assets that match the provided filter.
+     * 
+ * + * string filter = 3; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The aggregation will be performed on assets that match the provided filter.
+     * 
+ * + * string filter = 3; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest) + private static final com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest(); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AggregateAssetsValuesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesRequestOrBuilder.java new file mode 100644 index 000000000000..ca3b453d92ad --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesRequestOrBuilder.java @@ -0,0 +1,132 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface AggregateAssetsValuesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for `AggregateAssetsValuesRequest`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for `AggregateAssetsValuesRequest`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Array of aggregations to perform.
+   * Up to 25 aggregations can be defined.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + java.util.List getAggregationsList(); + /** + * + * + *
+   * Array of aggregations to perform.
+   * Up to 25 aggregations can be defined.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + com.google.cloud.migrationcenter.v1.Aggregation getAggregations(int index); + /** + * + * + *
+   * Array of aggregations to perform.
+   * Up to 25 aggregations can be defined.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + int getAggregationsCount(); + /** + * + * + *
+   * Array of aggregations to perform.
+   * Up to 25 aggregations can be defined.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + java.util.List + getAggregationsOrBuilderList(); + /** + * + * + *
+   * Array of aggregations to perform.
+   * Up to 25 aggregations can be defined.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + com.google.cloud.migrationcenter.v1.AggregationOrBuilder getAggregationsOrBuilder(int index); + + /** + * + * + *
+   * The aggregation will be performed on assets that match the provided filter.
+   * 
+ * + * string filter = 3; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The aggregation will be performed on assets that match the provided filter.
+   * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesResponse.java new file mode 100644 index 000000000000..226142a22b30 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesResponse.java @@ -0,0 +1,957 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A response to a request to aggregated assets values.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse} + */ +public final class AggregateAssetsValuesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse) + AggregateAssetsValuesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AggregateAssetsValuesResponse.newBuilder() to construct. + private AggregateAssetsValuesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AggregateAssetsValuesResponse() { + results_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AggregateAssetsValuesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse.class, + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List results_; + /** + * + * + *
+   * The aggregation results.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + * + * + *
+   * The aggregation results.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + * + * + *
+   * The aggregation results.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + * + * + *
+   * The aggregation results.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult getResults(int index) { + return results_.get(index); + } + /** + * + * + *
+   * The aggregation results.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse other = + (com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse) obj; + + if (!getResultsList().equals(other.getResultsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A response to a request to aggregated assets values.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse) + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse.class, + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + } else { + results_ = null; + resultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse build() { + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse buildPartial() { + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse result = + new com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse result) { + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse other) { + if (other + == com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse.getDefaultInstance()) + return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResultsFieldBuilder() + : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.AggregationResult m = + input.readMessage( + com.google.cloud.migrationcenter.v1.AggregationResult.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List results_ = + java.util.Collections.emptyList(); + + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = + new java.util.ArrayList( + results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult, + com.google.cloud.migrationcenter.v1.AggregationResult.Builder, + com.google.cloud.migrationcenter.v1.AggregationResultOrBuilder> + resultsBuilder_; + + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public com.google.cloud.migrationcenter.v1.AggregationResult getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.migrationcenter.v1.AggregationResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.migrationcenter.v1.AggregationResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public Builder addResults(com.google.cloud.migrationcenter.v1.AggregationResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.migrationcenter.v1.AggregationResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public Builder addResults( + com.google.cloud.migrationcenter.v1.AggregationResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.migrationcenter.v1.AggregationResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public Builder addAllResults( + java.lang.Iterable + values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public com.google.cloud.migrationcenter.v1.AggregationResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Builder addResultsBuilder() { + return getResultsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.AggregationResult.getDefaultInstance()); + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.AggregationResult.getDefaultInstance()); + } + /** + * + * + *
+     * The aggregation results.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult, + com.google.cloud.migrationcenter.v1.AggregationResult.Builder, + com.google.cloud.migrationcenter.v1.AggregationResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult, + com.google.cloud.migrationcenter.v1.AggregationResult.Builder, + com.google.cloud.migrationcenter.v1.AggregationResultOrBuilder>( + results_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + results_ = null; + } + return resultsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse) + private static final com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse(); + } + + public static com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AggregateAssetsValuesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesResponseOrBuilder.java new file mode 100644 index 000000000000..4a2efc03ed68 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregateAssetsValuesResponseOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface AggregateAssetsValuesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The aggregation results.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + java.util.List getResultsList(); + /** + * + * + *
+   * The aggregation results.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + com.google.cloud.migrationcenter.v1.AggregationResult getResults(int index); + /** + * + * + *
+   * The aggregation results.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + int getResultsCount(); + /** + * + * + *
+   * The aggregation results.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + java.util.List + getResultsOrBuilderList(); + /** + * + * + *
+   * The aggregation results.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + com.google.cloud.migrationcenter.v1.AggregationResultOrBuilder getResultsOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Aggregation.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Aggregation.java new file mode 100644 index 000000000000..404bf83877b5 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Aggregation.java @@ -0,0 +1,3992 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Message describing an aggregation. The message includes the aggregation type,
+ * parameters, and the field on which to perform the aggregation.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Aggregation} + */ +public final class Aggregation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Aggregation) + AggregationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Aggregation.newBuilder() to construct. + private Aggregation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Aggregation() { + field_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Aggregation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Aggregation.class, + com.google.cloud.migrationcenter.v1.Aggregation.Builder.class); + } + + public interface CountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Aggregation.Count) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Object count.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Aggregation.Count} + */ + public static final class Count extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Aggregation.Count) + CountOrBuilder { + private static final long serialVersionUID = 0L; + // Use Count.newBuilder() to construct. + private Count(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Count() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Count(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Count_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Count_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Aggregation.Count.class, + com.google.cloud.migrationcenter.v1.Aggregation.Count.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Aggregation.Count)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Aggregation.Count other = + (com.google.cloud.migrationcenter.v1.Aggregation.Count) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.Aggregation.Count prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Object count.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Aggregation.Count} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Aggregation.Count) + com.google.cloud.migrationcenter.v1.Aggregation.CountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Count_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Count_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Aggregation.Count.class, + com.google.cloud.migrationcenter.v1.Aggregation.Count.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Aggregation.Count.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Count_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Count getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Aggregation.Count.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Count build() { + com.google.cloud.migrationcenter.v1.Aggregation.Count result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Count buildPartial() { + com.google.cloud.migrationcenter.v1.Aggregation.Count result = + new com.google.cloud.migrationcenter.v1.Aggregation.Count(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Aggregation.Count) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Aggregation.Count) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Aggregation.Count other) { + if (other == com.google.cloud.migrationcenter.v1.Aggregation.Count.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Aggregation.Count) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Aggregation.Count) + private static final com.google.cloud.migrationcenter.v1.Aggregation.Count DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Aggregation.Count(); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Count getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Count parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Count getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SumOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Aggregation.Sum) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Sum of field values.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Aggregation.Sum} + */ + public static final class Sum extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Aggregation.Sum) + SumOrBuilder { + private static final long serialVersionUID = 0L; + // Use Sum.newBuilder() to construct. + private Sum(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Sum() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Sum(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Sum_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Sum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Aggregation.Sum.class, + com.google.cloud.migrationcenter.v1.Aggregation.Sum.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Aggregation.Sum)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Aggregation.Sum other = + (com.google.cloud.migrationcenter.v1.Aggregation.Sum) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.Aggregation.Sum prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Sum of field values.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Aggregation.Sum} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Aggregation.Sum) + com.google.cloud.migrationcenter.v1.Aggregation.SumOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Sum_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Sum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Aggregation.Sum.class, + com.google.cloud.migrationcenter.v1.Aggregation.Sum.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Aggregation.Sum.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Sum_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Sum getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Aggregation.Sum.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Sum build() { + com.google.cloud.migrationcenter.v1.Aggregation.Sum result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Sum buildPartial() { + com.google.cloud.migrationcenter.v1.Aggregation.Sum result = + new com.google.cloud.migrationcenter.v1.Aggregation.Sum(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Aggregation.Sum) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Aggregation.Sum) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Aggregation.Sum other) { + if (other == com.google.cloud.migrationcenter.v1.Aggregation.Sum.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Aggregation.Sum) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Aggregation.Sum) + private static final com.google.cloud.migrationcenter.v1.Aggregation.Sum DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Aggregation.Sum(); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Sum getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Sum parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Sum getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface HistogramOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Aggregation.Histogram) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Lower bounds of buckets.
+     * The response will contain `n+1` buckets for `n` bounds.
+     * The first bucket will count all assets for which the field value is
+     * smaller than the first bound.
+     * Subsequent buckets will count assets for which the field value is
+     * greater or equal to a lower bound and smaller than the next one.
+     * The last bucket will count assets for which the field value is greater or
+     * equal to the final lower bound.
+     * You can define up to 20 lower bounds.
+     * 
+ * + * repeated double lower_bounds = 1; + * + * @return A list containing the lowerBounds. + */ + java.util.List getLowerBoundsList(); + /** + * + * + *
+     * Lower bounds of buckets.
+     * The response will contain `n+1` buckets for `n` bounds.
+     * The first bucket will count all assets for which the field value is
+     * smaller than the first bound.
+     * Subsequent buckets will count assets for which the field value is
+     * greater or equal to a lower bound and smaller than the next one.
+     * The last bucket will count assets for which the field value is greater or
+     * equal to the final lower bound.
+     * You can define up to 20 lower bounds.
+     * 
+ * + * repeated double lower_bounds = 1; + * + * @return The count of lowerBounds. + */ + int getLowerBoundsCount(); + /** + * + * + *
+     * Lower bounds of buckets.
+     * The response will contain `n+1` buckets for `n` bounds.
+     * The first bucket will count all assets for which the field value is
+     * smaller than the first bound.
+     * Subsequent buckets will count assets for which the field value is
+     * greater or equal to a lower bound and smaller than the next one.
+     * The last bucket will count assets for which the field value is greater or
+     * equal to the final lower bound.
+     * You can define up to 20 lower bounds.
+     * 
+ * + * repeated double lower_bounds = 1; + * + * @param index The index of the element to return. + * @return The lowerBounds at the given index. + */ + double getLowerBounds(int index); + } + /** + * + * + *
+   * Histogram of bucketed assets counts by field value.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Aggregation.Histogram} + */ + public static final class Histogram extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Aggregation.Histogram) + HistogramOrBuilder { + private static final long serialVersionUID = 0L; + // Use Histogram.newBuilder() to construct. + private Histogram(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Histogram() { + lowerBounds_ = emptyDoubleList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Histogram(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Histogram_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Histogram_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Aggregation.Histogram.class, + com.google.cloud.migrationcenter.v1.Aggregation.Histogram.Builder.class); + } + + public static final int LOWER_BOUNDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.DoubleList lowerBounds_; + /** + * + * + *
+     * Lower bounds of buckets.
+     * The response will contain `n+1` buckets for `n` bounds.
+     * The first bucket will count all assets for which the field value is
+     * smaller than the first bound.
+     * Subsequent buckets will count assets for which the field value is
+     * greater or equal to a lower bound and smaller than the next one.
+     * The last bucket will count assets for which the field value is greater or
+     * equal to the final lower bound.
+     * You can define up to 20 lower bounds.
+     * 
+ * + * repeated double lower_bounds = 1; + * + * @return A list containing the lowerBounds. + */ + @java.lang.Override + public java.util.List getLowerBoundsList() { + return lowerBounds_; + } + /** + * + * + *
+     * Lower bounds of buckets.
+     * The response will contain `n+1` buckets for `n` bounds.
+     * The first bucket will count all assets for which the field value is
+     * smaller than the first bound.
+     * Subsequent buckets will count assets for which the field value is
+     * greater or equal to a lower bound and smaller than the next one.
+     * The last bucket will count assets for which the field value is greater or
+     * equal to the final lower bound.
+     * You can define up to 20 lower bounds.
+     * 
+ * + * repeated double lower_bounds = 1; + * + * @return The count of lowerBounds. + */ + public int getLowerBoundsCount() { + return lowerBounds_.size(); + } + /** + * + * + *
+     * Lower bounds of buckets.
+     * The response will contain `n+1` buckets for `n` bounds.
+     * The first bucket will count all assets for which the field value is
+     * smaller than the first bound.
+     * Subsequent buckets will count assets for which the field value is
+     * greater or equal to a lower bound and smaller than the next one.
+     * The last bucket will count assets for which the field value is greater or
+     * equal to the final lower bound.
+     * You can define up to 20 lower bounds.
+     * 
+ * + * repeated double lower_bounds = 1; + * + * @param index The index of the element to return. + * @return The lowerBounds at the given index. + */ + public double getLowerBounds(int index) { + return lowerBounds_.getDouble(index); + } + + private int lowerBoundsMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (getLowerBoundsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(lowerBoundsMemoizedSerializedSize); + } + for (int i = 0; i < lowerBounds_.size(); i++) { + output.writeDoubleNoTag(lowerBounds_.getDouble(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 8 * getLowerBoundsList().size(); + size += dataSize; + if (!getLowerBoundsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + lowerBoundsMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Aggregation.Histogram)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Aggregation.Histogram other = + (com.google.cloud.migrationcenter.v1.Aggregation.Histogram) obj; + + if (!getLowerBoundsList().equals(other.getLowerBoundsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLowerBoundsCount() > 0) { + hash = (37 * hash) + LOWER_BOUNDS_FIELD_NUMBER; + hash = (53 * hash) + getLowerBoundsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.Aggregation.Histogram prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Histogram of bucketed assets counts by field value.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Aggregation.Histogram} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Aggregation.Histogram) + com.google.cloud.migrationcenter.v1.Aggregation.HistogramOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Histogram_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Histogram_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Aggregation.Histogram.class, + com.google.cloud.migrationcenter.v1.Aggregation.Histogram.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Aggregation.Histogram.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lowerBounds_ = emptyDoubleList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Histogram_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Histogram getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Aggregation.Histogram.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Histogram build() { + com.google.cloud.migrationcenter.v1.Aggregation.Histogram result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Histogram buildPartial() { + com.google.cloud.migrationcenter.v1.Aggregation.Histogram result = + new com.google.cloud.migrationcenter.v1.Aggregation.Histogram(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.Aggregation.Histogram result) { + if (((bitField0_ & 0x00000001) != 0)) { + lowerBounds_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.lowerBounds_ = lowerBounds_; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.Aggregation.Histogram result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Aggregation.Histogram) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Aggregation.Histogram) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Aggregation.Histogram other) { + if (other == com.google.cloud.migrationcenter.v1.Aggregation.Histogram.getDefaultInstance()) + return this; + if (!other.lowerBounds_.isEmpty()) { + if (lowerBounds_.isEmpty()) { + lowerBounds_ = other.lowerBounds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLowerBoundsIsMutable(); + lowerBounds_.addAll(other.lowerBounds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + double v = input.readDouble(); + ensureLowerBoundsIsMutable(); + lowerBounds_.addDouble(v); + break; + } // case 9 + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureLowerBoundsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + lowerBounds_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.DoubleList lowerBounds_ = emptyDoubleList(); + + private void ensureLowerBoundsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + lowerBounds_ = mutableCopy(lowerBounds_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Lower bounds of buckets.
+       * The response will contain `n+1` buckets for `n` bounds.
+       * The first bucket will count all assets for which the field value is
+       * smaller than the first bound.
+       * Subsequent buckets will count assets for which the field value is
+       * greater or equal to a lower bound and smaller than the next one.
+       * The last bucket will count assets for which the field value is greater or
+       * equal to the final lower bound.
+       * You can define up to 20 lower bounds.
+       * 
+ * + * repeated double lower_bounds = 1; + * + * @return A list containing the lowerBounds. + */ + public java.util.List getLowerBoundsList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(lowerBounds_) + : lowerBounds_; + } + /** + * + * + *
+       * Lower bounds of buckets.
+       * The response will contain `n+1` buckets for `n` bounds.
+       * The first bucket will count all assets for which the field value is
+       * smaller than the first bound.
+       * Subsequent buckets will count assets for which the field value is
+       * greater or equal to a lower bound and smaller than the next one.
+       * The last bucket will count assets for which the field value is greater or
+       * equal to the final lower bound.
+       * You can define up to 20 lower bounds.
+       * 
+ * + * repeated double lower_bounds = 1; + * + * @return The count of lowerBounds. + */ + public int getLowerBoundsCount() { + return lowerBounds_.size(); + } + /** + * + * + *
+       * Lower bounds of buckets.
+       * The response will contain `n+1` buckets for `n` bounds.
+       * The first bucket will count all assets for which the field value is
+       * smaller than the first bound.
+       * Subsequent buckets will count assets for which the field value is
+       * greater or equal to a lower bound and smaller than the next one.
+       * The last bucket will count assets for which the field value is greater or
+       * equal to the final lower bound.
+       * You can define up to 20 lower bounds.
+       * 
+ * + * repeated double lower_bounds = 1; + * + * @param index The index of the element to return. + * @return The lowerBounds at the given index. + */ + public double getLowerBounds(int index) { + return lowerBounds_.getDouble(index); + } + /** + * + * + *
+       * Lower bounds of buckets.
+       * The response will contain `n+1` buckets for `n` bounds.
+       * The first bucket will count all assets for which the field value is
+       * smaller than the first bound.
+       * Subsequent buckets will count assets for which the field value is
+       * greater or equal to a lower bound and smaller than the next one.
+       * The last bucket will count assets for which the field value is greater or
+       * equal to the final lower bound.
+       * You can define up to 20 lower bounds.
+       * 
+ * + * repeated double lower_bounds = 1; + * + * @param index The index to set the value at. + * @param value The lowerBounds to set. + * @return This builder for chaining. + */ + public Builder setLowerBounds(int index, double value) { + + ensureLowerBoundsIsMutable(); + lowerBounds_.setDouble(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Lower bounds of buckets.
+       * The response will contain `n+1` buckets for `n` bounds.
+       * The first bucket will count all assets for which the field value is
+       * smaller than the first bound.
+       * Subsequent buckets will count assets for which the field value is
+       * greater or equal to a lower bound and smaller than the next one.
+       * The last bucket will count assets for which the field value is greater or
+       * equal to the final lower bound.
+       * You can define up to 20 lower bounds.
+       * 
+ * + * repeated double lower_bounds = 1; + * + * @param value The lowerBounds to add. + * @return This builder for chaining. + */ + public Builder addLowerBounds(double value) { + + ensureLowerBoundsIsMutable(); + lowerBounds_.addDouble(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Lower bounds of buckets.
+       * The response will contain `n+1` buckets for `n` bounds.
+       * The first bucket will count all assets for which the field value is
+       * smaller than the first bound.
+       * Subsequent buckets will count assets for which the field value is
+       * greater or equal to a lower bound and smaller than the next one.
+       * The last bucket will count assets for which the field value is greater or
+       * equal to the final lower bound.
+       * You can define up to 20 lower bounds.
+       * 
+ * + * repeated double lower_bounds = 1; + * + * @param values The lowerBounds to add. + * @return This builder for chaining. + */ + public Builder addAllLowerBounds(java.lang.Iterable values) { + ensureLowerBoundsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, lowerBounds_); + onChanged(); + return this; + } + /** + * + * + *
+       * Lower bounds of buckets.
+       * The response will contain `n+1` buckets for `n` bounds.
+       * The first bucket will count all assets for which the field value is
+       * smaller than the first bound.
+       * Subsequent buckets will count assets for which the field value is
+       * greater or equal to a lower bound and smaller than the next one.
+       * The last bucket will count assets for which the field value is greater or
+       * equal to the final lower bound.
+       * You can define up to 20 lower bounds.
+       * 
+ * + * repeated double lower_bounds = 1; + * + * @return This builder for chaining. + */ + public Builder clearLowerBounds() { + lowerBounds_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Aggregation.Histogram) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Aggregation.Histogram) + private static final com.google.cloud.migrationcenter.v1.Aggregation.Histogram DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Aggregation.Histogram(); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Histogram getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Histogram parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Histogram getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FrequencyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Aggregation.Frequency) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Frequency distribution of all field values.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Aggregation.Frequency} + */ + public static final class Frequency extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Aggregation.Frequency) + FrequencyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Frequency.newBuilder() to construct. + private Frequency(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Frequency() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Frequency(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Frequency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Frequency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Aggregation.Frequency.class, + com.google.cloud.migrationcenter.v1.Aggregation.Frequency.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Aggregation.Frequency)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Aggregation.Frequency other = + (com.google.cloud.migrationcenter.v1.Aggregation.Frequency) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.Aggregation.Frequency prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Frequency distribution of all field values.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Aggregation.Frequency} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Aggregation.Frequency) + com.google.cloud.migrationcenter.v1.Aggregation.FrequencyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Frequency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Frequency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Aggregation.Frequency.class, + com.google.cloud.migrationcenter.v1.Aggregation.Frequency.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Aggregation.Frequency.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_Frequency_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Frequency getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Aggregation.Frequency.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Frequency build() { + com.google.cloud.migrationcenter.v1.Aggregation.Frequency result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Frequency buildPartial() { + com.google.cloud.migrationcenter.v1.Aggregation.Frequency result = + new com.google.cloud.migrationcenter.v1.Aggregation.Frequency(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Aggregation.Frequency) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Aggregation.Frequency) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Aggregation.Frequency other) { + if (other == com.google.cloud.migrationcenter.v1.Aggregation.Frequency.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Aggregation.Frequency) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Aggregation.Frequency) + private static final com.google.cloud.migrationcenter.v1.Aggregation.Frequency DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Aggregation.Frequency(); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation.Frequency getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Frequency parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Frequency getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int aggregationFunctionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object aggregationFunction_; + + public enum AggregationFunctionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + COUNT(2), + SUM(3), + HISTOGRAM(4), + FREQUENCY(5), + AGGREGATIONFUNCTION_NOT_SET(0); + private final int value; + + private AggregationFunctionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AggregationFunctionCase valueOf(int value) { + return forNumber(value); + } + + public static AggregationFunctionCase forNumber(int value) { + switch (value) { + case 2: + return COUNT; + case 3: + return SUM; + case 4: + return HISTOGRAM; + case 5: + return FREQUENCY; + case 0: + return AGGREGATIONFUNCTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AggregationFunctionCase getAggregationFunctionCase() { + return AggregationFunctionCase.forNumber(aggregationFunctionCase_); + } + + public static final int FIELD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object field_ = ""; + /** + * + * + *
+   * The name of the field on which to aggregate.
+   * 
+ * + * string field = 1; + * + * @return The field. + */ + @java.lang.Override + public java.lang.String getField() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the field on which to aggregate.
+   * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COUNT_FIELD_NUMBER = 2; + /** + * + * + *
+   * Count the number of matching objects.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + * + * @return Whether the count field is set. + */ + @java.lang.Override + public boolean hasCount() { + return aggregationFunctionCase_ == 2; + } + /** + * + * + *
+   * Count the number of matching objects.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + * + * @return The count. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Count getCount() { + if (aggregationFunctionCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Count) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Count.getDefaultInstance(); + } + /** + * + * + *
+   * Count the number of matching objects.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.CountOrBuilder getCountOrBuilder() { + if (aggregationFunctionCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Count) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Count.getDefaultInstance(); + } + + public static final int SUM_FIELD_NUMBER = 3; + /** + * + * + *
+   * Sum over a numeric field.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + * + * @return Whether the sum field is set. + */ + @java.lang.Override + public boolean hasSum() { + return aggregationFunctionCase_ == 3; + } + /** + * + * + *
+   * Sum over a numeric field.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + * + * @return The sum. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Sum getSum() { + if (aggregationFunctionCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Sum) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Sum.getDefaultInstance(); + } + /** + * + * + *
+   * Sum over a numeric field.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.SumOrBuilder getSumOrBuilder() { + if (aggregationFunctionCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Sum) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Sum.getDefaultInstance(); + } + + public static final int HISTOGRAM_FIELD_NUMBER = 4; + /** + * + * + *
+   * Creates a bucketed histogram of field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + * + * @return Whether the histogram field is set. + */ + @java.lang.Override + public boolean hasHistogram() { + return aggregationFunctionCase_ == 4; + } + /** + * + * + *
+   * Creates a bucketed histogram of field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + * + * @return The histogram. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Histogram getHistogram() { + if (aggregationFunctionCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Histogram) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Histogram.getDefaultInstance(); + } + /** + * + * + *
+   * Creates a bucketed histogram of field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.HistogramOrBuilder + getHistogramOrBuilder() { + if (aggregationFunctionCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Histogram) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Histogram.getDefaultInstance(); + } + + public static final int FREQUENCY_FIELD_NUMBER = 5; + /** + * + * + *
+   * Creates a frequency distribution of all field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + * + * @return Whether the frequency field is set. + */ + @java.lang.Override + public boolean hasFrequency() { + return aggregationFunctionCase_ == 5; + } + /** + * + * + *
+   * Creates a frequency distribution of all field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + * + * @return The frequency. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Frequency getFrequency() { + if (aggregationFunctionCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Frequency) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Frequency.getDefaultInstance(); + } + /** + * + * + *
+   * Creates a frequency distribution of all field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.FrequencyOrBuilder + getFrequencyOrBuilder() { + if (aggregationFunctionCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Frequency) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Frequency.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); + } + if (aggregationFunctionCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.migrationcenter.v1.Aggregation.Count) aggregationFunction_); + } + if (aggregationFunctionCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.migrationcenter.v1.Aggregation.Sum) aggregationFunction_); + } + if (aggregationFunctionCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.migrationcenter.v1.Aggregation.Histogram) aggregationFunction_); + } + if (aggregationFunctionCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.migrationcenter.v1.Aggregation.Frequency) aggregationFunction_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); + } + if (aggregationFunctionCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.migrationcenter.v1.Aggregation.Count) aggregationFunction_); + } + if (aggregationFunctionCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.migrationcenter.v1.Aggregation.Sum) aggregationFunction_); + } + if (aggregationFunctionCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.migrationcenter.v1.Aggregation.Histogram) aggregationFunction_); + } + if (aggregationFunctionCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.migrationcenter.v1.Aggregation.Frequency) aggregationFunction_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Aggregation)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Aggregation other = + (com.google.cloud.migrationcenter.v1.Aggregation) obj; + + if (!getField().equals(other.getField())) return false; + if (!getAggregationFunctionCase().equals(other.getAggregationFunctionCase())) return false; + switch (aggregationFunctionCase_) { + case 2: + if (!getCount().equals(other.getCount())) return false; + break; + case 3: + if (!getSum().equals(other.getSum())) return false; + break; + case 4: + if (!getHistogram().equals(other.getHistogram())) return false; + break; + case 5: + if (!getFrequency().equals(other.getFrequency())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + switch (aggregationFunctionCase_) { + case 2: + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCount().hashCode(); + break; + case 3: + hash = (37 * hash) + SUM_FIELD_NUMBER; + hash = (53 * hash) + getSum().hashCode(); + break; + case 4: + hash = (37 * hash) + HISTOGRAM_FIELD_NUMBER; + hash = (53 * hash) + getHistogram().hashCode(); + break; + case 5: + hash = (37 * hash) + FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + getFrequency().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.Aggregation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message describing an aggregation. The message includes the aggregation type,
+   * parameters, and the field on which to perform the aggregation.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Aggregation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Aggregation) + com.google.cloud.migrationcenter.v1.AggregationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Aggregation.class, + com.google.cloud.migrationcenter.v1.Aggregation.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Aggregation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + field_ = ""; + if (countBuilder_ != null) { + countBuilder_.clear(); + } + if (sumBuilder_ != null) { + sumBuilder_.clear(); + } + if (histogramBuilder_ != null) { + histogramBuilder_.clear(); + } + if (frequencyBuilder_ != null) { + frequencyBuilder_.clear(); + } + aggregationFunctionCase_ = 0; + aggregationFunction_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Aggregation_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Aggregation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation build() { + com.google.cloud.migrationcenter.v1.Aggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation buildPartial() { + com.google.cloud.migrationcenter.v1.Aggregation result = + new com.google.cloud.migrationcenter.v1.Aggregation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.Aggregation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.field_ = field_; + } + } + + private void buildPartialOneofs(com.google.cloud.migrationcenter.v1.Aggregation result) { + result.aggregationFunctionCase_ = aggregationFunctionCase_; + result.aggregationFunction_ = this.aggregationFunction_; + if (aggregationFunctionCase_ == 2 && countBuilder_ != null) { + result.aggregationFunction_ = countBuilder_.build(); + } + if (aggregationFunctionCase_ == 3 && sumBuilder_ != null) { + result.aggregationFunction_ = sumBuilder_.build(); + } + if (aggregationFunctionCase_ == 4 && histogramBuilder_ != null) { + result.aggregationFunction_ = histogramBuilder_.build(); + } + if (aggregationFunctionCase_ == 5 && frequencyBuilder_ != null) { + result.aggregationFunction_ = frequencyBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Aggregation) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Aggregation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Aggregation other) { + if (other == com.google.cloud.migrationcenter.v1.Aggregation.getDefaultInstance()) + return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getAggregationFunctionCase()) { + case COUNT: + { + mergeCount(other.getCount()); + break; + } + case SUM: + { + mergeSum(other.getSum()); + break; + } + case HISTOGRAM: + { + mergeHistogram(other.getHistogram()); + break; + } + case FREQUENCY: + { + mergeFrequency(other.getFrequency()); + break; + } + case AGGREGATIONFUNCTION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + field_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCountFieldBuilder().getBuilder(), extensionRegistry); + aggregationFunctionCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getSumFieldBuilder().getBuilder(), extensionRegistry); + aggregationFunctionCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getHistogramFieldBuilder().getBuilder(), extensionRegistry); + aggregationFunctionCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getFrequencyFieldBuilder().getBuilder(), extensionRegistry); + aggregationFunctionCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int aggregationFunctionCase_ = 0; + private java.lang.Object aggregationFunction_; + + public AggregationFunctionCase getAggregationFunctionCase() { + return AggregationFunctionCase.forNumber(aggregationFunctionCase_); + } + + public Builder clearAggregationFunction() { + aggregationFunctionCase_ = 0; + aggregationFunction_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object field_ = ""; + /** + * + * + *
+     * The name of the field on which to aggregate.
+     * 
+ * + * string field = 1; + * + * @return The field. + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the field on which to aggregate.
+     * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the field on which to aggregate.
+     * 
+ * + * string field = 1; + * + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the field on which to aggregate.
+     * 
+ * + * string field = 1; + * + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = getDefaultInstance().getField(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the field on which to aggregate.
+     * 
+ * + * string field = 1; + * + * @param value The bytes for field to set. + * @return This builder for chaining. + */ + public Builder setFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Count, + com.google.cloud.migrationcenter.v1.Aggregation.Count.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.CountOrBuilder> + countBuilder_; + /** + * + * + *
+     * Count the number of matching objects.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + * + * @return Whether the count field is set. + */ + @java.lang.Override + public boolean hasCount() { + return aggregationFunctionCase_ == 2; + } + /** + * + * + *
+     * Count the number of matching objects.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + * + * @return The count. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Count getCount() { + if (countBuilder_ == null) { + if (aggregationFunctionCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Count) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Count.getDefaultInstance(); + } else { + if (aggregationFunctionCase_ == 2) { + return countBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.Aggregation.Count.getDefaultInstance(); + } + } + /** + * + * + *
+     * Count the number of matching objects.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + */ + public Builder setCount(com.google.cloud.migrationcenter.v1.Aggregation.Count value) { + if (countBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregationFunction_ = value; + onChanged(); + } else { + countBuilder_.setMessage(value); + } + aggregationFunctionCase_ = 2; + return this; + } + /** + * + * + *
+     * Count the number of matching objects.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + */ + public Builder setCount( + com.google.cloud.migrationcenter.v1.Aggregation.Count.Builder builderForValue) { + if (countBuilder_ == null) { + aggregationFunction_ = builderForValue.build(); + onChanged(); + } else { + countBuilder_.setMessage(builderForValue.build()); + } + aggregationFunctionCase_ = 2; + return this; + } + /** + * + * + *
+     * Count the number of matching objects.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + */ + public Builder mergeCount(com.google.cloud.migrationcenter.v1.Aggregation.Count value) { + if (countBuilder_ == null) { + if (aggregationFunctionCase_ == 2 + && aggregationFunction_ + != com.google.cloud.migrationcenter.v1.Aggregation.Count.getDefaultInstance()) { + aggregationFunction_ = + com.google.cloud.migrationcenter.v1.Aggregation.Count.newBuilder( + (com.google.cloud.migrationcenter.v1.Aggregation.Count) aggregationFunction_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregationFunction_ = value; + } + onChanged(); + } else { + if (aggregationFunctionCase_ == 2) { + countBuilder_.mergeFrom(value); + } else { + countBuilder_.setMessage(value); + } + } + aggregationFunctionCase_ = 2; + return this; + } + /** + * + * + *
+     * Count the number of matching objects.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + */ + public Builder clearCount() { + if (countBuilder_ == null) { + if (aggregationFunctionCase_ == 2) { + aggregationFunctionCase_ = 0; + aggregationFunction_ = null; + onChanged(); + } + } else { + if (aggregationFunctionCase_ == 2) { + aggregationFunctionCase_ = 0; + aggregationFunction_ = null; + } + countBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Count the number of matching objects.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + */ + public com.google.cloud.migrationcenter.v1.Aggregation.Count.Builder getCountBuilder() { + return getCountFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Count the number of matching objects.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.CountOrBuilder getCountOrBuilder() { + if ((aggregationFunctionCase_ == 2) && (countBuilder_ != null)) { + return countBuilder_.getMessageOrBuilder(); + } else { + if (aggregationFunctionCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Count) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Count.getDefaultInstance(); + } + } + /** + * + * + *
+     * Count the number of matching objects.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Count, + com.google.cloud.migrationcenter.v1.Aggregation.Count.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.CountOrBuilder> + getCountFieldBuilder() { + if (countBuilder_ == null) { + if (!(aggregationFunctionCase_ == 2)) { + aggregationFunction_ = + com.google.cloud.migrationcenter.v1.Aggregation.Count.getDefaultInstance(); + } + countBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Count, + com.google.cloud.migrationcenter.v1.Aggregation.Count.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.CountOrBuilder>( + (com.google.cloud.migrationcenter.v1.Aggregation.Count) aggregationFunction_, + getParentForChildren(), + isClean()); + aggregationFunction_ = null; + } + aggregationFunctionCase_ = 2; + onChanged(); + return countBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Sum, + com.google.cloud.migrationcenter.v1.Aggregation.Sum.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.SumOrBuilder> + sumBuilder_; + /** + * + * + *
+     * Sum over a numeric field.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + * + * @return Whether the sum field is set. + */ + @java.lang.Override + public boolean hasSum() { + return aggregationFunctionCase_ == 3; + } + /** + * + * + *
+     * Sum over a numeric field.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + * + * @return The sum. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Sum getSum() { + if (sumBuilder_ == null) { + if (aggregationFunctionCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Sum) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Sum.getDefaultInstance(); + } else { + if (aggregationFunctionCase_ == 3) { + return sumBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.Aggregation.Sum.getDefaultInstance(); + } + } + /** + * + * + *
+     * Sum over a numeric field.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + */ + public Builder setSum(com.google.cloud.migrationcenter.v1.Aggregation.Sum value) { + if (sumBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregationFunction_ = value; + onChanged(); + } else { + sumBuilder_.setMessage(value); + } + aggregationFunctionCase_ = 3; + return this; + } + /** + * + * + *
+     * Sum over a numeric field.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + */ + public Builder setSum( + com.google.cloud.migrationcenter.v1.Aggregation.Sum.Builder builderForValue) { + if (sumBuilder_ == null) { + aggregationFunction_ = builderForValue.build(); + onChanged(); + } else { + sumBuilder_.setMessage(builderForValue.build()); + } + aggregationFunctionCase_ = 3; + return this; + } + /** + * + * + *
+     * Sum over a numeric field.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + */ + public Builder mergeSum(com.google.cloud.migrationcenter.v1.Aggregation.Sum value) { + if (sumBuilder_ == null) { + if (aggregationFunctionCase_ == 3 + && aggregationFunction_ + != com.google.cloud.migrationcenter.v1.Aggregation.Sum.getDefaultInstance()) { + aggregationFunction_ = + com.google.cloud.migrationcenter.v1.Aggregation.Sum.newBuilder( + (com.google.cloud.migrationcenter.v1.Aggregation.Sum) aggregationFunction_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregationFunction_ = value; + } + onChanged(); + } else { + if (aggregationFunctionCase_ == 3) { + sumBuilder_.mergeFrom(value); + } else { + sumBuilder_.setMessage(value); + } + } + aggregationFunctionCase_ = 3; + return this; + } + /** + * + * + *
+     * Sum over a numeric field.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + */ + public Builder clearSum() { + if (sumBuilder_ == null) { + if (aggregationFunctionCase_ == 3) { + aggregationFunctionCase_ = 0; + aggregationFunction_ = null; + onChanged(); + } + } else { + if (aggregationFunctionCase_ == 3) { + aggregationFunctionCase_ = 0; + aggregationFunction_ = null; + } + sumBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Sum over a numeric field.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + */ + public com.google.cloud.migrationcenter.v1.Aggregation.Sum.Builder getSumBuilder() { + return getSumFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Sum over a numeric field.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.SumOrBuilder getSumOrBuilder() { + if ((aggregationFunctionCase_ == 3) && (sumBuilder_ != null)) { + return sumBuilder_.getMessageOrBuilder(); + } else { + if (aggregationFunctionCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Sum) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Sum.getDefaultInstance(); + } + } + /** + * + * + *
+     * Sum over a numeric field.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Sum, + com.google.cloud.migrationcenter.v1.Aggregation.Sum.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.SumOrBuilder> + getSumFieldBuilder() { + if (sumBuilder_ == null) { + if (!(aggregationFunctionCase_ == 3)) { + aggregationFunction_ = + com.google.cloud.migrationcenter.v1.Aggregation.Sum.getDefaultInstance(); + } + sumBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Sum, + com.google.cloud.migrationcenter.v1.Aggregation.Sum.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.SumOrBuilder>( + (com.google.cloud.migrationcenter.v1.Aggregation.Sum) aggregationFunction_, + getParentForChildren(), + isClean()); + aggregationFunction_ = null; + } + aggregationFunctionCase_ = 3; + onChanged(); + return sumBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Histogram, + com.google.cloud.migrationcenter.v1.Aggregation.Histogram.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.HistogramOrBuilder> + histogramBuilder_; + /** + * + * + *
+     * Creates a bucketed histogram of field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + * + * @return Whether the histogram field is set. + */ + @java.lang.Override + public boolean hasHistogram() { + return aggregationFunctionCase_ == 4; + } + /** + * + * + *
+     * Creates a bucketed histogram of field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + * + * @return The histogram. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Histogram getHistogram() { + if (histogramBuilder_ == null) { + if (aggregationFunctionCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Histogram) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Histogram.getDefaultInstance(); + } else { + if (aggregationFunctionCase_ == 4) { + return histogramBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.Aggregation.Histogram.getDefaultInstance(); + } + } + /** + * + * + *
+     * Creates a bucketed histogram of field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + */ + public Builder setHistogram(com.google.cloud.migrationcenter.v1.Aggregation.Histogram value) { + if (histogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregationFunction_ = value; + onChanged(); + } else { + histogramBuilder_.setMessage(value); + } + aggregationFunctionCase_ = 4; + return this; + } + /** + * + * + *
+     * Creates a bucketed histogram of field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + */ + public Builder setHistogram( + com.google.cloud.migrationcenter.v1.Aggregation.Histogram.Builder builderForValue) { + if (histogramBuilder_ == null) { + aggregationFunction_ = builderForValue.build(); + onChanged(); + } else { + histogramBuilder_.setMessage(builderForValue.build()); + } + aggregationFunctionCase_ = 4; + return this; + } + /** + * + * + *
+     * Creates a bucketed histogram of field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + */ + public Builder mergeHistogram(com.google.cloud.migrationcenter.v1.Aggregation.Histogram value) { + if (histogramBuilder_ == null) { + if (aggregationFunctionCase_ == 4 + && aggregationFunction_ + != com.google.cloud.migrationcenter.v1.Aggregation.Histogram.getDefaultInstance()) { + aggregationFunction_ = + com.google.cloud.migrationcenter.v1.Aggregation.Histogram.newBuilder( + (com.google.cloud.migrationcenter.v1.Aggregation.Histogram) + aggregationFunction_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregationFunction_ = value; + } + onChanged(); + } else { + if (aggregationFunctionCase_ == 4) { + histogramBuilder_.mergeFrom(value); + } else { + histogramBuilder_.setMessage(value); + } + } + aggregationFunctionCase_ = 4; + return this; + } + /** + * + * + *
+     * Creates a bucketed histogram of field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + */ + public Builder clearHistogram() { + if (histogramBuilder_ == null) { + if (aggregationFunctionCase_ == 4) { + aggregationFunctionCase_ = 0; + aggregationFunction_ = null; + onChanged(); + } + } else { + if (aggregationFunctionCase_ == 4) { + aggregationFunctionCase_ = 0; + aggregationFunction_ = null; + } + histogramBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Creates a bucketed histogram of field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + */ + public com.google.cloud.migrationcenter.v1.Aggregation.Histogram.Builder getHistogramBuilder() { + return getHistogramFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Creates a bucketed histogram of field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.HistogramOrBuilder + getHistogramOrBuilder() { + if ((aggregationFunctionCase_ == 4) && (histogramBuilder_ != null)) { + return histogramBuilder_.getMessageOrBuilder(); + } else { + if (aggregationFunctionCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Histogram) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Histogram.getDefaultInstance(); + } + } + /** + * + * + *
+     * Creates a bucketed histogram of field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Histogram, + com.google.cloud.migrationcenter.v1.Aggregation.Histogram.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.HistogramOrBuilder> + getHistogramFieldBuilder() { + if (histogramBuilder_ == null) { + if (!(aggregationFunctionCase_ == 4)) { + aggregationFunction_ = + com.google.cloud.migrationcenter.v1.Aggregation.Histogram.getDefaultInstance(); + } + histogramBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Histogram, + com.google.cloud.migrationcenter.v1.Aggregation.Histogram.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.HistogramOrBuilder>( + (com.google.cloud.migrationcenter.v1.Aggregation.Histogram) aggregationFunction_, + getParentForChildren(), + isClean()); + aggregationFunction_ = null; + } + aggregationFunctionCase_ = 4; + onChanged(); + return histogramBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Frequency, + com.google.cloud.migrationcenter.v1.Aggregation.Frequency.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.FrequencyOrBuilder> + frequencyBuilder_; + /** + * + * + *
+     * Creates a frequency distribution of all field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + * + * @return Whether the frequency field is set. + */ + @java.lang.Override + public boolean hasFrequency() { + return aggregationFunctionCase_ == 5; + } + /** + * + * + *
+     * Creates a frequency distribution of all field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + * + * @return The frequency. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.Frequency getFrequency() { + if (frequencyBuilder_ == null) { + if (aggregationFunctionCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Frequency) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Frequency.getDefaultInstance(); + } else { + if (aggregationFunctionCase_ == 5) { + return frequencyBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.Aggregation.Frequency.getDefaultInstance(); + } + } + /** + * + * + *
+     * Creates a frequency distribution of all field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + */ + public Builder setFrequency(com.google.cloud.migrationcenter.v1.Aggregation.Frequency value) { + if (frequencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregationFunction_ = value; + onChanged(); + } else { + frequencyBuilder_.setMessage(value); + } + aggregationFunctionCase_ = 5; + return this; + } + /** + * + * + *
+     * Creates a frequency distribution of all field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + */ + public Builder setFrequency( + com.google.cloud.migrationcenter.v1.Aggregation.Frequency.Builder builderForValue) { + if (frequencyBuilder_ == null) { + aggregationFunction_ = builderForValue.build(); + onChanged(); + } else { + frequencyBuilder_.setMessage(builderForValue.build()); + } + aggregationFunctionCase_ = 5; + return this; + } + /** + * + * + *
+     * Creates a frequency distribution of all field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + */ + public Builder mergeFrequency(com.google.cloud.migrationcenter.v1.Aggregation.Frequency value) { + if (frequencyBuilder_ == null) { + if (aggregationFunctionCase_ == 5 + && aggregationFunction_ + != com.google.cloud.migrationcenter.v1.Aggregation.Frequency.getDefaultInstance()) { + aggregationFunction_ = + com.google.cloud.migrationcenter.v1.Aggregation.Frequency.newBuilder( + (com.google.cloud.migrationcenter.v1.Aggregation.Frequency) + aggregationFunction_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregationFunction_ = value; + } + onChanged(); + } else { + if (aggregationFunctionCase_ == 5) { + frequencyBuilder_.mergeFrom(value); + } else { + frequencyBuilder_.setMessage(value); + } + } + aggregationFunctionCase_ = 5; + return this; + } + /** + * + * + *
+     * Creates a frequency distribution of all field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + */ + public Builder clearFrequency() { + if (frequencyBuilder_ == null) { + if (aggregationFunctionCase_ == 5) { + aggregationFunctionCase_ = 0; + aggregationFunction_ = null; + onChanged(); + } + } else { + if (aggregationFunctionCase_ == 5) { + aggregationFunctionCase_ = 0; + aggregationFunction_ = null; + } + frequencyBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Creates a frequency distribution of all field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + */ + public com.google.cloud.migrationcenter.v1.Aggregation.Frequency.Builder getFrequencyBuilder() { + return getFrequencyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Creates a frequency distribution of all field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation.FrequencyOrBuilder + getFrequencyOrBuilder() { + if ((aggregationFunctionCase_ == 5) && (frequencyBuilder_ != null)) { + return frequencyBuilder_.getMessageOrBuilder(); + } else { + if (aggregationFunctionCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.Aggregation.Frequency) aggregationFunction_; + } + return com.google.cloud.migrationcenter.v1.Aggregation.Frequency.getDefaultInstance(); + } + } + /** + * + * + *
+     * Creates a frequency distribution of all field values.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Frequency, + com.google.cloud.migrationcenter.v1.Aggregation.Frequency.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.FrequencyOrBuilder> + getFrequencyFieldBuilder() { + if (frequencyBuilder_ == null) { + if (!(aggregationFunctionCase_ == 5)) { + aggregationFunction_ = + com.google.cloud.migrationcenter.v1.Aggregation.Frequency.getDefaultInstance(); + } + frequencyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Aggregation.Frequency, + com.google.cloud.migrationcenter.v1.Aggregation.Frequency.Builder, + com.google.cloud.migrationcenter.v1.Aggregation.FrequencyOrBuilder>( + (com.google.cloud.migrationcenter.v1.Aggregation.Frequency) aggregationFunction_, + getParentForChildren(), + isClean()); + aggregationFunction_ = null; + } + aggregationFunctionCase_ = 5; + onChanged(); + return frequencyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Aggregation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Aggregation) + private static final com.google.cloud.migrationcenter.v1.Aggregation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Aggregation(); + } + + public static com.google.cloud.migrationcenter.v1.Aggregation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Aggregation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Aggregation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationOrBuilder.java new file mode 100644 index 000000000000..f650f0657512 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationOrBuilder.java @@ -0,0 +1,193 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface AggregationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Aggregation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the field on which to aggregate.
+   * 
+ * + * string field = 1; + * + * @return The field. + */ + java.lang.String getField(); + /** + * + * + *
+   * The name of the field on which to aggregate.
+   * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + com.google.protobuf.ByteString getFieldBytes(); + + /** + * + * + *
+   * Count the number of matching objects.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + * + * @return Whether the count field is set. + */ + boolean hasCount(); + /** + * + * + *
+   * Count the number of matching objects.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + * + * @return The count. + */ + com.google.cloud.migrationcenter.v1.Aggregation.Count getCount(); + /** + * + * + *
+   * Count the number of matching objects.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + */ + com.google.cloud.migrationcenter.v1.Aggregation.CountOrBuilder getCountOrBuilder(); + + /** + * + * + *
+   * Sum over a numeric field.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + * + * @return Whether the sum field is set. + */ + boolean hasSum(); + /** + * + * + *
+   * Sum over a numeric field.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + * + * @return The sum. + */ + com.google.cloud.migrationcenter.v1.Aggregation.Sum getSum(); + /** + * + * + *
+   * Sum over a numeric field.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + */ + com.google.cloud.migrationcenter.v1.Aggregation.SumOrBuilder getSumOrBuilder(); + + /** + * + * + *
+   * Creates a bucketed histogram of field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + * + * @return Whether the histogram field is set. + */ + boolean hasHistogram(); + /** + * + * + *
+   * Creates a bucketed histogram of field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + * + * @return The histogram. + */ + com.google.cloud.migrationcenter.v1.Aggregation.Histogram getHistogram(); + /** + * + * + *
+   * Creates a bucketed histogram of field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + */ + com.google.cloud.migrationcenter.v1.Aggregation.HistogramOrBuilder getHistogramOrBuilder(); + + /** + * + * + *
+   * Creates a frequency distribution of all field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + * + * @return Whether the frequency field is set. + */ + boolean hasFrequency(); + /** + * + * + *
+   * Creates a frequency distribution of all field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + * + * @return The frequency. + */ + com.google.cloud.migrationcenter.v1.Aggregation.Frequency getFrequency(); + /** + * + * + *
+   * Creates a frequency distribution of all field values.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + */ + com.google.cloud.migrationcenter.v1.Aggregation.FrequencyOrBuilder getFrequencyOrBuilder(); + + com.google.cloud.migrationcenter.v1.Aggregation.AggregationFunctionCase + getAggregationFunctionCase(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationResult.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationResult.java new file mode 100644 index 000000000000..507bc6b01415 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationResult.java @@ -0,0 +1,5222 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Message describing a result of an aggregation.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult} + */ +public final class AggregationResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AggregationResult) + AggregationResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use AggregationResult.newBuilder() to construct. + private AggregationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AggregationResult() { + field_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AggregationResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Builder.class); + } + + public interface CountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AggregationResult.Count) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 value = 1; + * + * @return The value. + */ + long getValue(); + } + /** + * + * + *
+   * The result of a count aggregation.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult.Count} + */ + public static final class Count extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AggregationResult.Count) + CountOrBuilder { + private static final long serialVersionUID = 0L; + // Use Count.newBuilder() to construct. + private Count(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Count() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Count(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Count_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Count_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.Count.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Count.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private long value_ = 0L; + /** + * int64 value = 1; + * + * @return The value. + */ + @java.lang.Override + public long getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (value_ != 0L) { + output.writeInt64(1, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AggregationResult.Count)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AggregationResult.Count other = + (com.google.cloud.migrationcenter.v1.AggregationResult.Count) obj; + + if (getValue() != other.getValue()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getValue()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AggregationResult.Count prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The result of a count aggregation.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult.Count} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AggregationResult.Count) + com.google.cloud.migrationcenter.v1.AggregationResult.CountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Count_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Count_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.Count.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Count.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.AggregationResult.Count.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Count_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Count + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AggregationResult.Count.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Count build() { + com.google.cloud.migrationcenter.v1.AggregationResult.Count result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Count buildPartial() { + com.google.cloud.migrationcenter.v1.AggregationResult.Count result = + new com.google.cloud.migrationcenter.v1.AggregationResult.Count(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.AggregationResult.Count result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AggregationResult.Count) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AggregationResult.Count) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.AggregationResult.Count other) { + if (other + == com.google.cloud.migrationcenter.v1.AggregationResult.Count.getDefaultInstance()) + return this; + if (other.getValue() != 0L) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + value_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long value_; + /** + * int64 value = 1; + * + * @return The value. + */ + @java.lang.Override + public long getValue() { + return value_; + } + /** + * int64 value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(long value) { + + value_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AggregationResult.Count) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AggregationResult.Count) + private static final com.google.cloud.migrationcenter.v1.AggregationResult.Count + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AggregationResult.Count(); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Count getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Count parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Count getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SumOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AggregationResult.Sum) + com.google.protobuf.MessageOrBuilder { + + /** + * double value = 1; + * + * @return The value. + */ + double getValue(); + } + /** + * + * + *
+   * The result of a sum aggregation.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult.Sum} + */ + public static final class Sum extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AggregationResult.Sum) + SumOrBuilder { + private static final long serialVersionUID = 0L; + // Use Sum.newBuilder() to construct. + private Sum(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Sum() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Sum(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Sum_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Sum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.Sum.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Sum.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private double value_ = 0D; + /** + * double value = 1; + * + * @return The value. + */ + @java.lang.Override + public double getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(value_) != 0) { + output.writeDouble(1, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(value_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AggregationResult.Sum)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AggregationResult.Sum other = + (com.google.cloud.migrationcenter.v1.AggregationResult.Sum) obj; + + if (java.lang.Double.doubleToLongBits(getValue()) + != java.lang.Double.doubleToLongBits(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getValue())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AggregationResult.Sum prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The result of a sum aggregation.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult.Sum} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AggregationResult.Sum) + com.google.cloud.migrationcenter.v1.AggregationResult.SumOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Sum_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Sum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.Sum.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Sum.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.AggregationResult.Sum.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Sum_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Sum getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AggregationResult.Sum.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Sum build() { + com.google.cloud.migrationcenter.v1.AggregationResult.Sum result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Sum buildPartial() { + com.google.cloud.migrationcenter.v1.AggregationResult.Sum result = + new com.google.cloud.migrationcenter.v1.AggregationResult.Sum(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.AggregationResult.Sum result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AggregationResult.Sum) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AggregationResult.Sum) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.AggregationResult.Sum other) { + if (other == com.google.cloud.migrationcenter.v1.AggregationResult.Sum.getDefaultInstance()) + return this; + if (other.getValue() != 0D) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + value_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double value_; + /** + * double value = 1; + * + * @return The value. + */ + @java.lang.Override + public double getValue() { + return value_; + } + /** + * double value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(double value) { + + value_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * double value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AggregationResult.Sum) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AggregationResult.Sum) + private static final com.google.cloud.migrationcenter.v1.AggregationResult.Sum DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AggregationResult.Sum(); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Sum getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Sum parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Sum getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface HistogramOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AggregationResult.Histogram) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + java.util.List + getBucketsList(); + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket getBuckets(int index); + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + int getBucketsCount(); + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.BucketOrBuilder> + getBucketsOrBuilderList(); + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.BucketOrBuilder + getBucketsOrBuilder(int index); + } + /** + * + * + *
+   * The result of a bucketed histogram aggregation.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult.Histogram} + */ + public static final class Histogram extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AggregationResult.Histogram) + HistogramOrBuilder { + private static final long serialVersionUID = 0L; + // Use Histogram.newBuilder() to construct. + private Histogram(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Histogram() { + buckets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Histogram(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Builder.class); + } + + public interface BucketOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Lower bound - inclusive.
+       * 
+ * + * double lower_bound = 1; + * + * @return The lowerBound. + */ + double getLowerBound(); + + /** + * + * + *
+       * Upper bound - exclusive.
+       * 
+ * + * double upper_bound = 2; + * + * @return The upperBound. + */ + double getUpperBound(); + + /** + * + * + *
+       * Count of items in the bucket.
+       * 
+ * + * int64 count = 3; + * + * @return The count. + */ + long getCount(); + } + /** + * + * + *
+     * A histogram bucket with a lower and upper bound, and a count of items
+     * with a field value between those bounds.
+     * The lower bound is inclusive and the upper bound is exclusive.
+     * Lower bound may be -infinity and upper bound may be infinity.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} + */ + public static final class Bucket extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket) + BucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use Bucket.newBuilder() to construct. + private Bucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Bucket() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Bucket(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_Bucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_Bucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder + .class); + } + + public static final int LOWER_BOUND_FIELD_NUMBER = 1; + private double lowerBound_ = 0D; + /** + * + * + *
+       * Lower bound - inclusive.
+       * 
+ * + * double lower_bound = 1; + * + * @return The lowerBound. + */ + @java.lang.Override + public double getLowerBound() { + return lowerBound_; + } + + public static final int UPPER_BOUND_FIELD_NUMBER = 2; + private double upperBound_ = 0D; + /** + * + * + *
+       * Upper bound - exclusive.
+       * 
+ * + * double upper_bound = 2; + * + * @return The upperBound. + */ + @java.lang.Override + public double getUpperBound() { + return upperBound_; + } + + public static final int COUNT_FIELD_NUMBER = 3; + private long count_ = 0L; + /** + * + * + *
+       * Count of items in the bucket.
+       * 
+ * + * int64 count = 3; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(lowerBound_) != 0) { + output.writeDouble(1, lowerBound_); + } + if (java.lang.Double.doubleToRawLongBits(upperBound_) != 0) { + output.writeDouble(2, upperBound_); + } + if (count_ != 0L) { + output.writeInt64(3, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(lowerBound_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, lowerBound_); + } + if (java.lang.Double.doubleToRawLongBits(upperBound_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, upperBound_); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, count_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket other = + (com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket) obj; + + if (java.lang.Double.doubleToLongBits(getLowerBound()) + != java.lang.Double.doubleToLongBits(other.getLowerBound())) return false; + if (java.lang.Double.doubleToLongBits(getUpperBound()) + != java.lang.Double.doubleToLongBits(other.getUpperBound())) return false; + if (getCount() != other.getCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLowerBound())); + hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getUpperBound())); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A histogram bucket with a lower and upper bound, and a count of items
+       * with a field value between those bounds.
+       * The lower bound is inclusive and the upper bound is exclusive.
+       * Lower bound may be -infinity and upper bound may be infinity.
+       * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket) + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.BucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_Bucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_Bucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lowerBound_ = 0D; + upperBound_ = 0D; + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_Bucket_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket build() { + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + buildPartial() { + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket result = + new com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lowerBound_ = lowerBound_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.upperBound_ = upperBound_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.count_ = count_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket other) { + if (other + == com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + .getDefaultInstance()) return this; + if (other.getLowerBound() != 0D) { + setLowerBound(other.getLowerBound()); + } + if (other.getUpperBound() != 0D) { + setUpperBound(other.getUpperBound()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + lowerBound_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + upperBound_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 24: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double lowerBound_; + /** + * + * + *
+         * Lower bound - inclusive.
+         * 
+ * + * double lower_bound = 1; + * + * @return The lowerBound. + */ + @java.lang.Override + public double getLowerBound() { + return lowerBound_; + } + /** + * + * + *
+         * Lower bound - inclusive.
+         * 
+ * + * double lower_bound = 1; + * + * @param value The lowerBound to set. + * @return This builder for chaining. + */ + public Builder setLowerBound(double value) { + + lowerBound_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Lower bound - inclusive.
+         * 
+ * + * double lower_bound = 1; + * + * @return This builder for chaining. + */ + public Builder clearLowerBound() { + bitField0_ = (bitField0_ & ~0x00000001); + lowerBound_ = 0D; + onChanged(); + return this; + } + + private double upperBound_; + /** + * + * + *
+         * Upper bound - exclusive.
+         * 
+ * + * double upper_bound = 2; + * + * @return The upperBound. + */ + @java.lang.Override + public double getUpperBound() { + return upperBound_; + } + /** + * + * + *
+         * Upper bound - exclusive.
+         * 
+ * + * double upper_bound = 2; + * + * @param value The upperBound to set. + * @return This builder for chaining. + */ + public Builder setUpperBound(double value) { + + upperBound_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Upper bound - exclusive.
+         * 
+ * + * double upper_bound = 2; + * + * @return This builder for chaining. + */ + public Builder clearUpperBound() { + bitField0_ = (bitField0_ & ~0x00000002); + upperBound_ = 0D; + onChanged(); + return this; + } + + private long count_; + /** + * + * + *
+         * Count of items in the bucket.
+         * 
+ * + * int64 count = 3; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * + * + *
+         * Count of items in the bucket.
+         * 
+ * + * int64 count = 3; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Count of items in the bucket.
+         * 
+ * + * int64 count = 3; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000004); + count_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket) + private static final com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket(); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Bucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BUCKETS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + buckets_; + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + @java.lang.Override + public java.util.List + getBucketsList() { + return buckets_; + } + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.BucketOrBuilder> + getBucketsOrBuilderList() { + return buckets_; + } + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + @java.lang.Override + public int getBucketsCount() { + return buckets_.size(); + } + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket getBuckets( + int index) { + return buckets_.get(index); + } + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.BucketOrBuilder + getBucketsOrBuilder(int index) { + return buckets_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < buckets_.size(); i++) { + output.writeMessage(1, buckets_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < buckets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, buckets_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AggregationResult.Histogram)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram other = + (com.google.cloud.migrationcenter.v1.AggregationResult.Histogram) obj; + + if (!getBucketsList().equals(other.getBucketsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBucketsCount() > 0) { + hash = (37 * hash) + BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getBucketsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The result of a bucketed histogram aggregation.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult.Histogram} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AggregationResult.Histogram) + com.google.cloud.migrationcenter.v1.AggregationResult.HistogramOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Builder.class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + } else { + buckets_ = null; + bucketsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram build() { + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram buildPartial() { + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram result = + new com.google.cloud.migrationcenter.v1.AggregationResult.Histogram(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram result) { + if (bucketsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + buckets_ = java.util.Collections.unmodifiableList(buckets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.buckets_ = buckets_; + } else { + result.buckets_ = bucketsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AggregationResult.Histogram) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AggregationResult.Histogram) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram other) { + if (other + == com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.getDefaultInstance()) + return this; + if (bucketsBuilder_ == null) { + if (!other.buckets_.isEmpty()) { + if (buckets_.isEmpty()) { + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketsIsMutable(); + buckets_.addAll(other.buckets_); + } + onChanged(); + } + } else { + if (!other.buckets_.isEmpty()) { + if (bucketsBuilder_.isEmpty()) { + bucketsBuilder_.dispose(); + bucketsBuilder_ = null; + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000001); + bucketsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBucketsFieldBuilder() + : null; + } else { + bucketsBuilder_.addAllMessages(other.buckets_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket m = + input.readMessage( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + .parser(), + extensionRegistry); + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(m); + } else { + bucketsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + buckets_ = java.util.Collections.emptyList(); + + private void ensureBucketsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + buckets_ = + new java.util.ArrayList< + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket>(buckets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.BucketOrBuilder> + bucketsBuilder_; + + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public java.util.List + getBucketsList() { + if (bucketsBuilder_ == null) { + return java.util.Collections.unmodifiableList(buckets_); + } else { + return bucketsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public int getBucketsCount() { + if (bucketsBuilder_ == null) { + return buckets_.size(); + } else { + return bucketsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket getBuckets( + int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public Builder setBuckets( + int index, com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.set(index, value); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public Builder setBuckets( + int index, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public Builder addBuckets( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(value); + onChanged(); + } else { + bucketsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public Builder addBuckets( + int index, com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(index, value); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public Builder addBuckets( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public Builder addBuckets( + int index, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public Builder addAllBuckets( + java.lang.Iterable< + ? extends com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket> + values) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, buckets_); + onChanged(); + } else { + bucketsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public Builder clearBuckets() { + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bucketsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public Builder removeBuckets(int index) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.remove(index); + onChanged(); + } else { + bucketsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder + getBucketsBuilder(int index) { + return getBucketsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.BucketOrBuilder + getBucketsOrBuilder(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.BucketOrBuilder> + getBucketsOrBuilderList() { + if (bucketsBuilder_ != null) { + return bucketsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(buckets_); + } + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder + addBucketsBuilder() { + return getBucketsFieldBuilder() + .addBuilder( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + .getDefaultInstance()); + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder + addBucketsBuilder(int index) { + return getBucketsFieldBuilder() + .addBuilder( + index, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + .getDefaultInstance()); + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * + */ + public java.util.List< + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder> + getBucketsBuilderList() { + return getBucketsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.BucketOrBuilder> + getBucketsFieldBuilder() { + if (bucketsBuilder_ == null) { + bucketsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.BucketOrBuilder>( + buckets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + buckets_ = null; + } + return bucketsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AggregationResult.Histogram) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AggregationResult.Histogram) + private static final com.google.cloud.migrationcenter.v1.AggregationResult.Histogram + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AggregationResult.Histogram(); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Histogram + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Histogram parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FrequencyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AggregationResult.Frequency) + com.google.protobuf.MessageOrBuilder { + + /** map<string, int64> values = 1; */ + int getValuesCount(); + /** map<string, int64> values = 1; */ + boolean containsValues(java.lang.String key); + /** Use {@link #getValuesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getValues(); + /** map<string, int64> values = 1; */ + java.util.Map getValuesMap(); + /** map<string, int64> values = 1; */ + long getValuesOrDefault(java.lang.String key, long defaultValue); + /** map<string, int64> values = 1; */ + long getValuesOrThrow(java.lang.String key); + } + /** + * + * + *
+   * The result of a frequency distribution aggregation.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult.Frequency} + */ + public static final class Frequency extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AggregationResult.Frequency) + FrequencyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Frequency.newBuilder() to construct. + private Frequency(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Frequency() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Frequency(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + + private static final class ValuesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_ValuesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField values_; + + private com.google.protobuf.MapField internalGetValues() { + if (values_ == null) { + return com.google.protobuf.MapField.emptyMapField(ValuesDefaultEntryHolder.defaultEntry); + } + return values_; + } + + public int getValuesCount() { + return internalGetValues().getMap().size(); + } + /** map<string, int64> values = 1; */ + @java.lang.Override + public boolean containsValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetValues().getMap().containsKey(key); + } + /** Use {@link #getValuesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getValues() { + return getValuesMap(); + } + /** map<string, int64> values = 1; */ + @java.lang.Override + public java.util.Map getValuesMap() { + return internalGetValues().getMap(); + } + /** map<string, int64> values = 1; */ + @java.lang.Override + public long getValuesOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetValues().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** map<string, int64> values = 1; */ + @java.lang.Override + public long getValuesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetValues().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetValues(), ValuesDefaultEntryHolder.defaultEntry, 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetValues().getMap().entrySet()) { + com.google.protobuf.MapEntry values__ = + ValuesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, values__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AggregationResult.Frequency)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency other = + (com.google.cloud.migrationcenter.v1.AggregationResult.Frequency) obj; + + if (!internalGetValues().equals(other.internalGetValues())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetValues().getMap().isEmpty()) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + internalGetValues().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The result of a frequency distribution aggregation.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult.Frequency} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AggregationResult.Frequency) + com.google.cloud.migrationcenter.v1.AggregationResult.FrequencyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 1: + return internalGetMutableValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.Builder.class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableValues().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Frequency + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Frequency build() { + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Frequency buildPartial() { + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency result = + new com.google.cloud.migrationcenter.v1.AggregationResult.Frequency(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.values_ = internalGetValues(); + result.values_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AggregationResult.Frequency) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AggregationResult.Frequency) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency other) { + if (other + == com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.getDefaultInstance()) + return this; + internalGetMutableValues().mergeFrom(other.internalGetValues()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.MapEntry values__ = + input.readMessage( + ValuesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableValues() + .getMutableMap() + .put(values__.getKey(), values__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.MapField values_; + + private com.google.protobuf.MapField internalGetValues() { + if (values_ == null) { + return com.google.protobuf.MapField.emptyMapField(ValuesDefaultEntryHolder.defaultEntry); + } + return values_; + } + + private com.google.protobuf.MapField + internalGetMutableValues() { + if (values_ == null) { + values_ = com.google.protobuf.MapField.newMapField(ValuesDefaultEntryHolder.defaultEntry); + } + if (!values_.isMutable()) { + values_ = values_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return values_; + } + + public int getValuesCount() { + return internalGetValues().getMap().size(); + } + /** map<string, int64> values = 1; */ + @java.lang.Override + public boolean containsValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetValues().getMap().containsKey(key); + } + /** Use {@link #getValuesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getValues() { + return getValuesMap(); + } + /** map<string, int64> values = 1; */ + @java.lang.Override + public java.util.Map getValuesMap() { + return internalGetValues().getMap(); + } + /** map<string, int64> values = 1; */ + @java.lang.Override + public long getValuesOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetValues().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** map<string, int64> values = 1; */ + @java.lang.Override + public long getValuesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetValues().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearValues() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableValues().getMutableMap().clear(); + return this; + } + /** map<string, int64> values = 1; */ + public Builder removeValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableValues().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableValues() { + bitField0_ |= 0x00000001; + return internalGetMutableValues().getMutableMap(); + } + /** map<string, int64> values = 1; */ + public Builder putValues(java.lang.String key, long value) { + if (key == null) { + throw new NullPointerException("map key"); + } + + internalGetMutableValues().getMutableMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** map<string, int64> values = 1; */ + public Builder putAllValues(java.util.Map values) { + internalGetMutableValues().getMutableMap().putAll(values); + bitField0_ |= 0x00000001; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AggregationResult.Frequency) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AggregationResult.Frequency) + private static final com.google.cloud.migrationcenter.v1.AggregationResult.Frequency + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AggregationResult.Frequency(); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult.Frequency + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Frequency parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Frequency + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int resultCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object result_; + + public enum ResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + COUNT(2), + SUM(3), + HISTOGRAM(4), + FREQUENCY(5), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 2: + return COUNT; + case 3: + return SUM; + case 4: + return HISTOGRAM; + case 5: + return FREQUENCY; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public static final int FIELD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object field_ = ""; + /** + * string field = 1; + * + * @return The field. + */ + @java.lang.Override + public java.lang.String getField() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } + } + /** + * string field = 1; + * + * @return The bytes for field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COUNT_FIELD_NUMBER = 2; + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; + * + * @return Whether the count field is set. + */ + @java.lang.Override + public boolean hasCount() { + return resultCase_ == 2; + } + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; + * + * @return The count. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Count getCount() { + if (resultCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Count) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Count.getDefaultInstance(); + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.CountOrBuilder getCountOrBuilder() { + if (resultCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Count) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Count.getDefaultInstance(); + } + + public static final int SUM_FIELD_NUMBER = 3; + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; + * + * @return Whether the sum field is set. + */ + @java.lang.Override + public boolean hasSum() { + return resultCase_ == 3; + } + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; + * + * @return The sum. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Sum getSum() { + if (resultCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Sum) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Sum.getDefaultInstance(); + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.SumOrBuilder getSumOrBuilder() { + if (resultCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Sum) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Sum.getDefaultInstance(); + } + + public static final int HISTOGRAM_FIELD_NUMBER = 4; + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; + * + * @return Whether the histogram field is set. + */ + @java.lang.Override + public boolean hasHistogram() { + return resultCase_ == 4; + } + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; + * + * @return The histogram. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram getHistogram() { + if (resultCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Histogram) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.getDefaultInstance(); + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.HistogramOrBuilder + getHistogramOrBuilder() { + if (resultCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Histogram) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.getDefaultInstance(); + } + + public static final int FREQUENCY_FIELD_NUMBER = 5; + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; + * + * @return Whether the frequency field is set. + */ + @java.lang.Override + public boolean hasFrequency() { + return resultCase_ == 5; + } + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; + * + * @return The frequency. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Frequency getFrequency() { + if (resultCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Frequency) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.getDefaultInstance(); + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.FrequencyOrBuilder + getFrequencyOrBuilder() { + if (resultCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Frequency) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); + } + if (resultCase_ == 2) { + output.writeMessage(2, (com.google.cloud.migrationcenter.v1.AggregationResult.Count) result_); + } + if (resultCase_ == 3) { + output.writeMessage(3, (com.google.cloud.migrationcenter.v1.AggregationResult.Sum) result_); + } + if (resultCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.migrationcenter.v1.AggregationResult.Histogram) result_); + } + if (resultCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.migrationcenter.v1.AggregationResult.Frequency) result_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); + } + if (resultCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.migrationcenter.v1.AggregationResult.Count) result_); + } + if (resultCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.migrationcenter.v1.AggregationResult.Sum) result_); + } + if (resultCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.migrationcenter.v1.AggregationResult.Histogram) result_); + } + if (resultCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.migrationcenter.v1.AggregationResult.Frequency) result_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AggregationResult)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AggregationResult other = + (com.google.cloud.migrationcenter.v1.AggregationResult) obj; + + if (!getField().equals(other.getField())) return false; + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 2: + if (!getCount().equals(other.getCount())) return false; + break; + case 3: + if (!getSum().equals(other.getSum())) return false; + break; + case 4: + if (!getHistogram().equals(other.getHistogram())) return false; + break; + case 5: + if (!getFrequency().equals(other.getFrequency())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + switch (resultCase_) { + case 2: + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCount().hashCode(); + break; + case 3: + hash = (37 * hash) + SUM_FIELD_NUMBER; + hash = (53 * hash) + getSum().hashCode(); + break; + case 4: + hash = (37 * hash) + HISTOGRAM_FIELD_NUMBER; + hash = (53 * hash) + getHistogram().hashCode(); + break; + case 5: + hash = (37 * hash) + FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + getFrequency().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AggregationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message describing a result of an aggregation.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AggregationResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AggregationResult) + com.google.cloud.migrationcenter.v1.AggregationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AggregationResult.class, + com.google.cloud.migrationcenter.v1.AggregationResult.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.AggregationResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + field_ = ""; + if (countBuilder_ != null) { + countBuilder_.clear(); + } + if (sumBuilder_ != null) { + sumBuilder_.clear(); + } + if (histogramBuilder_ != null) { + histogramBuilder_.clear(); + } + if (frequencyBuilder_ != null) { + frequencyBuilder_.clear(); + } + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AggregationResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AggregationResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult build() { + com.google.cloud.migrationcenter.v1.AggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult buildPartial() { + com.google.cloud.migrationcenter.v1.AggregationResult result = + new com.google.cloud.migrationcenter.v1.AggregationResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.AggregationResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.field_ = field_; + } + } + + private void buildPartialOneofs(com.google.cloud.migrationcenter.v1.AggregationResult result) { + result.resultCase_ = resultCase_; + result.result_ = this.result_; + if (resultCase_ == 2 && countBuilder_ != null) { + result.result_ = countBuilder_.build(); + } + if (resultCase_ == 3 && sumBuilder_ != null) { + result.result_ = sumBuilder_.build(); + } + if (resultCase_ == 4 && histogramBuilder_ != null) { + result.result_ = histogramBuilder_.build(); + } + if (resultCase_ == 5 && frequencyBuilder_ != null) { + result.result_ = frequencyBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AggregationResult) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AggregationResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.AggregationResult other) { + if (other == com.google.cloud.migrationcenter.v1.AggregationResult.getDefaultInstance()) + return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getResultCase()) { + case COUNT: + { + mergeCount(other.getCount()); + break; + } + case SUM: + { + mergeSum(other.getSum()); + break; + } + case HISTOGRAM: + { + mergeHistogram(other.getHistogram()); + break; + } + case FREQUENCY: + { + mergeFrequency(other.getFrequency()); + break; + } + case RESULT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + field_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCountFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getSumFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getHistogramFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getFrequencyFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int resultCase_ = 0; + private java.lang.Object result_; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object field_ = ""; + /** + * string field = 1; + * + * @return The field. + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string field = 1; + * + * @return The bytes for field. + */ + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string field = 1; + * + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string field = 1; + * + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = getDefaultInstance().getField(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string field = 1; + * + * @param value The bytes for field to set. + * @return This builder for chaining. + */ + public Builder setFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Count, + com.google.cloud.migrationcenter.v1.AggregationResult.Count.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.CountOrBuilder> + countBuilder_; + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; + * + * @return Whether the count field is set. + */ + @java.lang.Override + public boolean hasCount() { + return resultCase_ == 2; + } + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; + * + * @return The count. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Count getCount() { + if (countBuilder_ == null) { + if (resultCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Count) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Count.getDefaultInstance(); + } else { + if (resultCase_ == 2) { + return countBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Count.getDefaultInstance(); + } + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; */ + public Builder setCount(com.google.cloud.migrationcenter.v1.AggregationResult.Count value) { + if (countBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + countBuilder_.setMessage(value); + } + resultCase_ = 2; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; */ + public Builder setCount( + com.google.cloud.migrationcenter.v1.AggregationResult.Count.Builder builderForValue) { + if (countBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + countBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 2; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; */ + public Builder mergeCount(com.google.cloud.migrationcenter.v1.AggregationResult.Count value) { + if (countBuilder_ == null) { + if (resultCase_ == 2 + && result_ + != com.google.cloud.migrationcenter.v1.AggregationResult.Count + .getDefaultInstance()) { + result_ = + com.google.cloud.migrationcenter.v1.AggregationResult.Count.newBuilder( + (com.google.cloud.migrationcenter.v1.AggregationResult.Count) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 2) { + countBuilder_.mergeFrom(value); + } else { + countBuilder_.setMessage(value); + } + } + resultCase_ = 2; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; */ + public Builder clearCount() { + if (countBuilder_ == null) { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + } + countBuilder_.clear(); + } + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Count.Builder getCountBuilder() { + return getCountFieldBuilder().getBuilder(); + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.CountOrBuilder + getCountOrBuilder() { + if ((resultCase_ == 2) && (countBuilder_ != null)) { + return countBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Count) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Count.getDefaultInstance(); + } + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Count, + com.google.cloud.migrationcenter.v1.AggregationResult.Count.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.CountOrBuilder> + getCountFieldBuilder() { + if (countBuilder_ == null) { + if (!(resultCase_ == 2)) { + result_ = + com.google.cloud.migrationcenter.v1.AggregationResult.Count.getDefaultInstance(); + } + countBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Count, + com.google.cloud.migrationcenter.v1.AggregationResult.Count.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.CountOrBuilder>( + (com.google.cloud.migrationcenter.v1.AggregationResult.Count) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 2; + onChanged(); + return countBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Sum, + com.google.cloud.migrationcenter.v1.AggregationResult.Sum.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.SumOrBuilder> + sumBuilder_; + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; + * + * @return Whether the sum field is set. + */ + @java.lang.Override + public boolean hasSum() { + return resultCase_ == 3; + } + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; + * + * @return The sum. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Sum getSum() { + if (sumBuilder_ == null) { + if (resultCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Sum) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Sum.getDefaultInstance(); + } else { + if (resultCase_ == 3) { + return sumBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Sum.getDefaultInstance(); + } + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; */ + public Builder setSum(com.google.cloud.migrationcenter.v1.AggregationResult.Sum value) { + if (sumBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + sumBuilder_.setMessage(value); + } + resultCase_ = 3; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; */ + public Builder setSum( + com.google.cloud.migrationcenter.v1.AggregationResult.Sum.Builder builderForValue) { + if (sumBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + sumBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 3; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; */ + public Builder mergeSum(com.google.cloud.migrationcenter.v1.AggregationResult.Sum value) { + if (sumBuilder_ == null) { + if (resultCase_ == 3 + && result_ + != com.google.cloud.migrationcenter.v1.AggregationResult.Sum.getDefaultInstance()) { + result_ = + com.google.cloud.migrationcenter.v1.AggregationResult.Sum.newBuilder( + (com.google.cloud.migrationcenter.v1.AggregationResult.Sum) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 3) { + sumBuilder_.mergeFrom(value); + } else { + sumBuilder_.setMessage(value); + } + } + resultCase_ = 3; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; */ + public Builder clearSum() { + if (sumBuilder_ == null) { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + } + sumBuilder_.clear(); + } + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Sum.Builder getSumBuilder() { + return getSumFieldBuilder().getBuilder(); + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.SumOrBuilder getSumOrBuilder() { + if ((resultCase_ == 3) && (sumBuilder_ != null)) { + return sumBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Sum) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Sum.getDefaultInstance(); + } + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Sum, + com.google.cloud.migrationcenter.v1.AggregationResult.Sum.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.SumOrBuilder> + getSumFieldBuilder() { + if (sumBuilder_ == null) { + if (!(resultCase_ == 3)) { + result_ = com.google.cloud.migrationcenter.v1.AggregationResult.Sum.getDefaultInstance(); + } + sumBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Sum, + com.google.cloud.migrationcenter.v1.AggregationResult.Sum.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.SumOrBuilder>( + (com.google.cloud.migrationcenter.v1.AggregationResult.Sum) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 3; + onChanged(); + return sumBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.HistogramOrBuilder> + histogramBuilder_; + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; + * + * @return Whether the histogram field is set. + */ + @java.lang.Override + public boolean hasHistogram() { + return resultCase_ == 4; + } + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; + * + * @return The histogram. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram getHistogram() { + if (histogramBuilder_ == null) { + if (resultCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Histogram) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.getDefaultInstance(); + } else { + if (resultCase_ == 4) { + return histogramBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.getDefaultInstance(); + } + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; */ + public Builder setHistogram( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram value) { + if (histogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + histogramBuilder_.setMessage(value); + } + resultCase_ = 4; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; */ + public Builder setHistogram( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Builder builderForValue) { + if (histogramBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + histogramBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 4; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; */ + public Builder mergeHistogram( + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram value) { + if (histogramBuilder_ == null) { + if (resultCase_ == 4 + && result_ + != com.google.cloud.migrationcenter.v1.AggregationResult.Histogram + .getDefaultInstance()) { + result_ = + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.newBuilder( + (com.google.cloud.migrationcenter.v1.AggregationResult.Histogram) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 4) { + histogramBuilder_.mergeFrom(value); + } else { + histogramBuilder_.setMessage(value); + } + } + resultCase_ = 4; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; */ + public Builder clearHistogram() { + if (histogramBuilder_ == null) { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + } + histogramBuilder_.clear(); + } + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Builder + getHistogramBuilder() { + return getHistogramFieldBuilder().getBuilder(); + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.HistogramOrBuilder + getHistogramOrBuilder() { + if ((resultCase_ == 4) && (histogramBuilder_ != null)) { + return histogramBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Histogram) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.getDefaultInstance(); + } + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.HistogramOrBuilder> + getHistogramFieldBuilder() { + if (histogramBuilder_ == null) { + if (!(resultCase_ == 4)) { + result_ = + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.getDefaultInstance(); + } + histogramBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram, + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.HistogramOrBuilder>( + (com.google.cloud.migrationcenter.v1.AggregationResult.Histogram) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 4; + onChanged(); + return histogramBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency, + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.FrequencyOrBuilder> + frequencyBuilder_; + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; + * + * @return Whether the frequency field is set. + */ + @java.lang.Override + public boolean hasFrequency() { + return resultCase_ == 5; + } + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; + * + * @return The frequency. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.Frequency getFrequency() { + if (frequencyBuilder_ == null) { + if (resultCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Frequency) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.getDefaultInstance(); + } else { + if (resultCase_ == 5) { + return frequencyBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.getDefaultInstance(); + } + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; */ + public Builder setFrequency( + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency value) { + if (frequencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + frequencyBuilder_.setMessage(value); + } + resultCase_ = 5; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; */ + public Builder setFrequency( + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.Builder builderForValue) { + if (frequencyBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + frequencyBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 5; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; */ + public Builder mergeFrequency( + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency value) { + if (frequencyBuilder_ == null) { + if (resultCase_ == 5 + && result_ + != com.google.cloud.migrationcenter.v1.AggregationResult.Frequency + .getDefaultInstance()) { + result_ = + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.newBuilder( + (com.google.cloud.migrationcenter.v1.AggregationResult.Frequency) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 5) { + frequencyBuilder_.mergeFrom(value); + } else { + frequencyBuilder_.setMessage(value); + } + } + resultCase_ = 5; + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; */ + public Builder clearFrequency() { + if (frequencyBuilder_ == null) { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + } + frequencyBuilder_.clear(); + } + return this; + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; */ + public com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.Builder + getFrequencyBuilder() { + return getFrequencyFieldBuilder().getBuilder(); + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult.FrequencyOrBuilder + getFrequencyOrBuilder() { + if ((resultCase_ == 5) && (frequencyBuilder_ != null)) { + return frequencyBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.AggregationResult.Frequency) result_; + } + return com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.getDefaultInstance(); + } + } + /** .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency, + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.FrequencyOrBuilder> + getFrequencyFieldBuilder() { + if (frequencyBuilder_ == null) { + if (!(resultCase_ == 5)) { + result_ = + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.getDefaultInstance(); + } + frequencyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency, + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency.Builder, + com.google.cloud.migrationcenter.v1.AggregationResult.FrequencyOrBuilder>( + (com.google.cloud.migrationcenter.v1.AggregationResult.Frequency) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 5; + onChanged(); + return frequencyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AggregationResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AggregationResult) + private static final com.google.cloud.migrationcenter.v1.AggregationResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AggregationResult(); + } + + public static com.google.cloud.migrationcenter.v1.AggregationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AggregationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AggregationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationResultOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationResultOrBuilder.java new file mode 100644 index 000000000000..f6285ee202c7 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AggregationResultOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface AggregationResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AggregationResult) + com.google.protobuf.MessageOrBuilder { + + /** + * string field = 1; + * + * @return The field. + */ + java.lang.String getField(); + /** + * string field = 1; + * + * @return The bytes for field. + */ + com.google.protobuf.ByteString getFieldBytes(); + + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; + * + * @return Whether the count field is set. + */ + boolean hasCount(); + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; + * + * @return The count. + */ + com.google.cloud.migrationcenter.v1.AggregationResult.Count getCount(); + /** .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; */ + com.google.cloud.migrationcenter.v1.AggregationResult.CountOrBuilder getCountOrBuilder(); + + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; + * + * @return Whether the sum field is set. + */ + boolean hasSum(); + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; + * + * @return The sum. + */ + com.google.cloud.migrationcenter.v1.AggregationResult.Sum getSum(); + /** .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; */ + com.google.cloud.migrationcenter.v1.AggregationResult.SumOrBuilder getSumOrBuilder(); + + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; + * + * @return Whether the histogram field is set. + */ + boolean hasHistogram(); + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; + * + * @return The histogram. + */ + com.google.cloud.migrationcenter.v1.AggregationResult.Histogram getHistogram(); + /** .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; */ + com.google.cloud.migrationcenter.v1.AggregationResult.HistogramOrBuilder getHistogramOrBuilder(); + + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; + * + * @return Whether the frequency field is set. + */ + boolean hasFrequency(); + /** + * .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; + * + * @return The frequency. + */ + com.google.cloud.migrationcenter.v1.AggregationResult.Frequency getFrequency(); + /** .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; */ + com.google.cloud.migrationcenter.v1.AggregationResult.FrequencyOrBuilder getFrequencyOrBuilder(); + + com.google.cloud.migrationcenter.v1.AggregationResult.ResultCase getResultCase(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Asset.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Asset.java new file mode 100644 index 000000000000..e926ed0ec7bb --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Asset.java @@ -0,0 +1,3435 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * An asset represents a resource in your environment. Asset types include
+ * virtual machines and databases.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Asset} + */ +public final class Asset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Asset) + AssetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Asset.newBuilder() to construct. + private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Asset() { + name_ = ""; + sources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + assignedGroups_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Asset(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Asset_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 5: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Asset.class, + com.google.cloud.migrationcenter.v1.Asset.Builder.class); + } + + private int assetDetailsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object assetDetails_; + + public enum AssetDetailsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MACHINE_DETAILS(6), + ASSETDETAILS_NOT_SET(0); + private final int value; + + private AssetDetailsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AssetDetailsCase valueOf(int value) { + return forNumber(value); + } + + public static AssetDetailsCase forNumber(int value) { + switch (value) { + case 6: + return MACHINE_DETAILS; + case 0: + return ASSETDETAILS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AssetDetailsCase getAssetDetailsCase() { + return AssetDetailsCase.forNumber(assetDetailsCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The full name of the asset.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The full name of the asset.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp when the asset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the asset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the asset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The timestamp when the asset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the asset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the asset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Asset_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 5; + + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Asset_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 5; + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 5; + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 5; + */ + @java.lang.Override + public java.lang.String getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MACHINE_DETAILS_FIELD_NUMBER = 6; + /** + * + * + *
+   * Output only. Asset information specific for virtual and physical
+   * machines.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the machineDetails field is set. + */ + @java.lang.Override + public boolean hasMachineDetails() { + return assetDetailsCase_ == 6; + } + /** + * + * + *
+   * Output only. Asset information specific for virtual and physical
+   * machines.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The machineDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetails getMachineDetails() { + if (assetDetailsCase_ == 6) { + return (com.google.cloud.migrationcenter.v1.MachineDetails) assetDetails_; + } + return com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Asset information specific for virtual and physical
+   * machines.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder getMachineDetailsOrBuilder() { + if (assetDetailsCase_ == 6) { + return (com.google.cloud.migrationcenter.v1.MachineDetails) assetDetails_; + } + return com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } + + public static final int INSIGHT_LIST_FIELD_NUMBER = 20; + private com.google.cloud.migrationcenter.v1.InsightList insightList_; + /** + * + * + *
+   * Output only. The list of insights associated with the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the insightList field is set. + */ + @java.lang.Override + public boolean hasInsightList() { + return insightList_ != null; + } + /** + * + * + *
+   * Output only. The list of insights associated with the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The insightList. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.InsightList getInsightList() { + return insightList_ == null + ? com.google.cloud.migrationcenter.v1.InsightList.getDefaultInstance() + : insightList_; + } + /** + * + * + *
+   * Output only. The list of insights associated with the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.InsightListOrBuilder getInsightListOrBuilder() { + return insightList_ == null + ? com.google.cloud.migrationcenter.v1.InsightList.getDefaultInstance() + : insightList_; + } + + public static final int PERFORMANCE_DATA_FIELD_NUMBER = 21; + private com.google.cloud.migrationcenter.v1.AssetPerformanceData performanceData_; + /** + * + * + *
+   * Output only. Performance data for the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the performanceData field is set. + */ + @java.lang.Override + public boolean hasPerformanceData() { + return performanceData_ != null; + } + /** + * + * + *
+   * Output only. Performance data for the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The performanceData. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetPerformanceData getPerformanceData() { + return performanceData_ == null + ? com.google.cloud.migrationcenter.v1.AssetPerformanceData.getDefaultInstance() + : performanceData_; + } + /** + * + * + *
+   * Output only. Performance data for the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetPerformanceDataOrBuilder + getPerformanceDataOrBuilder() { + return performanceData_ == null + ? com.google.cloud.migrationcenter.v1.AssetPerformanceData.getDefaultInstance() + : performanceData_; + } + + public static final int SOURCES_FIELD_NUMBER = 22; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList sources_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. The list of sources contributing to the asset.
+   * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the sources. + */ + public com.google.protobuf.ProtocolStringList getSourcesList() { + return sources_; + } + /** + * + * + *
+   * Output only. The list of sources contributing to the asset.
+   * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of sources. + */ + public int getSourcesCount() { + return sources_.size(); + } + /** + * + * + *
+   * Output only. The list of sources contributing to the asset.
+   * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The sources at the given index. + */ + public java.lang.String getSources(int index) { + return sources_.get(index); + } + /** + * + * + *
+   * Output only. The list of sources contributing to the asset.
+   * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the sources at the given index. + */ + public com.google.protobuf.ByteString getSourcesBytes(int index) { + return sources_.getByteString(index); + } + + public static final int ASSIGNED_GROUPS_FIELD_NUMBER = 23; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList assignedGroups_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. The list of groups that the asset is assigned to.
+   * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the assignedGroups. + */ + public com.google.protobuf.ProtocolStringList getAssignedGroupsList() { + return assignedGroups_; + } + /** + * + * + *
+   * Output only. The list of groups that the asset is assigned to.
+   * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of assignedGroups. + */ + public int getAssignedGroupsCount() { + return assignedGroups_.size(); + } + /** + * + * + *
+   * Output only. The list of groups that the asset is assigned to.
+   * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The assignedGroups at the given index. + */ + public java.lang.String getAssignedGroups(int index) { + return assignedGroups_.get(index); + } + /** + * + * + *
+   * Output only. The list of groups that the asset is assigned to.
+   * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the assignedGroups at the given index. + */ + public com.google.protobuf.ByteString getAssignedGroupsBytes(int index) { + return assignedGroups_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 5); + if (assetDetailsCase_ == 6) { + output.writeMessage(6, (com.google.cloud.migrationcenter.v1.MachineDetails) assetDetails_); + } + if (insightList_ != null) { + output.writeMessage(20, getInsightList()); + } + if (performanceData_ != null) { + output.writeMessage(21, getPerformanceData()); + } + for (int i = 0; i < sources_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 22, sources_.getRaw(i)); + } + for (int i = 0; i < assignedGroups_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 23, assignedGroups_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + for (java.util.Map.Entry entry : + internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry attributes__ = + AttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, attributes__); + } + if (assetDetailsCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.migrationcenter.v1.MachineDetails) assetDetails_); + } + if (insightList_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getInsightList()); + } + if (performanceData_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getPerformanceData()); + } + { + int dataSize = 0; + for (int i = 0; i < sources_.size(); i++) { + dataSize += computeStringSizeNoTag(sources_.getRaw(i)); + } + size += dataSize; + size += 2 * getSourcesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < assignedGroups_.size(); i++) { + dataSize += computeStringSizeNoTag(assignedGroups_.getRaw(i)); + } + size += dataSize; + size += 2 * getAssignedGroupsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Asset)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Asset other = + (com.google.cloud.migrationcenter.v1.Asset) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; + if (hasInsightList() != other.hasInsightList()) return false; + if (hasInsightList()) { + if (!getInsightList().equals(other.getInsightList())) return false; + } + if (hasPerformanceData() != other.hasPerformanceData()) return false; + if (hasPerformanceData()) { + if (!getPerformanceData().equals(other.getPerformanceData())) return false; + } + if (!getSourcesList().equals(other.getSourcesList())) return false; + if (!getAssignedGroupsList().equals(other.getAssignedGroupsList())) return false; + if (!getAssetDetailsCase().equals(other.getAssetDetailsCase())) return false; + switch (assetDetailsCase_) { + case 6: + if (!getMachineDetails().equals(other.getMachineDetails())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + if (hasInsightList()) { + hash = (37 * hash) + INSIGHT_LIST_FIELD_NUMBER; + hash = (53 * hash) + getInsightList().hashCode(); + } + if (hasPerformanceData()) { + hash = (37 * hash) + PERFORMANCE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getPerformanceData().hashCode(); + } + if (getSourcesCount() > 0) { + hash = (37 * hash) + SOURCES_FIELD_NUMBER; + hash = (53 * hash) + getSourcesList().hashCode(); + } + if (getAssignedGroupsCount() > 0) { + hash = (37 * hash) + ASSIGNED_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getAssignedGroupsList().hashCode(); + } + switch (assetDetailsCase_) { + case 6: + hash = (37 * hash) + MACHINE_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getMachineDetails().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Asset parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Asset parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Asset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Asset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Asset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Asset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Asset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Asset parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Asset parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Asset parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Asset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Asset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.Asset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An asset represents a resource in your environment. Asset types include
+   * virtual machines and databases.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Asset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Asset) + com.google.cloud.migrationcenter.v1.AssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Asset_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 5: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 5: + return internalGetMutableAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Asset.class, + com.google.cloud.migrationcenter.v1.Asset.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Asset.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + internalGetMutableAttributes().clear(); + if (machineDetailsBuilder_ != null) { + machineDetailsBuilder_.clear(); + } + insightList_ = null; + if (insightListBuilder_ != null) { + insightListBuilder_.dispose(); + insightListBuilder_ = null; + } + performanceData_ = null; + if (performanceDataBuilder_ != null) { + performanceDataBuilder_.dispose(); + performanceDataBuilder_ = null; + } + sources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + assignedGroups_ = com.google.protobuf.LazyStringArrayList.emptyList(); + assetDetailsCase_ = 0; + assetDetails_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Asset_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Asset getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Asset build() { + com.google.cloud.migrationcenter.v1.Asset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Asset buildPartial() { + com.google.cloud.migrationcenter.v1.Asset result = + new com.google.cloud.migrationcenter.v1.Asset(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.Asset result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.attributes_ = internalGetAttributes(); + result.attributes_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.insightList_ = + insightListBuilder_ == null ? insightList_ : insightListBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.performanceData_ = + performanceDataBuilder_ == null ? performanceData_ : performanceDataBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + sources_.makeImmutable(); + result.sources_ = sources_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + assignedGroups_.makeImmutable(); + result.assignedGroups_ = assignedGroups_; + } + } + + private void buildPartialOneofs(com.google.cloud.migrationcenter.v1.Asset result) { + result.assetDetailsCase_ = assetDetailsCase_; + result.assetDetails_ = this.assetDetails_; + if (assetDetailsCase_ == 6 && machineDetailsBuilder_ != null) { + result.assetDetails_ = machineDetailsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Asset) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Asset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Asset other) { + if (other == com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + bitField0_ |= 0x00000010; + if (other.hasInsightList()) { + mergeInsightList(other.getInsightList()); + } + if (other.hasPerformanceData()) { + mergePerformanceData(other.getPerformanceData()); + } + if (!other.sources_.isEmpty()) { + if (sources_.isEmpty()) { + sources_ = other.sources_; + bitField0_ |= 0x00000100; + } else { + ensureSourcesIsMutable(); + sources_.addAll(other.sources_); + } + onChanged(); + } + if (!other.assignedGroups_.isEmpty()) { + if (assignedGroups_.isEmpty()) { + assignedGroups_ = other.assignedGroups_; + bitField0_ |= 0x00000200; + } else { + ensureAssignedGroupsIsMutable(); + assignedGroups_.addAll(other.assignedGroups_); + } + onChanged(); + } + switch (other.getAssetDetailsCase()) { + case MACHINE_DETAILS: + { + mergeMachineDetails(other.getMachineDetails()); + break; + } + case ASSETDETAILS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getMachineDetailsFieldBuilder().getBuilder(), extensionRegistry); + assetDetailsCase_ = 6; + break; + } // case 50 + case 162: + { + input.readMessage(getInsightListFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 162 + case 170: + { + input.readMessage(getPerformanceDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 170 + case 178: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourcesIsMutable(); + sources_.add(s); + break; + } // case 178 + case 186: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssignedGroupsIsMutable(); + assignedGroups_.add(s); + break; + } // case 186 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int assetDetailsCase_ = 0; + private java.lang.Object assetDetails_; + + public AssetDetailsCase getAssetDetailsCase() { + return AssetDetailsCase.forNumber(assetDetailsCase_); + } + + public Builder clearAssetDetails() { + assetDetailsCase_ = 0; + assetDetails_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The full name of the asset.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The full name of the asset.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The full name of the asset.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The full name of the asset.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The full name of the asset.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the asset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the asset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the asset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the asset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the asset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the asset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the asset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the asset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the asset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the asset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the asset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the asset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the asset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the asset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the asset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the asset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the asset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the asset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + private com.google.protobuf.MapField + internalGetMutableAttributes() { + if (attributes_ == null) { + attributes_ = + com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); + } + if (!attributes_.isMutable()) { + attributes_ = attributes_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 5; + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 5; + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 5; + */ + @java.lang.Override + public java.lang.String getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttributes() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAttributes().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 5; + */ + public Builder removeAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAttributes().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAttributes() { + bitField0_ |= 0x00000010; + return internalGetMutableAttributes().getMutableMap(); + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 5; + */ + public Builder putAttributes(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAttributes().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 5; + */ + public Builder putAllAttributes(java.util.Map values) { + internalGetMutableAttributes().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineDetails, + com.google.cloud.migrationcenter.v1.MachineDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder> + machineDetailsBuilder_; + /** + * + * + *
+     * Output only. Asset information specific for virtual and physical
+     * machines.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the machineDetails field is set. + */ + @java.lang.Override + public boolean hasMachineDetails() { + return assetDetailsCase_ == 6; + } + /** + * + * + *
+     * Output only. Asset information specific for virtual and physical
+     * machines.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The machineDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetails getMachineDetails() { + if (machineDetailsBuilder_ == null) { + if (assetDetailsCase_ == 6) { + return (com.google.cloud.migrationcenter.v1.MachineDetails) assetDetails_; + } + return com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } else { + if (assetDetailsCase_ == 6) { + return machineDetailsBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Asset information specific for virtual and physical
+     * machines.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMachineDetails(com.google.cloud.migrationcenter.v1.MachineDetails value) { + if (machineDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + assetDetails_ = value; + onChanged(); + } else { + machineDetailsBuilder_.setMessage(value); + } + assetDetailsCase_ = 6; + return this; + } + /** + * + * + *
+     * Output only. Asset information specific for virtual and physical
+     * machines.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMachineDetails( + com.google.cloud.migrationcenter.v1.MachineDetails.Builder builderForValue) { + if (machineDetailsBuilder_ == null) { + assetDetails_ = builderForValue.build(); + onChanged(); + } else { + machineDetailsBuilder_.setMessage(builderForValue.build()); + } + assetDetailsCase_ = 6; + return this; + } + /** + * + * + *
+     * Output only. Asset information specific for virtual and physical
+     * machines.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMachineDetails(com.google.cloud.migrationcenter.v1.MachineDetails value) { + if (machineDetailsBuilder_ == null) { + if (assetDetailsCase_ == 6 + && assetDetails_ + != com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance()) { + assetDetails_ = + com.google.cloud.migrationcenter.v1.MachineDetails.newBuilder( + (com.google.cloud.migrationcenter.v1.MachineDetails) assetDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + assetDetails_ = value; + } + onChanged(); + } else { + if (assetDetailsCase_ == 6) { + machineDetailsBuilder_.mergeFrom(value); + } else { + machineDetailsBuilder_.setMessage(value); + } + } + assetDetailsCase_ = 6; + return this; + } + /** + * + * + *
+     * Output only. Asset information specific for virtual and physical
+     * machines.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMachineDetails() { + if (machineDetailsBuilder_ == null) { + if (assetDetailsCase_ == 6) { + assetDetailsCase_ = 0; + assetDetails_ = null; + onChanged(); + } + } else { + if (assetDetailsCase_ == 6) { + assetDetailsCase_ = 0; + assetDetails_ = null; + } + machineDetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Asset information specific for virtual and physical
+     * machines.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.MachineDetails.Builder getMachineDetailsBuilder() { + return getMachineDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Asset information specific for virtual and physical
+     * machines.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder + getMachineDetailsOrBuilder() { + if ((assetDetailsCase_ == 6) && (machineDetailsBuilder_ != null)) { + return machineDetailsBuilder_.getMessageOrBuilder(); + } else { + if (assetDetailsCase_ == 6) { + return (com.google.cloud.migrationcenter.v1.MachineDetails) assetDetails_; + } + return com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Asset information specific for virtual and physical
+     * machines.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineDetails, + com.google.cloud.migrationcenter.v1.MachineDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder> + getMachineDetailsFieldBuilder() { + if (machineDetailsBuilder_ == null) { + if (!(assetDetailsCase_ == 6)) { + assetDetails_ = com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } + machineDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineDetails, + com.google.cloud.migrationcenter.v1.MachineDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder>( + (com.google.cloud.migrationcenter.v1.MachineDetails) assetDetails_, + getParentForChildren(), + isClean()); + assetDetails_ = null; + } + assetDetailsCase_ = 6; + onChanged(); + return machineDetailsBuilder_; + } + + private com.google.cloud.migrationcenter.v1.InsightList insightList_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.InsightList, + com.google.cloud.migrationcenter.v1.InsightList.Builder, + com.google.cloud.migrationcenter.v1.InsightListOrBuilder> + insightListBuilder_; + /** + * + * + *
+     * Output only. The list of insights associated with the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the insightList field is set. + */ + public boolean hasInsightList() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. The list of insights associated with the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The insightList. + */ + public com.google.cloud.migrationcenter.v1.InsightList getInsightList() { + if (insightListBuilder_ == null) { + return insightList_ == null + ? com.google.cloud.migrationcenter.v1.InsightList.getDefaultInstance() + : insightList_; + } else { + return insightListBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The list of insights associated with the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInsightList(com.google.cloud.migrationcenter.v1.InsightList value) { + if (insightListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + insightList_ = value; + } else { + insightListBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of insights associated with the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInsightList( + com.google.cloud.migrationcenter.v1.InsightList.Builder builderForValue) { + if (insightListBuilder_ == null) { + insightList_ = builderForValue.build(); + } else { + insightListBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of insights associated with the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeInsightList(com.google.cloud.migrationcenter.v1.InsightList value) { + if (insightListBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && insightList_ != null + && insightList_ + != com.google.cloud.migrationcenter.v1.InsightList.getDefaultInstance()) { + getInsightListBuilder().mergeFrom(value); + } else { + insightList_ = value; + } + } else { + insightListBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of insights associated with the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearInsightList() { + bitField0_ = (bitField0_ & ~0x00000040); + insightList_ = null; + if (insightListBuilder_ != null) { + insightListBuilder_.dispose(); + insightListBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of insights associated with the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.InsightList.Builder getInsightListBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getInsightListFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The list of insights associated with the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.InsightListOrBuilder getInsightListOrBuilder() { + if (insightListBuilder_ != null) { + return insightListBuilder_.getMessageOrBuilder(); + } else { + return insightList_ == null + ? com.google.cloud.migrationcenter.v1.InsightList.getDefaultInstance() + : insightList_; + } + } + /** + * + * + *
+     * Output only. The list of insights associated with the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.InsightList, + com.google.cloud.migrationcenter.v1.InsightList.Builder, + com.google.cloud.migrationcenter.v1.InsightListOrBuilder> + getInsightListFieldBuilder() { + if (insightListBuilder_ == null) { + insightListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.InsightList, + com.google.cloud.migrationcenter.v1.InsightList.Builder, + com.google.cloud.migrationcenter.v1.InsightListOrBuilder>( + getInsightList(), getParentForChildren(), isClean()); + insightList_ = null; + } + return insightListBuilder_; + } + + private com.google.cloud.migrationcenter.v1.AssetPerformanceData performanceData_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetPerformanceData, + com.google.cloud.migrationcenter.v1.AssetPerformanceData.Builder, + com.google.cloud.migrationcenter.v1.AssetPerformanceDataOrBuilder> + performanceDataBuilder_; + /** + * + * + *
+     * Output only. Performance data for the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the performanceData field is set. + */ + public boolean hasPerformanceData() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Performance data for the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The performanceData. + */ + public com.google.cloud.migrationcenter.v1.AssetPerformanceData getPerformanceData() { + if (performanceDataBuilder_ == null) { + return performanceData_ == null + ? com.google.cloud.migrationcenter.v1.AssetPerformanceData.getDefaultInstance() + : performanceData_; + } else { + return performanceDataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Performance data for the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPerformanceData( + com.google.cloud.migrationcenter.v1.AssetPerformanceData value) { + if (performanceDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + performanceData_ = value; + } else { + performanceDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Performance data for the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPerformanceData( + com.google.cloud.migrationcenter.v1.AssetPerformanceData.Builder builderForValue) { + if (performanceDataBuilder_ == null) { + performanceData_ = builderForValue.build(); + } else { + performanceDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Performance data for the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePerformanceData( + com.google.cloud.migrationcenter.v1.AssetPerformanceData value) { + if (performanceDataBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && performanceData_ != null + && performanceData_ + != com.google.cloud.migrationcenter.v1.AssetPerformanceData.getDefaultInstance()) { + getPerformanceDataBuilder().mergeFrom(value); + } else { + performanceData_ = value; + } + } else { + performanceDataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Performance data for the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPerformanceData() { + bitField0_ = (bitField0_ & ~0x00000080); + performanceData_ = null; + if (performanceDataBuilder_ != null) { + performanceDataBuilder_.dispose(); + performanceDataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Performance data for the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.AssetPerformanceData.Builder + getPerformanceDataBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getPerformanceDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Performance data for the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.AssetPerformanceDataOrBuilder + getPerformanceDataOrBuilder() { + if (performanceDataBuilder_ != null) { + return performanceDataBuilder_.getMessageOrBuilder(); + } else { + return performanceData_ == null + ? com.google.cloud.migrationcenter.v1.AssetPerformanceData.getDefaultInstance() + : performanceData_; + } + } + /** + * + * + *
+     * Output only. Performance data for the asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetPerformanceData, + com.google.cloud.migrationcenter.v1.AssetPerformanceData.Builder, + com.google.cloud.migrationcenter.v1.AssetPerformanceDataOrBuilder> + getPerformanceDataFieldBuilder() { + if (performanceDataBuilder_ == null) { + performanceDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetPerformanceData, + com.google.cloud.migrationcenter.v1.AssetPerformanceData.Builder, + com.google.cloud.migrationcenter.v1.AssetPerformanceDataOrBuilder>( + getPerformanceData(), getParentForChildren(), isClean()); + performanceData_ = null; + } + return performanceDataBuilder_; + } + + private com.google.protobuf.LazyStringArrayList sources_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSourcesIsMutable() { + if (!sources_.isModifiable()) { + sources_ = new com.google.protobuf.LazyStringArrayList(sources_); + } + bitField0_ |= 0x00000100; + } + /** + * + * + *
+     * Output only. The list of sources contributing to the asset.
+     * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the sources. + */ + public com.google.protobuf.ProtocolStringList getSourcesList() { + sources_.makeImmutable(); + return sources_; + } + /** + * + * + *
+     * Output only. The list of sources contributing to the asset.
+     * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of sources. + */ + public int getSourcesCount() { + return sources_.size(); + } + /** + * + * + *
+     * Output only. The list of sources contributing to the asset.
+     * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The sources at the given index. + */ + public java.lang.String getSources(int index) { + return sources_.get(index); + } + /** + * + * + *
+     * Output only. The list of sources contributing to the asset.
+     * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the sources at the given index. + */ + public com.google.protobuf.ByteString getSourcesBytes(int index) { + return sources_.getByteString(index); + } + /** + * + * + *
+     * Output only. The list of sources contributing to the asset.
+     * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The sources to set. + * @return This builder for chaining. + */ + public Builder setSources(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of sources contributing to the asset.
+     * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The sources to add. + * @return This builder for chaining. + */ + public Builder addSources(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of sources contributing to the asset.
+     * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param values The sources to add. + * @return This builder for chaining. + */ + public Builder addAllSources(java.lang.Iterable values) { + ensureSourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sources_); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of sources contributing to the asset.
+     * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSources() { + sources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of sources contributing to the asset.
+     * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the sources to add. + * @return This builder for chaining. + */ + public Builder addSourcesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSourcesIsMutable(); + sources_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList assignedGroups_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAssignedGroupsIsMutable() { + if (!assignedGroups_.isModifiable()) { + assignedGroups_ = new com.google.protobuf.LazyStringArrayList(assignedGroups_); + } + bitField0_ |= 0x00000200; + } + /** + * + * + *
+     * Output only. The list of groups that the asset is assigned to.
+     * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the assignedGroups. + */ + public com.google.protobuf.ProtocolStringList getAssignedGroupsList() { + assignedGroups_.makeImmutable(); + return assignedGroups_; + } + /** + * + * + *
+     * Output only. The list of groups that the asset is assigned to.
+     * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of assignedGroups. + */ + public int getAssignedGroupsCount() { + return assignedGroups_.size(); + } + /** + * + * + *
+     * Output only. The list of groups that the asset is assigned to.
+     * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The assignedGroups at the given index. + */ + public java.lang.String getAssignedGroups(int index) { + return assignedGroups_.get(index); + } + /** + * + * + *
+     * Output only. The list of groups that the asset is assigned to.
+     * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the assignedGroups at the given index. + */ + public com.google.protobuf.ByteString getAssignedGroupsBytes(int index) { + return assignedGroups_.getByteString(index); + } + /** + * + * + *
+     * Output only. The list of groups that the asset is assigned to.
+     * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The assignedGroups to set. + * @return This builder for chaining. + */ + public Builder setAssignedGroups(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssignedGroupsIsMutable(); + assignedGroups_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of groups that the asset is assigned to.
+     * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The assignedGroups to add. + * @return This builder for chaining. + */ + public Builder addAssignedGroups(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssignedGroupsIsMutable(); + assignedGroups_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of groups that the asset is assigned to.
+     * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param values The assignedGroups to add. + * @return This builder for chaining. + */ + public Builder addAllAssignedGroups(java.lang.Iterable values) { + ensureAssignedGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assignedGroups_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of groups that the asset is assigned to.
+     * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAssignedGroups() { + assignedGroups_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of groups that the asset is assigned to.
+     * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the assignedGroups to add. + * @return This builder for chaining. + */ + public Builder addAssignedGroupsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssignedGroupsIsMutable(); + assignedGroups_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Asset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Asset) + private static final com.google.cloud.migrationcenter.v1.Asset DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Asset(); + } + + public static com.google.cloud.migrationcenter.v1.Asset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Asset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Asset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetFrame.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetFrame.java new file mode 100644 index 000000000000..5642fd48a9d0 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetFrame.java @@ -0,0 +1,2444 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Contains data reported from an inventory source on an asset.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AssetFrame} + */ +public final class AssetFrame extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AssetFrame) + AssetFrameOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssetFrame.newBuilder() to construct. + private AssetFrame(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssetFrame() { + performanceSamples_ = java.util.Collections.emptyList(); + traceToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssetFrame(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetFrame_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetLabels(); + case 12: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AssetFrame.class, + com.google.cloud.migrationcenter.v1.AssetFrame.Builder.class); + } + + private int frameDataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object frameData_; + + public enum FrameDataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MACHINE_DETAILS(1), + FRAMEDATA_NOT_SET(0); + private final int value; + + private FrameDataCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FrameDataCase valueOf(int value) { + return forNumber(value); + } + + public static FrameDataCase forNumber(int value) { + switch (value) { + case 1: + return MACHINE_DETAILS; + case 0: + return FRAMEDATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public FrameDataCase getFrameDataCase() { + return FrameDataCase.forNumber(frameDataCase_); + } + + public static final int MACHINE_DETAILS_FIELD_NUMBER = 1; + /** + * + * + *
+   * Asset information specific for virtual machines.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + * + * @return Whether the machineDetails field is set. + */ + @java.lang.Override + public boolean hasMachineDetails() { + return frameDataCase_ == 1; + } + /** + * + * + *
+   * Asset information specific for virtual machines.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + * + * @return The machineDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetails getMachineDetails() { + if (frameDataCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.MachineDetails) frameData_; + } + return com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } + /** + * + * + *
+   * Asset information specific for virtual machines.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder getMachineDetailsOrBuilder() { + if (frameDataCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.MachineDetails) frameData_; + } + return com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } + + public static final int REPORT_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp reportTime_; + /** + * + * + *
+   * The time the data was reported.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 10; + * + * @return Whether the reportTime field is set. + */ + @java.lang.Override + public boolean hasReportTime() { + return reportTime_ != null; + } + /** + * + * + *
+   * The time the data was reported.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 10; + * + * @return The reportTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReportTime() { + return reportTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : reportTime_; + } + /** + * + * + *
+   * The time the data was reported.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReportTimeOrBuilder() { + return reportTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : reportTime_; + } + + public static final int LABELS_FIELD_NUMBER = 11; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetFrame_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 12; + + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetFrame_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 12; + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 12; + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 12; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 12; + */ + @java.lang.Override + public java.lang.String getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PERFORMANCE_SAMPLES_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private java.util.List performanceSamples_; + /** + * + * + *
+   * Asset performance data samples.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + @java.lang.Override + public java.util.List + getPerformanceSamplesList() { + return performanceSamples_; + } + /** + * + * + *
+   * Asset performance data samples.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + @java.lang.Override + public java.util.List + getPerformanceSamplesOrBuilderList() { + return performanceSamples_; + } + /** + * + * + *
+   * Asset performance data samples.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + @java.lang.Override + public int getPerformanceSamplesCount() { + return performanceSamples_.size(); + } + /** + * + * + *
+   * Asset performance data samples.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PerformanceSample getPerformanceSamples(int index) { + return performanceSamples_.get(index); + } + /** + * + * + *
+   * Asset performance data samples.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PerformanceSampleOrBuilder + getPerformanceSamplesOrBuilder(int index) { + return performanceSamples_.get(index); + } + + public static final int TRACE_TOKEN_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object traceToken_ = ""; + /** + * + * + *
+   * Optional. Trace token is optionally provided to assist with debugging and
+   * traceability.
+   * 
+ * + * string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The traceToken. + */ + @java.lang.Override + public java.lang.String getTraceToken() { + java.lang.Object ref = traceToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + traceToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Trace token is optionally provided to assist with debugging and
+   * traceability.
+   * 
+ * + * string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for traceToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTraceTokenBytes() { + java.lang.Object ref = traceToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (frameDataCase_ == 1) { + output.writeMessage(1, (com.google.cloud.migrationcenter.v1.MachineDetails) frameData_); + } + if (reportTime_ != null) { + output.writeMessage(10, getReportTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 11); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 12); + for (int i = 0; i < performanceSamples_.size(); i++) { + output.writeMessage(13, performanceSamples_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, traceToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (frameDataCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.migrationcenter.v1.MachineDetails) frameData_); + } + if (reportTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getReportTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, labels__); + } + for (java.util.Map.Entry entry : + internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry attributes__ = + AttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, attributes__); + } + for (int i = 0; i < performanceSamples_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(13, performanceSamples_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, traceToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AssetFrame)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AssetFrame other = + (com.google.cloud.migrationcenter.v1.AssetFrame) obj; + + if (hasReportTime() != other.hasReportTime()) return false; + if (hasReportTime()) { + if (!getReportTime().equals(other.getReportTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; + if (!getPerformanceSamplesList().equals(other.getPerformanceSamplesList())) return false; + if (!getTraceToken().equals(other.getTraceToken())) return false; + if (!getFrameDataCase().equals(other.getFrameDataCase())) return false; + switch (frameDataCase_) { + case 1: + if (!getMachineDetails().equals(other.getMachineDetails())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasReportTime()) { + hash = (37 * hash) + REPORT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReportTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + if (getPerformanceSamplesCount() > 0) { + hash = (37 * hash) + PERFORMANCE_SAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getPerformanceSamplesList().hashCode(); + } + hash = (37 * hash) + TRACE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getTraceToken().hashCode(); + switch (frameDataCase_) { + case 1: + hash = (37 * hash) + MACHINE_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getMachineDetails().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.AssetFrame prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Contains data reported from an inventory source on an asset.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AssetFrame} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AssetFrame) + com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetFrame_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetLabels(); + case 12: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 11: + return internalGetMutableLabels(); + case 12: + return internalGetMutableAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AssetFrame.class, + com.google.cloud.migrationcenter.v1.AssetFrame.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.AssetFrame.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (machineDetailsBuilder_ != null) { + machineDetailsBuilder_.clear(); + } + reportTime_ = null; + if (reportTimeBuilder_ != null) { + reportTimeBuilder_.dispose(); + reportTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + internalGetMutableAttributes().clear(); + if (performanceSamplesBuilder_ == null) { + performanceSamples_ = java.util.Collections.emptyList(); + } else { + performanceSamples_ = null; + performanceSamplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + traceToken_ = ""; + frameDataCase_ = 0; + frameData_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetFrame_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetFrame getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AssetFrame.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetFrame build() { + com.google.cloud.migrationcenter.v1.AssetFrame result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetFrame buildPartial() { + com.google.cloud.migrationcenter.v1.AssetFrame result = + new com.google.cloud.migrationcenter.v1.AssetFrame(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.migrationcenter.v1.AssetFrame result) { + if (performanceSamplesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + performanceSamples_ = java.util.Collections.unmodifiableList(performanceSamples_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.performanceSamples_ = performanceSamples_; + } else { + result.performanceSamples_ = performanceSamplesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.AssetFrame result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.reportTime_ = reportTimeBuilder_ == null ? reportTime_ : reportTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.attributes_ = internalGetAttributes(); + result.attributes_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.traceToken_ = traceToken_; + } + } + + private void buildPartialOneofs(com.google.cloud.migrationcenter.v1.AssetFrame result) { + result.frameDataCase_ = frameDataCase_; + result.frameData_ = this.frameData_; + if (frameDataCase_ == 1 && machineDetailsBuilder_ != null) { + result.frameData_ = machineDetailsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AssetFrame) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AssetFrame) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.AssetFrame other) { + if (other == com.google.cloud.migrationcenter.v1.AssetFrame.getDefaultInstance()) return this; + if (other.hasReportTime()) { + mergeReportTime(other.getReportTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000004; + internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + bitField0_ |= 0x00000008; + if (performanceSamplesBuilder_ == null) { + if (!other.performanceSamples_.isEmpty()) { + if (performanceSamples_.isEmpty()) { + performanceSamples_ = other.performanceSamples_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensurePerformanceSamplesIsMutable(); + performanceSamples_.addAll(other.performanceSamples_); + } + onChanged(); + } + } else { + if (!other.performanceSamples_.isEmpty()) { + if (performanceSamplesBuilder_.isEmpty()) { + performanceSamplesBuilder_.dispose(); + performanceSamplesBuilder_ = null; + performanceSamples_ = other.performanceSamples_; + bitField0_ = (bitField0_ & ~0x00000010); + performanceSamplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPerformanceSamplesFieldBuilder() + : null; + } else { + performanceSamplesBuilder_.addAllMessages(other.performanceSamples_); + } + } + } + if (!other.getTraceToken().isEmpty()) { + traceToken_ = other.traceToken_; + bitField0_ |= 0x00000020; + onChanged(); + } + switch (other.getFrameDataCase()) { + case MACHINE_DETAILS: + { + mergeMachineDetails(other.getMachineDetails()); + break; + } + case FRAMEDATA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getMachineDetailsFieldBuilder().getBuilder(), extensionRegistry); + frameDataCase_ = 1; + break; + } // case 10 + case 82: + { + input.readMessage(getReportTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 82 + case 90: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 90 + case 98: + { + com.google.protobuf.MapEntry attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 98 + case 106: + { + com.google.cloud.migrationcenter.v1.PerformanceSample m = + input.readMessage( + com.google.cloud.migrationcenter.v1.PerformanceSample.parser(), + extensionRegistry); + if (performanceSamplesBuilder_ == null) { + ensurePerformanceSamplesIsMutable(); + performanceSamples_.add(m); + } else { + performanceSamplesBuilder_.addMessage(m); + } + break; + } // case 106 + case 114: + { + traceToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 114 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int frameDataCase_ = 0; + private java.lang.Object frameData_; + + public FrameDataCase getFrameDataCase() { + return FrameDataCase.forNumber(frameDataCase_); + } + + public Builder clearFrameData() { + frameDataCase_ = 0; + frameData_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineDetails, + com.google.cloud.migrationcenter.v1.MachineDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder> + machineDetailsBuilder_; + /** + * + * + *
+     * Asset information specific for virtual machines.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + * + * @return Whether the machineDetails field is set. + */ + @java.lang.Override + public boolean hasMachineDetails() { + return frameDataCase_ == 1; + } + /** + * + * + *
+     * Asset information specific for virtual machines.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + * + * @return The machineDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetails getMachineDetails() { + if (machineDetailsBuilder_ == null) { + if (frameDataCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.MachineDetails) frameData_; + } + return com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } else { + if (frameDataCase_ == 1) { + return machineDetailsBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * Asset information specific for virtual machines.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + */ + public Builder setMachineDetails(com.google.cloud.migrationcenter.v1.MachineDetails value) { + if (machineDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + frameData_ = value; + onChanged(); + } else { + machineDetailsBuilder_.setMessage(value); + } + frameDataCase_ = 1; + return this; + } + /** + * + * + *
+     * Asset information specific for virtual machines.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + */ + public Builder setMachineDetails( + com.google.cloud.migrationcenter.v1.MachineDetails.Builder builderForValue) { + if (machineDetailsBuilder_ == null) { + frameData_ = builderForValue.build(); + onChanged(); + } else { + machineDetailsBuilder_.setMessage(builderForValue.build()); + } + frameDataCase_ = 1; + return this; + } + /** + * + * + *
+     * Asset information specific for virtual machines.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + */ + public Builder mergeMachineDetails(com.google.cloud.migrationcenter.v1.MachineDetails value) { + if (machineDetailsBuilder_ == null) { + if (frameDataCase_ == 1 + && frameData_ + != com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance()) { + frameData_ = + com.google.cloud.migrationcenter.v1.MachineDetails.newBuilder( + (com.google.cloud.migrationcenter.v1.MachineDetails) frameData_) + .mergeFrom(value) + .buildPartial(); + } else { + frameData_ = value; + } + onChanged(); + } else { + if (frameDataCase_ == 1) { + machineDetailsBuilder_.mergeFrom(value); + } else { + machineDetailsBuilder_.setMessage(value); + } + } + frameDataCase_ = 1; + return this; + } + /** + * + * + *
+     * Asset information specific for virtual machines.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + */ + public Builder clearMachineDetails() { + if (machineDetailsBuilder_ == null) { + if (frameDataCase_ == 1) { + frameDataCase_ = 0; + frameData_ = null; + onChanged(); + } + } else { + if (frameDataCase_ == 1) { + frameDataCase_ = 0; + frameData_ = null; + } + machineDetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Asset information specific for virtual machines.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + */ + public com.google.cloud.migrationcenter.v1.MachineDetails.Builder getMachineDetailsBuilder() { + return getMachineDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Asset information specific for virtual machines.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder + getMachineDetailsOrBuilder() { + if ((frameDataCase_ == 1) && (machineDetailsBuilder_ != null)) { + return machineDetailsBuilder_.getMessageOrBuilder(); + } else { + if (frameDataCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.MachineDetails) frameData_; + } + return com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * Asset information specific for virtual machines.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineDetails, + com.google.cloud.migrationcenter.v1.MachineDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder> + getMachineDetailsFieldBuilder() { + if (machineDetailsBuilder_ == null) { + if (!(frameDataCase_ == 1)) { + frameData_ = com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } + machineDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineDetails, + com.google.cloud.migrationcenter.v1.MachineDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder>( + (com.google.cloud.migrationcenter.v1.MachineDetails) frameData_, + getParentForChildren(), + isClean()); + frameData_ = null; + } + frameDataCase_ = 1; + onChanged(); + return machineDetailsBuilder_; + } + + private com.google.protobuf.Timestamp reportTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + reportTimeBuilder_; + /** + * + * + *
+     * The time the data was reported.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 10; + * + * @return Whether the reportTime field is set. + */ + public boolean hasReportTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The time the data was reported.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 10; + * + * @return The reportTime. + */ + public com.google.protobuf.Timestamp getReportTime() { + if (reportTimeBuilder_ == null) { + return reportTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : reportTime_; + } else { + return reportTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time the data was reported.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 10; + */ + public Builder setReportTime(com.google.protobuf.Timestamp value) { + if (reportTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reportTime_ = value; + } else { + reportTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time the data was reported.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 10; + */ + public Builder setReportTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (reportTimeBuilder_ == null) { + reportTime_ = builderForValue.build(); + } else { + reportTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time the data was reported.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 10; + */ + public Builder mergeReportTime(com.google.protobuf.Timestamp value) { + if (reportTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && reportTime_ != null + && reportTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getReportTimeBuilder().mergeFrom(value); + } else { + reportTime_ = value; + } + } else { + reportTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time the data was reported.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 10; + */ + public Builder clearReportTime() { + bitField0_ = (bitField0_ & ~0x00000002); + reportTime_ = null; + if (reportTimeBuilder_ != null) { + reportTimeBuilder_.dispose(); + reportTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time the data was reported.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 10; + */ + public com.google.protobuf.Timestamp.Builder getReportTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getReportTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the data was reported.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 10; + */ + public com.google.protobuf.TimestampOrBuilder getReportTimeOrBuilder() { + if (reportTimeBuilder_ != null) { + return reportTimeBuilder_.getMessageOrBuilder(); + } else { + return reportTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : reportTime_; + } + } + /** + * + * + *
+     * The time the data was reported.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getReportTimeFieldBuilder() { + if (reportTimeBuilder_ == null) { + reportTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getReportTime(), getParentForChildren(), isClean()); + reportTime_ = null; + } + return reportTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000004; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + private com.google.protobuf.MapField + internalGetMutableAttributes() { + if (attributes_ == null) { + attributes_ = + com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); + } + if (!attributes_.isMutable()) { + attributes_ = attributes_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 12; + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 12; + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 12; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 12; + */ + @java.lang.Override + public java.lang.String getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttributes() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableAttributes().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 12; + */ + public Builder removeAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAttributes().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAttributes() { + bitField0_ |= 0x00000008; + return internalGetMutableAttributes().getMutableMap(); + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 12; + */ + public Builder putAttributes(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAttributes().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Generic asset attributes.
+     * 
+ * + * map<string, string> attributes = 12; + */ + public Builder putAllAttributes(java.util.Map values) { + internalGetMutableAttributes().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.util.List + performanceSamples_ = java.util.Collections.emptyList(); + + private void ensurePerformanceSamplesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + performanceSamples_ = + new java.util.ArrayList( + performanceSamples_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PerformanceSample, + com.google.cloud.migrationcenter.v1.PerformanceSample.Builder, + com.google.cloud.migrationcenter.v1.PerformanceSampleOrBuilder> + performanceSamplesBuilder_; + + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public java.util.List + getPerformanceSamplesList() { + if (performanceSamplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(performanceSamples_); + } else { + return performanceSamplesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public int getPerformanceSamplesCount() { + if (performanceSamplesBuilder_ == null) { + return performanceSamples_.size(); + } else { + return performanceSamplesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public com.google.cloud.migrationcenter.v1.PerformanceSample getPerformanceSamples(int index) { + if (performanceSamplesBuilder_ == null) { + return performanceSamples_.get(index); + } else { + return performanceSamplesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public Builder setPerformanceSamples( + int index, com.google.cloud.migrationcenter.v1.PerformanceSample value) { + if (performanceSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePerformanceSamplesIsMutable(); + performanceSamples_.set(index, value); + onChanged(); + } else { + performanceSamplesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public Builder setPerformanceSamples( + int index, com.google.cloud.migrationcenter.v1.PerformanceSample.Builder builderForValue) { + if (performanceSamplesBuilder_ == null) { + ensurePerformanceSamplesIsMutable(); + performanceSamples_.set(index, builderForValue.build()); + onChanged(); + } else { + performanceSamplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public Builder addPerformanceSamples( + com.google.cloud.migrationcenter.v1.PerformanceSample value) { + if (performanceSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePerformanceSamplesIsMutable(); + performanceSamples_.add(value); + onChanged(); + } else { + performanceSamplesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public Builder addPerformanceSamples( + int index, com.google.cloud.migrationcenter.v1.PerformanceSample value) { + if (performanceSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePerformanceSamplesIsMutable(); + performanceSamples_.add(index, value); + onChanged(); + } else { + performanceSamplesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public Builder addPerformanceSamples( + com.google.cloud.migrationcenter.v1.PerformanceSample.Builder builderForValue) { + if (performanceSamplesBuilder_ == null) { + ensurePerformanceSamplesIsMutable(); + performanceSamples_.add(builderForValue.build()); + onChanged(); + } else { + performanceSamplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public Builder addPerformanceSamples( + int index, com.google.cloud.migrationcenter.v1.PerformanceSample.Builder builderForValue) { + if (performanceSamplesBuilder_ == null) { + ensurePerformanceSamplesIsMutable(); + performanceSamples_.add(index, builderForValue.build()); + onChanged(); + } else { + performanceSamplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public Builder addAllPerformanceSamples( + java.lang.Iterable + values) { + if (performanceSamplesBuilder_ == null) { + ensurePerformanceSamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, performanceSamples_); + onChanged(); + } else { + performanceSamplesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public Builder clearPerformanceSamples() { + if (performanceSamplesBuilder_ == null) { + performanceSamples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + performanceSamplesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public Builder removePerformanceSamples(int index) { + if (performanceSamplesBuilder_ == null) { + ensurePerformanceSamplesIsMutable(); + performanceSamples_.remove(index); + onChanged(); + } else { + performanceSamplesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public com.google.cloud.migrationcenter.v1.PerformanceSample.Builder + getPerformanceSamplesBuilder(int index) { + return getPerformanceSamplesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public com.google.cloud.migrationcenter.v1.PerformanceSampleOrBuilder + getPerformanceSamplesOrBuilder(int index) { + if (performanceSamplesBuilder_ == null) { + return performanceSamples_.get(index); + } else { + return performanceSamplesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public java.util.List + getPerformanceSamplesOrBuilderList() { + if (performanceSamplesBuilder_ != null) { + return performanceSamplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(performanceSamples_); + } + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public com.google.cloud.migrationcenter.v1.PerformanceSample.Builder + addPerformanceSamplesBuilder() { + return getPerformanceSamplesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.PerformanceSample.getDefaultInstance()); + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public com.google.cloud.migrationcenter.v1.PerformanceSample.Builder + addPerformanceSamplesBuilder(int index) { + return getPerformanceSamplesFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.PerformanceSample.getDefaultInstance()); + } + /** + * + * + *
+     * Asset performance data samples.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + public java.util.List + getPerformanceSamplesBuilderList() { + return getPerformanceSamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PerformanceSample, + com.google.cloud.migrationcenter.v1.PerformanceSample.Builder, + com.google.cloud.migrationcenter.v1.PerformanceSampleOrBuilder> + getPerformanceSamplesFieldBuilder() { + if (performanceSamplesBuilder_ == null) { + performanceSamplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PerformanceSample, + com.google.cloud.migrationcenter.v1.PerformanceSample.Builder, + com.google.cloud.migrationcenter.v1.PerformanceSampleOrBuilder>( + performanceSamples_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + performanceSamples_ = null; + } + return performanceSamplesBuilder_; + } + + private java.lang.Object traceToken_ = ""; + /** + * + * + *
+     * Optional. Trace token is optionally provided to assist with debugging and
+     * traceability.
+     * 
+ * + * string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The traceToken. + */ + public java.lang.String getTraceToken() { + java.lang.Object ref = traceToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + traceToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Trace token is optionally provided to assist with debugging and
+     * traceability.
+     * 
+ * + * string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for traceToken. + */ + public com.google.protobuf.ByteString getTraceTokenBytes() { + java.lang.Object ref = traceToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Trace token is optionally provided to assist with debugging and
+     * traceability.
+     * 
+ * + * string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The traceToken to set. + * @return This builder for chaining. + */ + public Builder setTraceToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + traceToken_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Trace token is optionally provided to assist with debugging and
+     * traceability.
+     * 
+ * + * string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTraceToken() { + traceToken_ = getDefaultInstance().getTraceToken(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Trace token is optionally provided to assist with debugging and
+     * traceability.
+     * 
+ * + * string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for traceToken to set. + * @return This builder for chaining. + */ + public Builder setTraceTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + traceToken_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AssetFrame) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AssetFrame) + private static final com.google.cloud.migrationcenter.v1.AssetFrame DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AssetFrame(); + } + + public static com.google.cloud.migrationcenter.v1.AssetFrame getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssetFrame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetFrame getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetFrameOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetFrameOrBuilder.java new file mode 100644 index 000000000000..26bab206916d --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetFrameOrBuilder.java @@ -0,0 +1,298 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface AssetFrameOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AssetFrame) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Asset information specific for virtual machines.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + * + * @return Whether the machineDetails field is set. + */ + boolean hasMachineDetails(); + /** + * + * + *
+   * Asset information specific for virtual machines.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + * + * @return The machineDetails. + */ + com.google.cloud.migrationcenter.v1.MachineDetails getMachineDetails(); + /** + * + * + *
+   * Asset information specific for virtual machines.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + */ + com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder getMachineDetailsOrBuilder(); + + /** + * + * + *
+   * The time the data was reported.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 10; + * + * @return Whether the reportTime field is set. + */ + boolean hasReportTime(); + /** + * + * + *
+   * The time the data was reported.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 10; + * + * @return The reportTime. + */ + com.google.protobuf.Timestamp getReportTime(); + /** + * + * + *
+   * The time the data was reported.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 10; + */ + com.google.protobuf.TimestampOrBuilder getReportTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 11; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 12; + */ + int getAttributesCount(); + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 12; + */ + boolean containsAttributes(java.lang.String key); + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAttributes(); + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 12; + */ + java.util.Map getAttributesMap(); + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 12; + */ + /* nullable */ + java.lang.String getAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 12; + */ + java.lang.String getAttributesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Asset performance data samples.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + java.util.List getPerformanceSamplesList(); + /** + * + * + *
+   * Asset performance data samples.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + com.google.cloud.migrationcenter.v1.PerformanceSample getPerformanceSamples(int index); + /** + * + * + *
+   * Asset performance data samples.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + int getPerformanceSamplesCount(); + /** + * + * + *
+   * Asset performance data samples.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + java.util.List + getPerformanceSamplesOrBuilderList(); + /** + * + * + *
+   * Asset performance data samples.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * + */ + com.google.cloud.migrationcenter.v1.PerformanceSampleOrBuilder getPerformanceSamplesOrBuilder( + int index); + + /** + * + * + *
+   * Optional. Trace token is optionally provided to assist with debugging and
+   * traceability.
+   * 
+ * + * string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The traceToken. + */ + java.lang.String getTraceToken(); + /** + * + * + *
+   * Optional. Trace token is optionally provided to assist with debugging and
+   * traceability.
+   * 
+ * + * string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for traceToken. + */ + com.google.protobuf.ByteString getTraceTokenBytes(); + + com.google.cloud.migrationcenter.v1.AssetFrame.FrameDataCase getFrameDataCase(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetList.java new file mode 100644 index 000000000000..055cb7c217e4 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetList.java @@ -0,0 +1,744 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Lists the asset IDs of all assets.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AssetList} + */ +public final class AssetList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AssetList) + AssetListOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssetList.newBuilder() to construct. + private AssetList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssetList() { + assetIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssetList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AssetList.class, + com.google.cloud.migrationcenter.v1.AssetList.Builder.class); + } + + public static final int ASSET_IDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList assetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. A list of asset IDs
+   * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the assetIds. + */ + public com.google.protobuf.ProtocolStringList getAssetIdsList() { + return assetIds_; + } + /** + * + * + *
+   * Required. A list of asset IDs
+   * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of assetIds. + */ + public int getAssetIdsCount() { + return assetIds_.size(); + } + /** + * + * + *
+   * Required. A list of asset IDs
+   * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The assetIds at the given index. + */ + public java.lang.String getAssetIds(int index) { + return assetIds_.get(index); + } + /** + * + * + *
+   * Required. A list of asset IDs
+   * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the assetIds at the given index. + */ + public com.google.protobuf.ByteString getAssetIdsBytes(int index) { + return assetIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < assetIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, assetIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < assetIds_.size(); i++) { + dataSize += computeStringSizeNoTag(assetIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AssetList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AssetList other = + (com.google.cloud.migrationcenter.v1.AssetList) obj; + + if (!getAssetIdsList().equals(other.getAssetIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAssetIdsCount() > 0) { + hash = (37 * hash) + ASSET_IDS_FIELD_NUMBER; + hash = (53 * hash) + getAssetIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AssetList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.AssetList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Lists the asset IDs of all assets.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AssetList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AssetList) + com.google.cloud.migrationcenter.v1.AssetListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AssetList.class, + com.google.cloud.migrationcenter.v1.AssetList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.AssetList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + assetIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetList build() { + com.google.cloud.migrationcenter.v1.AssetList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetList buildPartial() { + com.google.cloud.migrationcenter.v1.AssetList result = + new com.google.cloud.migrationcenter.v1.AssetList(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.AssetList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + assetIds_.makeImmutable(); + result.assetIds_ = assetIds_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AssetList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AssetList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.AssetList other) { + if (other == com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance()) return this; + if (!other.assetIds_.isEmpty()) { + if (assetIds_.isEmpty()) { + assetIds_ = other.assetIds_; + bitField0_ |= 0x00000001; + } else { + ensureAssetIdsIsMutable(); + assetIds_.addAll(other.assetIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssetIdsIsMutable(); + assetIds_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList assetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAssetIdsIsMutable() { + if (!assetIds_.isModifiable()) { + assetIds_ = new com.google.protobuf.LazyStringArrayList(assetIds_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Required. A list of asset IDs
+     * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the assetIds. + */ + public com.google.protobuf.ProtocolStringList getAssetIdsList() { + assetIds_.makeImmutable(); + return assetIds_; + } + /** + * + * + *
+     * Required. A list of asset IDs
+     * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of assetIds. + */ + public int getAssetIdsCount() { + return assetIds_.size(); + } + /** + * + * + *
+     * Required. A list of asset IDs
+     * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The assetIds at the given index. + */ + public java.lang.String getAssetIds(int index) { + return assetIds_.get(index); + } + /** + * + * + *
+     * Required. A list of asset IDs
+     * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the assetIds at the given index. + */ + public com.google.protobuf.ByteString getAssetIdsBytes(int index) { + return assetIds_.getByteString(index); + } + /** + * + * + *
+     * Required. A list of asset IDs
+     * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The assetIds to set. + * @return This builder for chaining. + */ + public Builder setAssetIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetIdsIsMutable(); + assetIds_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A list of asset IDs
+     * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The assetIds to add. + * @return This builder for chaining. + */ + public Builder addAssetIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetIdsIsMutable(); + assetIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A list of asset IDs
+     * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The assetIds to add. + * @return This builder for chaining. + */ + public Builder addAllAssetIds(java.lang.Iterable values) { + ensureAssetIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assetIds_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A list of asset IDs
+     * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAssetIds() { + assetIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A list of asset IDs
+     * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the assetIds to add. + * @return This builder for chaining. + */ + public Builder addAssetIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetIdsIsMutable(); + assetIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AssetList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AssetList) + private static final com.google.cloud.migrationcenter.v1.AssetList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AssetList(); + } + + public static com.google.cloud.migrationcenter.v1.AssetList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssetList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetListOrBuilder.java new file mode 100644 index 000000000000..77f1a835eac5 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetListOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface AssetListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AssetList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A list of asset IDs
+   * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the assetIds. + */ + java.util.List getAssetIdsList(); + /** + * + * + *
+   * Required. A list of asset IDs
+   * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of assetIds. + */ + int getAssetIdsCount(); + /** + * + * + *
+   * Required. A list of asset IDs
+   * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The assetIds at the given index. + */ + java.lang.String getAssetIds(int index); + /** + * + * + *
+   * Required. A list of asset IDs
+   * 
+ * + * + * repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the assetIds at the given index. + */ + com.google.protobuf.ByteString getAssetIdsBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetName.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetName.java new file mode 100644 index 000000000000..ef74b1d630c5 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AssetName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ASSET = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/assets/{asset}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String asset; + + @Deprecated + protected AssetName() { + project = null; + location = null; + asset = null; + } + + private AssetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + asset = Preconditions.checkNotNull(builder.getAsset()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAsset() { + return asset; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AssetName of(String project, String location, String asset) { + return newBuilder().setProject(project).setLocation(location).setAsset(asset).build(); + } + + public static String format(String project, String location, String asset) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAsset(asset) + .build() + .toString(); + } + + public static AssetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ASSET.validatedMatch( + formattedString, "AssetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("asset")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AssetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ASSET.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (asset != null) { + fieldMapBuilder.put("asset", asset); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ASSET.instantiate( + "project", project, "location", location, "asset", asset); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AssetName that = ((AssetName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.asset, that.asset); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(asset); + return h; + } + + /** Builder for projects/{project}/locations/{location}/assets/{asset}. */ + public static class Builder { + private String project; + private String location; + private String asset; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAsset() { + return asset; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAsset(String asset) { + this.asset = asset; + return this; + } + + private Builder(AssetName assetName) { + this.project = assetName.project; + this.location = assetName.location; + this.asset = assetName.asset; + } + + public AssetName build() { + return new AssetName(this); + } + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetOrBuilder.java new file mode 100644 index 000000000000..7dd839260e64 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetOrBuilder.java @@ -0,0 +1,488 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface AssetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Asset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The full name of the asset.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The full name of the asset.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the asset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the asset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the asset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the asset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the asset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the asset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 5; + */ + int getAttributesCount(); + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 5; + */ + boolean containsAttributes(java.lang.String key); + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAttributes(); + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 5; + */ + java.util.Map getAttributesMap(); + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 5; + */ + /* nullable */ + java.lang.String getAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Generic asset attributes.
+   * 
+ * + * map<string, string> attributes = 5; + */ + java.lang.String getAttributesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Asset information specific for virtual and physical
+   * machines.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the machineDetails field is set. + */ + boolean hasMachineDetails(); + /** + * + * + *
+   * Output only. Asset information specific for virtual and physical
+   * machines.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The machineDetails. + */ + com.google.cloud.migrationcenter.v1.MachineDetails getMachineDetails(); + /** + * + * + *
+   * Output only. Asset information specific for virtual and physical
+   * machines.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder getMachineDetailsOrBuilder(); + + /** + * + * + *
+   * Output only. The list of insights associated with the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the insightList field is set. + */ + boolean hasInsightList(); + /** + * + * + *
+   * Output only. The list of insights associated with the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The insightList. + */ + com.google.cloud.migrationcenter.v1.InsightList getInsightList(); + /** + * + * + *
+   * Output only. The list of insights associated with the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.InsightListOrBuilder getInsightListOrBuilder(); + + /** + * + * + *
+   * Output only. Performance data for the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the performanceData field is set. + */ + boolean hasPerformanceData(); + /** + * + * + *
+   * Output only. Performance data for the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The performanceData. + */ + com.google.cloud.migrationcenter.v1.AssetPerformanceData getPerformanceData(); + /** + * + * + *
+   * Output only. Performance data for the asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.AssetPerformanceDataOrBuilder getPerformanceDataOrBuilder(); + + /** + * + * + *
+   * Output only. The list of sources contributing to the asset.
+   * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the sources. + */ + java.util.List getSourcesList(); + /** + * + * + *
+   * Output only. The list of sources contributing to the asset.
+   * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of sources. + */ + int getSourcesCount(); + /** + * + * + *
+   * Output only. The list of sources contributing to the asset.
+   * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The sources at the given index. + */ + java.lang.String getSources(int index); + /** + * + * + *
+   * Output only. The list of sources contributing to the asset.
+   * 
+ * + * + * repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the sources at the given index. + */ + com.google.protobuf.ByteString getSourcesBytes(int index); + + /** + * + * + *
+   * Output only. The list of groups that the asset is assigned to.
+   * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the assignedGroups. + */ + java.util.List getAssignedGroupsList(); + /** + * + * + *
+   * Output only. The list of groups that the asset is assigned to.
+   * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of assignedGroups. + */ + int getAssignedGroupsCount(); + /** + * + * + *
+   * Output only. The list of groups that the asset is assigned to.
+   * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The assignedGroups at the given index. + */ + java.lang.String getAssignedGroups(int index); + /** + * + * + *
+   * Output only. The list of groups that the asset is assigned to.
+   * 
+ * + * + * repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the assignedGroups at the given index. + */ + com.google.protobuf.ByteString getAssignedGroupsBytes(int index); + + com.google.cloud.migrationcenter.v1.Asset.AssetDetailsCase getAssetDetailsCase(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetPerformanceData.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetPerformanceData.java new file mode 100644 index 000000000000..f4f79b506f77 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetPerformanceData.java @@ -0,0 +1,1066 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Performance data for an asset.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AssetPerformanceData} + */ +public final class AssetPerformanceData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AssetPerformanceData) + AssetPerformanceDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssetPerformanceData.newBuilder() to construct. + private AssetPerformanceData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssetPerformanceData() { + dailyResourceUsageAggregations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssetPerformanceData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetPerformanceData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetPerformanceData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AssetPerformanceData.class, + com.google.cloud.migrationcenter.v1.AssetPerformanceData.Builder.class); + } + + public static final int DAILY_RESOURCE_USAGE_AGGREGATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + dailyResourceUsageAggregations_; + /** + * + * + *
+   * Daily resource usage aggregations.
+   * Contains all of the data available for an asset, up to the last 420 days.
+   * Aggregations are sorted from oldest to most recent.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + @java.lang.Override + public java.util.List + getDailyResourceUsageAggregationsList() { + return dailyResourceUsageAggregations_; + } + /** + * + * + *
+   * Daily resource usage aggregations.
+   * Contains all of the data available for an asset, up to the last 420 days.
+   * Aggregations are sorted from oldest to most recent.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregationOrBuilder> + getDailyResourceUsageAggregationsOrBuilderList() { + return dailyResourceUsageAggregations_; + } + /** + * + * + *
+   * Daily resource usage aggregations.
+   * Contains all of the data available for an asset, up to the last 420 days.
+   * Aggregations are sorted from oldest to most recent.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + @java.lang.Override + public int getDailyResourceUsageAggregationsCount() { + return dailyResourceUsageAggregations_.size(); + } + /** + * + * + *
+   * Daily resource usage aggregations.
+   * Contains all of the data available for an asset, up to the last 420 days.
+   * Aggregations are sorted from oldest to most recent.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + getDailyResourceUsageAggregations(int index) { + return dailyResourceUsageAggregations_.get(index); + } + /** + * + * + *
+   * Daily resource usage aggregations.
+   * Contains all of the data available for an asset, up to the last 420 days.
+   * Aggregations are sorted from oldest to most recent.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregationOrBuilder + getDailyResourceUsageAggregationsOrBuilder(int index) { + return dailyResourceUsageAggregations_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dailyResourceUsageAggregations_.size(); i++) { + output.writeMessage(1, dailyResourceUsageAggregations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dailyResourceUsageAggregations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, dailyResourceUsageAggregations_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AssetPerformanceData)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AssetPerformanceData other = + (com.google.cloud.migrationcenter.v1.AssetPerformanceData) obj; + + if (!getDailyResourceUsageAggregationsList() + .equals(other.getDailyResourceUsageAggregationsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDailyResourceUsageAggregationsCount() > 0) { + hash = (37 * hash) + DAILY_RESOURCE_USAGE_AGGREGATIONS_FIELD_NUMBER; + hash = (53 * hash) + getDailyResourceUsageAggregationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AssetPerformanceData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Performance data for an asset.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AssetPerformanceData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AssetPerformanceData) + com.google.cloud.migrationcenter.v1.AssetPerformanceDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetPerformanceData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetPerformanceData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AssetPerformanceData.class, + com.google.cloud.migrationcenter.v1.AssetPerformanceData.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.AssetPerformanceData.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dailyResourceUsageAggregationsBuilder_ == null) { + dailyResourceUsageAggregations_ = java.util.Collections.emptyList(); + } else { + dailyResourceUsageAggregations_ = null; + dailyResourceUsageAggregationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AssetPerformanceData_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetPerformanceData getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AssetPerformanceData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetPerformanceData build() { + com.google.cloud.migrationcenter.v1.AssetPerformanceData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetPerformanceData buildPartial() { + com.google.cloud.migrationcenter.v1.AssetPerformanceData result = + new com.google.cloud.migrationcenter.v1.AssetPerformanceData(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.AssetPerformanceData result) { + if (dailyResourceUsageAggregationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dailyResourceUsageAggregations_ = + java.util.Collections.unmodifiableList(dailyResourceUsageAggregations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dailyResourceUsageAggregations_ = dailyResourceUsageAggregations_; + } else { + result.dailyResourceUsageAggregations_ = dailyResourceUsageAggregationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.AssetPerformanceData result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AssetPerformanceData) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AssetPerformanceData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.AssetPerformanceData other) { + if (other == com.google.cloud.migrationcenter.v1.AssetPerformanceData.getDefaultInstance()) + return this; + if (dailyResourceUsageAggregationsBuilder_ == null) { + if (!other.dailyResourceUsageAggregations_.isEmpty()) { + if (dailyResourceUsageAggregations_.isEmpty()) { + dailyResourceUsageAggregations_ = other.dailyResourceUsageAggregations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDailyResourceUsageAggregationsIsMutable(); + dailyResourceUsageAggregations_.addAll(other.dailyResourceUsageAggregations_); + } + onChanged(); + } + } else { + if (!other.dailyResourceUsageAggregations_.isEmpty()) { + if (dailyResourceUsageAggregationsBuilder_.isEmpty()) { + dailyResourceUsageAggregationsBuilder_.dispose(); + dailyResourceUsageAggregationsBuilder_ = null; + dailyResourceUsageAggregations_ = other.dailyResourceUsageAggregations_; + bitField0_ = (bitField0_ & ~0x00000001); + dailyResourceUsageAggregationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDailyResourceUsageAggregationsFieldBuilder() + : null; + } else { + dailyResourceUsageAggregationsBuilder_.addAllMessages( + other.dailyResourceUsageAggregations_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation m = + input.readMessage( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.parser(), + extensionRegistry); + if (dailyResourceUsageAggregationsBuilder_ == null) { + ensureDailyResourceUsageAggregationsIsMutable(); + dailyResourceUsageAggregations_.add(m); + } else { + dailyResourceUsageAggregationsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + dailyResourceUsageAggregations_ = java.util.Collections.emptyList(); + + private void ensureDailyResourceUsageAggregationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dailyResourceUsageAggregations_ = + new java.util.ArrayList< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation>( + dailyResourceUsageAggregations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregationOrBuilder> + dailyResourceUsageAggregationsBuilder_; + + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public java.util.List + getDailyResourceUsageAggregationsList() { + if (dailyResourceUsageAggregationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dailyResourceUsageAggregations_); + } else { + return dailyResourceUsageAggregationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public int getDailyResourceUsageAggregationsCount() { + if (dailyResourceUsageAggregationsBuilder_ == null) { + return dailyResourceUsageAggregations_.size(); + } else { + return dailyResourceUsageAggregationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + getDailyResourceUsageAggregations(int index) { + if (dailyResourceUsageAggregationsBuilder_ == null) { + return dailyResourceUsageAggregations_.get(index); + } else { + return dailyResourceUsageAggregationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public Builder setDailyResourceUsageAggregations( + int index, com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation value) { + if (dailyResourceUsageAggregationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDailyResourceUsageAggregationsIsMutable(); + dailyResourceUsageAggregations_.set(index, value); + onChanged(); + } else { + dailyResourceUsageAggregationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public Builder setDailyResourceUsageAggregations( + int index, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Builder builderForValue) { + if (dailyResourceUsageAggregationsBuilder_ == null) { + ensureDailyResourceUsageAggregationsIsMutable(); + dailyResourceUsageAggregations_.set(index, builderForValue.build()); + onChanged(); + } else { + dailyResourceUsageAggregationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public Builder addDailyResourceUsageAggregations( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation value) { + if (dailyResourceUsageAggregationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDailyResourceUsageAggregationsIsMutable(); + dailyResourceUsageAggregations_.add(value); + onChanged(); + } else { + dailyResourceUsageAggregationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public Builder addDailyResourceUsageAggregations( + int index, com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation value) { + if (dailyResourceUsageAggregationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDailyResourceUsageAggregationsIsMutable(); + dailyResourceUsageAggregations_.add(index, value); + onChanged(); + } else { + dailyResourceUsageAggregationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public Builder addDailyResourceUsageAggregations( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Builder builderForValue) { + if (dailyResourceUsageAggregationsBuilder_ == null) { + ensureDailyResourceUsageAggregationsIsMutable(); + dailyResourceUsageAggregations_.add(builderForValue.build()); + onChanged(); + } else { + dailyResourceUsageAggregationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public Builder addDailyResourceUsageAggregations( + int index, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Builder builderForValue) { + if (dailyResourceUsageAggregationsBuilder_ == null) { + ensureDailyResourceUsageAggregationsIsMutable(); + dailyResourceUsageAggregations_.add(index, builderForValue.build()); + onChanged(); + } else { + dailyResourceUsageAggregationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public Builder addAllDailyResourceUsageAggregations( + java.lang.Iterable< + ? extends com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation> + values) { + if (dailyResourceUsageAggregationsBuilder_ == null) { + ensureDailyResourceUsageAggregationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dailyResourceUsageAggregations_); + onChanged(); + } else { + dailyResourceUsageAggregationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public Builder clearDailyResourceUsageAggregations() { + if (dailyResourceUsageAggregationsBuilder_ == null) { + dailyResourceUsageAggregations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dailyResourceUsageAggregationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public Builder removeDailyResourceUsageAggregations(int index) { + if (dailyResourceUsageAggregationsBuilder_ == null) { + ensureDailyResourceUsageAggregationsIsMutable(); + dailyResourceUsageAggregations_.remove(index); + onChanged(); + } else { + dailyResourceUsageAggregationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Builder + getDailyResourceUsageAggregationsBuilder(int index) { + return getDailyResourceUsageAggregationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregationOrBuilder + getDailyResourceUsageAggregationsOrBuilder(int index) { + if (dailyResourceUsageAggregationsBuilder_ == null) { + return dailyResourceUsageAggregations_.get(index); + } else { + return dailyResourceUsageAggregationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregationOrBuilder> + getDailyResourceUsageAggregationsOrBuilderList() { + if (dailyResourceUsageAggregationsBuilder_ != null) { + return dailyResourceUsageAggregationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dailyResourceUsageAggregations_); + } + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Builder + addDailyResourceUsageAggregationsBuilder() { + return getDailyResourceUsageAggregationsFieldBuilder() + .addBuilder( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + .getDefaultInstance()); + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Builder + addDailyResourceUsageAggregationsBuilder(int index) { + return getDailyResourceUsageAggregationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + .getDefaultInstance()); + } + /** + * + * + *
+     * Daily resource usage aggregations.
+     * Contains all of the data available for an asset, up to the last 420 days.
+     * Aggregations are sorted from oldest to most recent.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + public java.util.List + getDailyResourceUsageAggregationsBuilderList() { + return getDailyResourceUsageAggregationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregationOrBuilder> + getDailyResourceUsageAggregationsFieldBuilder() { + if (dailyResourceUsageAggregationsBuilder_ == null) { + dailyResourceUsageAggregationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregationOrBuilder>( + dailyResourceUsageAggregations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dailyResourceUsageAggregations_ = null; + } + return dailyResourceUsageAggregationsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AssetPerformanceData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AssetPerformanceData) + private static final com.google.cloud.migrationcenter.v1.AssetPerformanceData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AssetPerformanceData(); + } + + public static com.google.cloud.migrationcenter.v1.AssetPerformanceData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssetPerformanceData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetPerformanceData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetPerformanceDataOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetPerformanceDataOrBuilder.java new file mode 100644 index 000000000000..308dd5f550cb --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetPerformanceDataOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface AssetPerformanceDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AssetPerformanceData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Daily resource usage aggregations.
+   * Contains all of the data available for an asset, up to the last 420 days.
+   * Aggregations are sorted from oldest to most recent.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + java.util.List + getDailyResourceUsageAggregationsList(); + /** + * + * + *
+   * Daily resource usage aggregations.
+   * Contains all of the data available for an asset, up to the last 420 days.
+   * Aggregations are sorted from oldest to most recent.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + getDailyResourceUsageAggregations(int index); + /** + * + * + *
+   * Daily resource usage aggregations.
+   * Contains all of the data available for an asset, up to the last 420 days.
+   * Aggregations are sorted from oldest to most recent.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + int getDailyResourceUsageAggregationsCount(); + /** + * + * + *
+   * Daily resource usage aggregations.
+   * Contains all of the data available for an asset, up to the last 420 days.
+   * Aggregations are sorted from oldest to most recent.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + java.util.List< + ? extends com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregationOrBuilder> + getDailyResourceUsageAggregationsOrBuilderList(); + /** + * + * + *
+   * Daily resource usage aggregations.
+   * Contains all of the data available for an asset, up to the last 420 days.
+   * Aggregations are sorted from oldest to most recent.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregationOrBuilder + getDailyResourceUsageAggregationsOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetView.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetView.java new file mode 100644 index 000000000000..79b7fbbd2557 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AssetView.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Specifies the types of asset views that provide complete or partial details
+ * of an asset.
+ * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.AssetView} + */ +public enum AssetView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The asset view is not specified. The API displays the basic view by
+   * default.
+   * 
+ * + * ASSET_VIEW_UNSPECIFIED = 0; + */ + ASSET_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * The asset view includes only basic metadata of the asset.
+   * 
+ * + * ASSET_VIEW_BASIC = 1; + */ + ASSET_VIEW_BASIC(1), + /** + * + * + *
+   * The asset view includes all the metadata of an asset and performance data.
+   * 
+ * + * ASSET_VIEW_FULL = 2; + */ + ASSET_VIEW_FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The asset view is not specified. The API displays the basic view by
+   * default.
+   * 
+ * + * ASSET_VIEW_UNSPECIFIED = 0; + */ + public static final int ASSET_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The asset view includes only basic metadata of the asset.
+   * 
+ * + * ASSET_VIEW_BASIC = 1; + */ + public static final int ASSET_VIEW_BASIC_VALUE = 1; + /** + * + * + *
+   * The asset view includes all the metadata of an asset and performance data.
+   * 
+ * + * ASSET_VIEW_FULL = 2; + */ + public static final int ASSET_VIEW_FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AssetView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AssetView forNumber(int value) { + switch (value) { + case 0: + return ASSET_VIEW_UNSPECIFIED; + case 1: + return ASSET_VIEW_BASIC; + case 2: + return ASSET_VIEW_FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AssetView findValueByNumber(int number) { + return AssetView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AssetView[] VALUES = values(); + + public static AssetView valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AssetView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.AssetView) +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AwsEc2PlatformDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AwsEc2PlatformDetails.java new file mode 100644 index 000000000000..650d8c969dc4 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AwsEc2PlatformDetails.java @@ -0,0 +1,807 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * AWS EC2 specific details.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AwsEc2PlatformDetails} + */ +public final class AwsEc2PlatformDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) + AwsEc2PlatformDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsEc2PlatformDetails.newBuilder() to construct. + private AwsEc2PlatformDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsEc2PlatformDetails() { + machineTypeLabel_ = ""; + location_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsEc2PlatformDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AwsEc2PlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AwsEc2PlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.class, + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.Builder.class); + } + + public static final int MACHINE_TYPE_LABEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineTypeLabel_ = ""; + /** + * + * + *
+   * AWS platform's machine type label.
+   * 
+ * + * string machine_type_label = 1; + * + * @return The machineTypeLabel. + */ + @java.lang.Override + public java.lang.String getMachineTypeLabel() { + java.lang.Object ref = machineTypeLabel_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineTypeLabel_ = s; + return s; + } + } + /** + * + * + *
+   * AWS platform's machine type label.
+   * 
+ * + * string machine_type_label = 1; + * + * @return The bytes for machineTypeLabel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeLabelBytes() { + java.lang.Object ref = machineTypeLabel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineTypeLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + /** + * + * + *
+   * The location of the machine in the AWS format.
+   * 
+ * + * string location = 2; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * The location of the machine in the AWS format.
+   * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineTypeLabel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, machineTypeLabel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, location_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineTypeLabel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, machineTypeLabel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, location_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails other = + (com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) obj; + + if (!getMachineTypeLabel().equals(other.getMachineTypeLabel())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getMachineTypeLabel().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * AWS EC2 specific details.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AwsEc2PlatformDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AwsEc2PlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AwsEc2PlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.class, + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + machineTypeLabel_ = ""; + location_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AwsEc2PlatformDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails build() { + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails buildPartial() { + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails result = + new com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.machineTypeLabel_ = machineTypeLabel_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.location_ = location_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails other) { + if (other == com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.getDefaultInstance()) + return this; + if (!other.getMachineTypeLabel().isEmpty()) { + machineTypeLabel_ = other.machineTypeLabel_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + machineTypeLabel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object machineTypeLabel_ = ""; + /** + * + * + *
+     * AWS platform's machine type label.
+     * 
+ * + * string machine_type_label = 1; + * + * @return The machineTypeLabel. + */ + public java.lang.String getMachineTypeLabel() { + java.lang.Object ref = machineTypeLabel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineTypeLabel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * AWS platform's machine type label.
+     * 
+ * + * string machine_type_label = 1; + * + * @return The bytes for machineTypeLabel. + */ + public com.google.protobuf.ByteString getMachineTypeLabelBytes() { + java.lang.Object ref = machineTypeLabel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineTypeLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * AWS platform's machine type label.
+     * 
+ * + * string machine_type_label = 1; + * + * @param value The machineTypeLabel to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeLabel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineTypeLabel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * AWS platform's machine type label.
+     * 
+ * + * string machine_type_label = 1; + * + * @return This builder for chaining. + */ + public Builder clearMachineTypeLabel() { + machineTypeLabel_ = getDefaultInstance().getMachineTypeLabel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * AWS platform's machine type label.
+     * 
+ * + * string machine_type_label = 1; + * + * @param value The bytes for machineTypeLabel to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeLabelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineTypeLabel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * The location of the machine in the AWS format.
+     * 
+ * + * string location = 2; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The location of the machine in the AWS format.
+     * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The location of the machine in the AWS format.
+     * 
+ * + * string location = 2; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The location of the machine in the AWS format.
+     * 
+ * + * string location = 2; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The location of the machine in the AWS format.
+     * 
+ * + * string location = 2; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) + private static final com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails(); + } + + public static com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsEc2PlatformDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AwsEc2PlatformDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AwsEc2PlatformDetailsOrBuilder.java new file mode 100644 index 000000000000..6428ce8b5de8 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AwsEc2PlatformDetailsOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface AwsEc2PlatformDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * AWS platform's machine type label.
+   * 
+ * + * string machine_type_label = 1; + * + * @return The machineTypeLabel. + */ + java.lang.String getMachineTypeLabel(); + /** + * + * + *
+   * AWS platform's machine type label.
+   * 
+ * + * string machine_type_label = 1; + * + * @return The bytes for machineTypeLabel. + */ + com.google.protobuf.ByteString getMachineTypeLabelBytes(); + + /** + * + * + *
+   * The location of the machine in the AWS format.
+   * 
+ * + * string location = 2; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * The location of the machine in the AWS format.
+   * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AzureVmPlatformDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AzureVmPlatformDetails.java new file mode 100644 index 000000000000..b457af5a41ab --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AzureVmPlatformDetails.java @@ -0,0 +1,989 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Azure VM specific details.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AzureVmPlatformDetails} + */ +public final class AzureVmPlatformDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.AzureVmPlatformDetails) + AzureVmPlatformDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureVmPlatformDetails.newBuilder() to construct. + private AzureVmPlatformDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureVmPlatformDetails() { + machineTypeLabel_ = ""; + location_ = ""; + provisioningState_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureVmPlatformDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AzureVmPlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AzureVmPlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.class, + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.Builder.class); + } + + public static final int MACHINE_TYPE_LABEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineTypeLabel_ = ""; + /** + * + * + *
+   * Azure platform's machine type label.
+   * 
+ * + * string machine_type_label = 1; + * + * @return The machineTypeLabel. + */ + @java.lang.Override + public java.lang.String getMachineTypeLabel() { + java.lang.Object ref = machineTypeLabel_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineTypeLabel_ = s; + return s; + } + } + /** + * + * + *
+   * Azure platform's machine type label.
+   * 
+ * + * string machine_type_label = 1; + * + * @return The bytes for machineTypeLabel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeLabelBytes() { + java.lang.Object ref = machineTypeLabel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineTypeLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + /** + * + * + *
+   * The location of the machine in the Azure format.
+   * 
+ * + * string location = 2; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * The location of the machine in the Azure format.
+   * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVISIONING_STATE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object provisioningState_ = ""; + /** + * + * + *
+   * Azure platform's provisioning state.
+   * 
+ * + * string provisioning_state = 3; + * + * @return The provisioningState. + */ + @java.lang.Override + public java.lang.String getProvisioningState() { + java.lang.Object ref = provisioningState_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provisioningState_ = s; + return s; + } + } + /** + * + * + *
+   * Azure platform's provisioning state.
+   * 
+ * + * string provisioning_state = 3; + * + * @return The bytes for provisioningState. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProvisioningStateBytes() { + java.lang.Object ref = provisioningState_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + provisioningState_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineTypeLabel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, machineTypeLabel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, location_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provisioningState_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, provisioningState_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineTypeLabel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, machineTypeLabel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, location_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provisioningState_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, provisioningState_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails other = + (com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails) obj; + + if (!getMachineTypeLabel().equals(other.getMachineTypeLabel())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (!getProvisioningState().equals(other.getProvisioningState())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getMachineTypeLabel().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + PROVISIONING_STATE_FIELD_NUMBER; + hash = (53 * hash) + getProvisioningState().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Azure VM specific details.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.AzureVmPlatformDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.AzureVmPlatformDetails) + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AzureVmPlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AzureVmPlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.class, + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + machineTypeLabel_ = ""; + location_ = ""; + provisioningState_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_AzureVmPlatformDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails build() { + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails buildPartial() { + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails result = + new com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.machineTypeLabel_ = machineTypeLabel_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.provisioningState_ = provisioningState_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails other) { + if (other == com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.getDefaultInstance()) + return this; + if (!other.getMachineTypeLabel().isEmpty()) { + machineTypeLabel_ = other.machineTypeLabel_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getProvisioningState().isEmpty()) { + provisioningState_ = other.provisioningState_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + machineTypeLabel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + provisioningState_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object machineTypeLabel_ = ""; + /** + * + * + *
+     * Azure platform's machine type label.
+     * 
+ * + * string machine_type_label = 1; + * + * @return The machineTypeLabel. + */ + public java.lang.String getMachineTypeLabel() { + java.lang.Object ref = machineTypeLabel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineTypeLabel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Azure platform's machine type label.
+     * 
+ * + * string machine_type_label = 1; + * + * @return The bytes for machineTypeLabel. + */ + public com.google.protobuf.ByteString getMachineTypeLabelBytes() { + java.lang.Object ref = machineTypeLabel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineTypeLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Azure platform's machine type label.
+     * 
+ * + * string machine_type_label = 1; + * + * @param value The machineTypeLabel to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeLabel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineTypeLabel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Azure platform's machine type label.
+     * 
+ * + * string machine_type_label = 1; + * + * @return This builder for chaining. + */ + public Builder clearMachineTypeLabel() { + machineTypeLabel_ = getDefaultInstance().getMachineTypeLabel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Azure platform's machine type label.
+     * 
+ * + * string machine_type_label = 1; + * + * @param value The bytes for machineTypeLabel to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeLabelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineTypeLabel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * The location of the machine in the Azure format.
+     * 
+ * + * string location = 2; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The location of the machine in the Azure format.
+     * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The location of the machine in the Azure format.
+     * 
+ * + * string location = 2; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The location of the machine in the Azure format.
+     * 
+ * + * string location = 2; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The location of the machine in the Azure format.
+     * 
+ * + * string location = 2; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object provisioningState_ = ""; + /** + * + * + *
+     * Azure platform's provisioning state.
+     * 
+ * + * string provisioning_state = 3; + * + * @return The provisioningState. + */ + public java.lang.String getProvisioningState() { + java.lang.Object ref = provisioningState_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provisioningState_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Azure platform's provisioning state.
+     * 
+ * + * string provisioning_state = 3; + * + * @return The bytes for provisioningState. + */ + public com.google.protobuf.ByteString getProvisioningStateBytes() { + java.lang.Object ref = provisioningState_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + provisioningState_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Azure platform's provisioning state.
+     * 
+ * + * string provisioning_state = 3; + * + * @param value The provisioningState to set. + * @return This builder for chaining. + */ + public Builder setProvisioningState(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + provisioningState_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Azure platform's provisioning state.
+     * 
+ * + * string provisioning_state = 3; + * + * @return This builder for chaining. + */ + public Builder clearProvisioningState() { + provisioningState_ = getDefaultInstance().getProvisioningState(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Azure platform's provisioning state.
+     * 
+ * + * string provisioning_state = 3; + * + * @param value The bytes for provisioningState to set. + * @return This builder for chaining. + */ + public Builder setProvisioningStateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + provisioningState_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.AzureVmPlatformDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.AzureVmPlatformDetails) + private static final com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails(); + } + + public static com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureVmPlatformDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AzureVmPlatformDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AzureVmPlatformDetailsOrBuilder.java new file mode 100644 index 000000000000..871852080089 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/AzureVmPlatformDetailsOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface AzureVmPlatformDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.AzureVmPlatformDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Azure platform's machine type label.
+   * 
+ * + * string machine_type_label = 1; + * + * @return The machineTypeLabel. + */ + java.lang.String getMachineTypeLabel(); + /** + * + * + *
+   * Azure platform's machine type label.
+   * 
+ * + * string machine_type_label = 1; + * + * @return The bytes for machineTypeLabel. + */ + com.google.protobuf.ByteString getMachineTypeLabelBytes(); + + /** + * + * + *
+   * The location of the machine in the Azure format.
+   * 
+ * + * string location = 2; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * The location of the machine in the Azure format.
+   * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * Azure platform's provisioning state.
+   * 
+ * + * string provisioning_state = 3; + * + * @return The provisioningState. + */ + java.lang.String getProvisioningState(); + /** + * + * + *
+   * Azure platform's provisioning state.
+   * 
+ * + * string provisioning_state = 3; + * + * @return The bytes for provisioningState. + */ + com.google.protobuf.ByteString getProvisioningStateBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchDeleteAssetsRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchDeleteAssetsRequest.java new file mode 100644 index 000000000000..e876423da1c8 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchDeleteAssetsRequest.java @@ -0,0 +1,1073 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to delete a list of  asset.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest} + */ +public final class BatchDeleteAssetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest) + BatchDeleteAssetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeleteAssetsRequest.newBuilder() to construct. + private BatchDeleteAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeleteAssetsRequest() { + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeleteAssetsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchDeleteAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchDeleteAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest.class, + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for batch asset delete.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for batch asset delete.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. The IDs of the assets to delete.
+   * A maximum of 1000 assets can be deleted in a batch.
+   * Format: projects/{project}/locations/{location}/assets/{name}.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_; + } + /** + * + * + *
+   * Required. The IDs of the assets to delete.
+   * A maximum of 1000 assets can be deleted in a batch.
+   * Format: projects/{project}/locations/{location}/assets/{name}.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+   * Required. The IDs of the assets to delete.
+   * A maximum of 1000 assets can be deleted in a batch.
+   * Format: projects/{project}/locations/{location}/assets/{name}.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+   * Required. The IDs of the assets to delete.
+   * A maximum of 1000 assets can be deleted in a batch.
+   * Format: projects/{project}/locations/{location}/assets/{name}.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_ = false; + /** + * + * + *
+   * Optional. When this value is set to `true` the request is a no-op for
+   * non-existing assets. See https://google.aip.dev/135#delete-if-existing for
+   * additional details. Default value is `false`.
+   * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, names_.getRaw(i)); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest other = + (com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getNamesList().equals(other.getNamesList())) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete a list of  asset.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest) + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchDeleteAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchDeleteAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest.class, + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + allowMissing_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchDeleteAssetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest build() { + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest buildPartial() { + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest result = + new com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + names_.makeImmutable(); + result.names_ = names_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.allowMissing_ = allowMissing_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ |= 0x00000002; + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(s); + break; + } // case 18 + case 24: + { + allowMissing_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for batch asset delete.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for batch asset delete.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for batch asset delete.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for batch asset delete.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for batch asset delete.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNamesIsMutable() { + if (!names_.isModifiable()) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Required. The IDs of the assets to delete.
+     * A maximum of 1000 assets can be deleted in a batch.
+     * Format: projects/{project}/locations/{location}/assets/{name}.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + names_.makeImmutable(); + return names_; + } + /** + * + * + *
+     * Required. The IDs of the assets to delete.
+     * A maximum of 1000 assets can be deleted in a batch.
+     * Format: projects/{project}/locations/{location}/assets/{name}.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+     * Required. The IDs of the assets to delete.
+     * A maximum of 1000 assets can be deleted in a batch.
+     * Format: projects/{project}/locations/{location}/assets/{name}.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+     * Required. The IDs of the assets to delete.
+     * A maximum of 1000 assets can be deleted in a batch.
+     * Format: projects/{project}/locations/{location}/assets/{name}.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + * + * + *
+     * Required. The IDs of the assets to delete.
+     * A maximum of 1000 assets can be deleted in a batch.
+     * Format: projects/{project}/locations/{location}/assets/{name}.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IDs of the assets to delete.
+     * A maximum of 1000 assets can be deleted in a batch.
+     * Format: projects/{project}/locations/{location}/assets/{name}.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IDs of the assets to delete.
+     * A maximum of 1000 assets can be deleted in a batch.
+     * Format: projects/{project}/locations/{location}/assets/{name}.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames(java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, names_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IDs of the assets to delete.
+     * A maximum of 1000 assets can be deleted in a batch.
+     * Format: projects/{project}/locations/{location}/assets/{name}.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IDs of the assets to delete.
+     * A maximum of 1000 assets can be deleted in a batch.
+     * Format: projects/{project}/locations/{location}/assets/{name}.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * Optional. When this value is set to `true` the request is a no-op for
+     * non-existing assets. See https://google.aip.dev/135#delete-if-existing for
+     * additional details. Default value is `false`.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * Optional. When this value is set to `true` the request is a no-op for
+     * non-existing assets. See https://google.aip.dev/135#delete-if-existing for
+     * additional details. Default value is `false`.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When this value is set to `true` the request is a no-op for
+     * non-existing assets. See https://google.aip.dev/135#delete-if-existing for
+     * additional details. Default value is `false`.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + bitField0_ = (bitField0_ & ~0x00000004); + allowMissing_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest) + private static final com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest(); + } + + public static com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteAssetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchDeleteAssetsRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchDeleteAssetsRequestOrBuilder.java new file mode 100644 index 000000000000..58307df86833 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchDeleteAssetsRequestOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface BatchDeleteAssetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for batch asset delete.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for batch asset delete.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The IDs of the assets to delete.
+   * A maximum of 1000 assets can be deleted in a batch.
+   * Format: projects/{project}/locations/{location}/assets/{name}.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + java.util.List getNamesList(); + /** + * + * + *
+   * Required. The IDs of the assets to delete.
+   * A maximum of 1000 assets can be deleted in a batch.
+   * Format: projects/{project}/locations/{location}/assets/{name}.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + int getNamesCount(); + /** + * + * + *
+   * Required. The IDs of the assets to delete.
+   * A maximum of 1000 assets can be deleted in a batch.
+   * Format: projects/{project}/locations/{location}/assets/{name}.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + * + * + *
+   * Required. The IDs of the assets to delete.
+   * A maximum of 1000 assets can be deleted in a batch.
+   * Format: projects/{project}/locations/{location}/assets/{name}.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString getNamesBytes(int index); + + /** + * + * + *
+   * Optional. When this value is set to `true` the request is a no-op for
+   * non-existing assets. See https://google.aip.dev/135#delete-if-existing for
+   * additional details. Default value is `false`.
+   * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsRequest.java new file mode 100644 index 000000000000..151762d1976a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsRequest.java @@ -0,0 +1,1218 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to update a list of assets.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest} + */ +public final class BatchUpdateAssetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest) + BatchUpdateAssetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchUpdateAssetsRequest.newBuilder() to construct. + private BatchUpdateAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchUpdateAssetsRequest() { + parent_ = ""; + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchUpdateAssetsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest.class, + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for batch asset update.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for batch asset update.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List requests_; + /** + * + * + *
+   * Required. The request message specifying the resources to update.
+   * A maximum of 1000 assets can be modified in a batch.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + * + * + *
+   * Required. The request message specifying the resources to update.
+   * A maximum of 1000 assets can be modified in a batch.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + * + * + *
+   * Required. The request message specifying the resources to update.
+   * A maximum of 1000 assets can be modified in a batch.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + * + * + *
+   * Required. The request message specifying the resources to update.
+   * A maximum of 1000 assets can be modified in a batch.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateAssetRequest getRequests(int index) { + return requests_.get(index); + } + /** + * + * + *
+   * Required. The request message specifying the resources to update.
+   * A maximum of 1000 assets can be modified in a batch.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateAssetRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(2, requests_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, requests_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest other = + (com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update a list of assets.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest) + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest.class, + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + } else { + requests_ = null; + requestsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest build() { + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest buildPartial() { + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest result = + new com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest result) { + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000002); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRequestsFieldBuilder() + : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.migrationcenter.v1.UpdateAssetRequest m = + input.readMessage( + com.google.cloud.migrationcenter.v1.UpdateAssetRequest.parser(), + extensionRegistry); + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(m); + } else { + requestsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for batch asset update.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for batch asset update.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for batch asset update.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for batch asset update.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for batch asset update.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List requests_ = + java.util.Collections.emptyList(); + + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + requests_ = + new java.util.ArrayList( + requests_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.UpdateAssetRequest, + com.google.cloud.migrationcenter.v1.UpdateAssetRequest.Builder, + com.google.cloud.migrationcenter.v1.UpdateAssetRequestOrBuilder> + requestsBuilder_; + + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.UpdateAssetRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRequests( + int index, com.google.cloud.migrationcenter.v1.UpdateAssetRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRequests( + int index, com.google.cloud.migrationcenter.v1.UpdateAssetRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests(com.google.cloud.migrationcenter.v1.UpdateAssetRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + int index, com.google.cloud.migrationcenter.v1.UpdateAssetRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + com.google.cloud.migrationcenter.v1.UpdateAssetRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + int index, com.google.cloud.migrationcenter.v1.UpdateAssetRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllRequests( + java.lang.Iterable + values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.UpdateAssetRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.UpdateAssetRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.UpdateAssetRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.UpdateAssetRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.UpdateAssetRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.UpdateAssetRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The request message specifying the resources to update.
+     * A maximum of 1000 assets can be modified in a batch.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.UpdateAssetRequest, + com.google.cloud.migrationcenter.v1.UpdateAssetRequest.Builder, + com.google.cloud.migrationcenter.v1.UpdateAssetRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.UpdateAssetRequest, + com.google.cloud.migrationcenter.v1.UpdateAssetRequest.Builder, + com.google.cloud.migrationcenter.v1.UpdateAssetRequestOrBuilder>( + requests_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + requests_ = null; + } + return requestsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest) + private static final com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest(); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchUpdateAssetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsRequestOrBuilder.java new file mode 100644 index 000000000000..3ba70c536ce6 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface BatchUpdateAssetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for batch asset update.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for batch asset update.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The request message specifying the resources to update.
+   * A maximum of 1000 assets can be modified in a batch.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getRequestsList(); + /** + * + * + *
+   * Required. The request message specifying the resources to update.
+   * A maximum of 1000 assets can be modified in a batch.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.UpdateAssetRequest getRequests(int index); + /** + * + * + *
+   * Required. The request message specifying the resources to update.
+   * A maximum of 1000 assets can be modified in a batch.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getRequestsCount(); + /** + * + * + *
+   * Required. The request message specifying the resources to update.
+   * A maximum of 1000 assets can be modified in a batch.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getRequestsOrBuilderList(); + /** + * + * + *
+   * Required. The request message specifying the resources to update.
+   * A maximum of 1000 assets can be modified in a batch.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.UpdateAssetRequestOrBuilder getRequestsOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsResponse.java new file mode 100644 index 000000000000..9e63249b9f89 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsResponse.java @@ -0,0 +1,963 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Response for updating a list of assets.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse} + */ +public final class BatchUpdateAssetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse) + BatchUpdateAssetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchUpdateAssetsResponse.newBuilder() to construct. + private BatchUpdateAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchUpdateAssetsResponse() { + assets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchUpdateAssetsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse.class, + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse.Builder.class); + } + + public static final int ASSETS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List assets_; + /** + * + * + *
+   * Update asset content.
+   * The content only includes values after field mask being applied.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + @java.lang.Override + public java.util.List getAssetsList() { + return assets_; + } + /** + * + * + *
+   * Update asset content.
+   * The content only includes values after field mask being applied.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + @java.lang.Override + public java.util.List + getAssetsOrBuilderList() { + return assets_; + } + /** + * + * + *
+   * Update asset content.
+   * The content only includes values after field mask being applied.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + @java.lang.Override + public int getAssetsCount() { + return assets_.size(); + } + /** + * + * + *
+   * Update asset content.
+   * The content only includes values after field mask being applied.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Asset getAssets(int index) { + return assets_.get(index); + } + /** + * + * + *
+   * Update asset content.
+   * The content only includes values after field mask being applied.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetOrBuilder getAssetsOrBuilder(int index) { + return assets_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < assets_.size(); i++) { + output.writeMessage(1, assets_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < assets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, assets_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse other = + (com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse) obj; + + if (!getAssetsList().equals(other.getAssetsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAssetsCount() > 0) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssetsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for updating a list of assets.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse) + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse.class, + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + } else { + assets_ = null; + assetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse build() { + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse buildPartial() { + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse result = + new com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse result) { + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assets_ = assets_; + } else { + result.assets_ = assetsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse other) { + if (other + == com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse.getDefaultInstance()) + return this; + if (assetsBuilder_ == null) { + if (!other.assets_.isEmpty()) { + if (assets_.isEmpty()) { + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetsIsMutable(); + assets_.addAll(other.assets_); + } + onChanged(); + } + } else { + if (!other.assets_.isEmpty()) { + if (assetsBuilder_.isEmpty()) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + assetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAssetsFieldBuilder() + : null; + } else { + assetsBuilder_.addAllMessages(other.assets_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.Asset m = + input.readMessage( + com.google.cloud.migrationcenter.v1.Asset.parser(), extensionRegistry); + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(m); + } else { + assetsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List assets_ = + java.util.Collections.emptyList(); + + private void ensureAssetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(assets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Asset, + com.google.cloud.migrationcenter.v1.Asset.Builder, + com.google.cloud.migrationcenter.v1.AssetOrBuilder> + assetsBuilder_; + + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public java.util.List getAssetsList() { + if (assetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(assets_); + } else { + return assetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public int getAssetsCount() { + if (assetsBuilder_ == null) { + return assets_.size(); + } else { + return assetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public com.google.cloud.migrationcenter.v1.Asset getAssets(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder setAssets(int index, com.google.cloud.migrationcenter.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.set(index, value); + onChanged(); + } else { + assetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder setAssets( + int index, com.google.cloud.migrationcenter.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.set(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder addAssets(com.google.cloud.migrationcenter.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(value); + onChanged(); + } else { + assetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder addAssets(int index, com.google.cloud.migrationcenter.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(index, value); + onChanged(); + } else { + assetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder addAssets(com.google.cloud.migrationcenter.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder addAssets( + int index, com.google.cloud.migrationcenter.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder addAllAssets( + java.lang.Iterable values) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assets_); + onChanged(); + } else { + assetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder clearAssets() { + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + assetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder removeAssets(int index) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.remove(index); + onChanged(); + } else { + assetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public com.google.cloud.migrationcenter.v1.Asset.Builder getAssetsBuilder(int index) { + return getAssetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public com.google.cloud.migrationcenter.v1.AssetOrBuilder getAssetsOrBuilder(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public java.util.List + getAssetsOrBuilderList() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assets_); + } + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public com.google.cloud.migrationcenter.v1.Asset.Builder addAssetsBuilder() { + return getAssetsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance()); + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public com.google.cloud.migrationcenter.v1.Asset.Builder addAssetsBuilder(int index) { + return getAssetsFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance()); + } + /** + * + * + *
+     * Update asset content.
+     * The content only includes values after field mask being applied.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public java.util.List + getAssetsBuilderList() { + return getAssetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Asset, + com.google.cloud.migrationcenter.v1.Asset.Builder, + com.google.cloud.migrationcenter.v1.AssetOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Asset, + com.google.cloud.migrationcenter.v1.Asset.Builder, + com.google.cloud.migrationcenter.v1.AssetOrBuilder>( + assets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + assets_ = null; + } + return assetsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse) + private static final com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse(); + } + + public static com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchUpdateAssetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsResponseOrBuilder.java new file mode 100644 index 000000000000..12d8eeda9e50 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BatchUpdateAssetsResponseOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface BatchUpdateAssetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Update asset content.
+   * The content only includes values after field mask being applied.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + java.util.List getAssetsList(); + /** + * + * + *
+   * Update asset content.
+   * The content only includes values after field mask being applied.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + com.google.cloud.migrationcenter.v1.Asset getAssets(int index); + /** + * + * + *
+   * Update asset content.
+   * The content only includes values after field mask being applied.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + int getAssetsCount(); + /** + * + * + *
+   * Update asset content.
+   * The content only includes values after field mask being applied.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + java.util.List + getAssetsOrBuilderList(); + /** + * + * + *
+   * Update asset content.
+   * The content only includes values after field mask being applied.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + com.google.cloud.migrationcenter.v1.AssetOrBuilder getAssetsOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BiosDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BiosDetails.java new file mode 100644 index 000000000000..037e1b1d63d6 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BiosDetails.java @@ -0,0 +1,1603 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Details about the BIOS.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.BiosDetails} + */ +public final class BiosDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.BiosDetails) + BiosDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use BiosDetails.newBuilder() to construct. + private BiosDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BiosDetails() { + biosName_ = ""; + id_ = ""; + manufacturer_ = ""; + version_ = ""; + smbiosUuid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BiosDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BiosDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BiosDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.BiosDetails.class, + com.google.cloud.migrationcenter.v1.BiosDetails.Builder.class); + } + + public static final int BIOS_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object biosName_ = ""; + /** + * + * + *
+   * BIOS name.
+   * 
+ * + * string bios_name = 1; + * + * @return The biosName. + */ + @java.lang.Override + public java.lang.String getBiosName() { + java.lang.Object ref = biosName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + biosName_ = s; + return s; + } + } + /** + * + * + *
+   * BIOS name.
+   * 
+ * + * string bios_name = 1; + * + * @return The bytes for biosName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBiosNameBytes() { + java.lang.Object ref = biosName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + biosName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * BIOS ID.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * BIOS ID.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MANUFACTURER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object manufacturer_ = ""; + /** + * + * + *
+   * BIOS manufacturer.
+   * 
+ * + * string manufacturer = 3; + * + * @return The manufacturer. + */ + @java.lang.Override + public java.lang.String getManufacturer() { + java.lang.Object ref = manufacturer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + manufacturer_ = s; + return s; + } + } + /** + * + * + *
+   * BIOS manufacturer.
+   * 
+ * + * string manufacturer = 3; + * + * @return The bytes for manufacturer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getManufacturerBytes() { + java.lang.Object ref = manufacturer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + manufacturer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * BIOS version.
+   * 
+ * + * string version = 4; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * BIOS version.
+   * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELEASE_DATE_FIELD_NUMBER = 5; + private com.google.type.Date releaseDate_; + /** + * + * + *
+   * BIOS release date.
+   * 
+ * + * .google.type.Date release_date = 5; + * + * @return Whether the releaseDate field is set. + */ + @java.lang.Override + public boolean hasReleaseDate() { + return releaseDate_ != null; + } + /** + * + * + *
+   * BIOS release date.
+   * 
+ * + * .google.type.Date release_date = 5; + * + * @return The releaseDate. + */ + @java.lang.Override + public com.google.type.Date getReleaseDate() { + return releaseDate_ == null ? com.google.type.Date.getDefaultInstance() : releaseDate_; + } + /** + * + * + *
+   * BIOS release date.
+   * 
+ * + * .google.type.Date release_date = 5; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getReleaseDateOrBuilder() { + return releaseDate_ == null ? com.google.type.Date.getDefaultInstance() : releaseDate_; + } + + public static final int SMBIOS_UUID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object smbiosUuid_ = ""; + /** + * + * + *
+   * SMBIOS UUID.
+   * 
+ * + * string smbios_uuid = 6; + * + * @return The smbiosUuid. + */ + @java.lang.Override + public java.lang.String getSmbiosUuid() { + java.lang.Object ref = smbiosUuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + smbiosUuid_ = s; + return s; + } + } + /** + * + * + *
+   * SMBIOS UUID.
+   * 
+ * + * string smbios_uuid = 6; + * + * @return The bytes for smbiosUuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSmbiosUuidBytes() { + java.lang.Object ref = smbiosUuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + smbiosUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(biosName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, biosName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manufacturer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, manufacturer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); + } + if (releaseDate_ != null) { + output.writeMessage(5, getReleaseDate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(smbiosUuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, smbiosUuid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(biosName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, biosName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manufacturer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, manufacturer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); + } + if (releaseDate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReleaseDate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(smbiosUuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, smbiosUuid_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.BiosDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.BiosDetails other = + (com.google.cloud.migrationcenter.v1.BiosDetails) obj; + + if (!getBiosName().equals(other.getBiosName())) return false; + if (!getId().equals(other.getId())) return false; + if (!getManufacturer().equals(other.getManufacturer())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (hasReleaseDate() != other.hasReleaseDate()) return false; + if (hasReleaseDate()) { + if (!getReleaseDate().equals(other.getReleaseDate())) return false; + } + if (!getSmbiosUuid().equals(other.getSmbiosUuid())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BIOS_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBiosName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + MANUFACTURER_FIELD_NUMBER; + hash = (53 * hash) + getManufacturer().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (hasReleaseDate()) { + hash = (37 * hash) + RELEASE_DATE_FIELD_NUMBER; + hash = (53 * hash) + getReleaseDate().hashCode(); + } + hash = (37 * hash) + SMBIOS_UUID_FIELD_NUMBER; + hash = (53 * hash) + getSmbiosUuid().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.BiosDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details about the BIOS.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.BiosDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.BiosDetails) + com.google.cloud.migrationcenter.v1.BiosDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BiosDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BiosDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.BiosDetails.class, + com.google.cloud.migrationcenter.v1.BiosDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.BiosDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + biosName_ = ""; + id_ = ""; + manufacturer_ = ""; + version_ = ""; + releaseDate_ = null; + if (releaseDateBuilder_ != null) { + releaseDateBuilder_.dispose(); + releaseDateBuilder_ = null; + } + smbiosUuid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_BiosDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BiosDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.BiosDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BiosDetails build() { + com.google.cloud.migrationcenter.v1.BiosDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BiosDetails buildPartial() { + com.google.cloud.migrationcenter.v1.BiosDetails result = + new com.google.cloud.migrationcenter.v1.BiosDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.BiosDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.biosName_ = biosName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.manufacturer_ = manufacturer_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.releaseDate_ = + releaseDateBuilder_ == null ? releaseDate_ : releaseDateBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.smbiosUuid_ = smbiosUuid_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.BiosDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.BiosDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.BiosDetails other) { + if (other == com.google.cloud.migrationcenter.v1.BiosDetails.getDefaultInstance()) + return this; + if (!other.getBiosName().isEmpty()) { + biosName_ = other.biosName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getManufacturer().isEmpty()) { + manufacturer_ = other.manufacturer_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasReleaseDate()) { + mergeReleaseDate(other.getReleaseDate()); + } + if (!other.getSmbiosUuid().isEmpty()) { + smbiosUuid_ = other.smbiosUuid_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + biosName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + manufacturer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getReleaseDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + smbiosUuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object biosName_ = ""; + /** + * + * + *
+     * BIOS name.
+     * 
+ * + * string bios_name = 1; + * + * @return The biosName. + */ + public java.lang.String getBiosName() { + java.lang.Object ref = biosName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + biosName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * BIOS name.
+     * 
+ * + * string bios_name = 1; + * + * @return The bytes for biosName. + */ + public com.google.protobuf.ByteString getBiosNameBytes() { + java.lang.Object ref = biosName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + biosName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * BIOS name.
+     * 
+ * + * string bios_name = 1; + * + * @param value The biosName to set. + * @return This builder for chaining. + */ + public Builder setBiosName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + biosName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS name.
+     * 
+ * + * string bios_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearBiosName() { + biosName_ = getDefaultInstance().getBiosName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS name.
+     * 
+ * + * string bios_name = 1; + * + * @param value The bytes for biosName to set. + * @return This builder for chaining. + */ + public Builder setBiosNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + biosName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * BIOS ID.
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * BIOS ID.
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * BIOS ID.
+     * 
+ * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS ID.
+     * 
+ * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS ID.
+     * 
+ * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object manufacturer_ = ""; + /** + * + * + *
+     * BIOS manufacturer.
+     * 
+ * + * string manufacturer = 3; + * + * @return The manufacturer. + */ + public java.lang.String getManufacturer() { + java.lang.Object ref = manufacturer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + manufacturer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * BIOS manufacturer.
+     * 
+ * + * string manufacturer = 3; + * + * @return The bytes for manufacturer. + */ + public com.google.protobuf.ByteString getManufacturerBytes() { + java.lang.Object ref = manufacturer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + manufacturer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * BIOS manufacturer.
+     * 
+ * + * string manufacturer = 3; + * + * @param value The manufacturer to set. + * @return This builder for chaining. + */ + public Builder setManufacturer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + manufacturer_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS manufacturer.
+     * 
+ * + * string manufacturer = 3; + * + * @return This builder for chaining. + */ + public Builder clearManufacturer() { + manufacturer_ = getDefaultInstance().getManufacturer(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS manufacturer.
+     * 
+ * + * string manufacturer = 3; + * + * @param value The bytes for manufacturer to set. + * @return This builder for chaining. + */ + public Builder setManufacturerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + manufacturer_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * BIOS version.
+     * 
+ * + * string version = 4; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * BIOS version.
+     * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * BIOS version.
+     * 
+ * + * string version = 4; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS version.
+     * 
+ * + * string version = 4; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS version.
+     * 
+ * + * string version = 4; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.type.Date releaseDate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + releaseDateBuilder_; + /** + * + * + *
+     * BIOS release date.
+     * 
+ * + * .google.type.Date release_date = 5; + * + * @return Whether the releaseDate field is set. + */ + public boolean hasReleaseDate() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * BIOS release date.
+     * 
+ * + * .google.type.Date release_date = 5; + * + * @return The releaseDate. + */ + public com.google.type.Date getReleaseDate() { + if (releaseDateBuilder_ == null) { + return releaseDate_ == null ? com.google.type.Date.getDefaultInstance() : releaseDate_; + } else { + return releaseDateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * BIOS release date.
+     * 
+ * + * .google.type.Date release_date = 5; + */ + public Builder setReleaseDate(com.google.type.Date value) { + if (releaseDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + releaseDate_ = value; + } else { + releaseDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS release date.
+     * 
+ * + * .google.type.Date release_date = 5; + */ + public Builder setReleaseDate(com.google.type.Date.Builder builderForValue) { + if (releaseDateBuilder_ == null) { + releaseDate_ = builderForValue.build(); + } else { + releaseDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS release date.
+     * 
+ * + * .google.type.Date release_date = 5; + */ + public Builder mergeReleaseDate(com.google.type.Date value) { + if (releaseDateBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && releaseDate_ != null + && releaseDate_ != com.google.type.Date.getDefaultInstance()) { + getReleaseDateBuilder().mergeFrom(value); + } else { + releaseDate_ = value; + } + } else { + releaseDateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS release date.
+     * 
+ * + * .google.type.Date release_date = 5; + */ + public Builder clearReleaseDate() { + bitField0_ = (bitField0_ & ~0x00000010); + releaseDate_ = null; + if (releaseDateBuilder_ != null) { + releaseDateBuilder_.dispose(); + releaseDateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS release date.
+     * 
+ * + * .google.type.Date release_date = 5; + */ + public com.google.type.Date.Builder getReleaseDateBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getReleaseDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * BIOS release date.
+     * 
+ * + * .google.type.Date release_date = 5; + */ + public com.google.type.DateOrBuilder getReleaseDateOrBuilder() { + if (releaseDateBuilder_ != null) { + return releaseDateBuilder_.getMessageOrBuilder(); + } else { + return releaseDate_ == null ? com.google.type.Date.getDefaultInstance() : releaseDate_; + } + } + /** + * + * + *
+     * BIOS release date.
+     * 
+ * + * .google.type.Date release_date = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getReleaseDateFieldBuilder() { + if (releaseDateBuilder_ == null) { + releaseDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getReleaseDate(), getParentForChildren(), isClean()); + releaseDate_ = null; + } + return releaseDateBuilder_; + } + + private java.lang.Object smbiosUuid_ = ""; + /** + * + * + *
+     * SMBIOS UUID.
+     * 
+ * + * string smbios_uuid = 6; + * + * @return The smbiosUuid. + */ + public java.lang.String getSmbiosUuid() { + java.lang.Object ref = smbiosUuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + smbiosUuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * SMBIOS UUID.
+     * 
+ * + * string smbios_uuid = 6; + * + * @return The bytes for smbiosUuid. + */ + public com.google.protobuf.ByteString getSmbiosUuidBytes() { + java.lang.Object ref = smbiosUuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + smbiosUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * SMBIOS UUID.
+     * 
+ * + * string smbios_uuid = 6; + * + * @param value The smbiosUuid to set. + * @return This builder for chaining. + */ + public Builder setSmbiosUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + smbiosUuid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * SMBIOS UUID.
+     * 
+ * + * string smbios_uuid = 6; + * + * @return This builder for chaining. + */ + public Builder clearSmbiosUuid() { + smbiosUuid_ = getDefaultInstance().getSmbiosUuid(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * SMBIOS UUID.
+     * 
+ * + * string smbios_uuid = 6; + * + * @param value The bytes for smbiosUuid to set. + * @return This builder for chaining. + */ + public Builder setSmbiosUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + smbiosUuid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.BiosDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.BiosDetails) + private static final com.google.cloud.migrationcenter.v1.BiosDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.BiosDetails(); + } + + public static com.google.cloud.migrationcenter.v1.BiosDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BiosDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BiosDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BiosDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BiosDetailsOrBuilder.java new file mode 100644 index 000000000000..8c4604a9781b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/BiosDetailsOrBuilder.java @@ -0,0 +1,185 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface BiosDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.BiosDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * BIOS name.
+   * 
+ * + * string bios_name = 1; + * + * @return The biosName. + */ + java.lang.String getBiosName(); + /** + * + * + *
+   * BIOS name.
+   * 
+ * + * string bios_name = 1; + * + * @return The bytes for biosName. + */ + com.google.protobuf.ByteString getBiosNameBytes(); + + /** + * + * + *
+   * BIOS ID.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * BIOS ID.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * BIOS manufacturer.
+   * 
+ * + * string manufacturer = 3; + * + * @return The manufacturer. + */ + java.lang.String getManufacturer(); + /** + * + * + *
+   * BIOS manufacturer.
+   * 
+ * + * string manufacturer = 3; + * + * @return The bytes for manufacturer. + */ + com.google.protobuf.ByteString getManufacturerBytes(); + + /** + * + * + *
+   * BIOS version.
+   * 
+ * + * string version = 4; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * BIOS version.
+   * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * BIOS release date.
+   * 
+ * + * .google.type.Date release_date = 5; + * + * @return Whether the releaseDate field is set. + */ + boolean hasReleaseDate(); + /** + * + * + *
+   * BIOS release date.
+   * 
+ * + * .google.type.Date release_date = 5; + * + * @return The releaseDate. + */ + com.google.type.Date getReleaseDate(); + /** + * + * + *
+   * BIOS release date.
+   * 
+ * + * .google.type.Date release_date = 5; + */ + com.google.type.DateOrBuilder getReleaseDateOrBuilder(); + + /** + * + * + *
+   * SMBIOS UUID.
+   * 
+ * + * string smbios_uuid = 6; + * + * @return The smbiosUuid. + */ + java.lang.String getSmbiosUuid(); + /** + * + * + *
+   * SMBIOS UUID.
+   * 
+ * + * string smbios_uuid = 6; + * + * @return The bytes for smbiosUuid. + */ + com.google.protobuf.ByteString getSmbiosUuidBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CommitmentPlan.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CommitmentPlan.java new file mode 100644 index 000000000000..b778b512739e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CommitmentPlan.java @@ -0,0 +1,200 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * The plan of commitments for VM resource-based committed use discount (CUD).
+ * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.CommitmentPlan} + */ +public enum CommitmentPlan implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified commitment plan.
+   * 
+ * + * COMMITMENT_PLAN_UNSPECIFIED = 0; + */ + COMMITMENT_PLAN_UNSPECIFIED(0), + /** + * + * + *
+   * No commitment plan.
+   * 
+ * + * COMMITMENT_PLAN_NONE = 1; + */ + COMMITMENT_PLAN_NONE(1), + /** + * + * + *
+   * 1 year commitment.
+   * 
+ * + * COMMITMENT_PLAN_ONE_YEAR = 2; + */ + COMMITMENT_PLAN_ONE_YEAR(2), + /** + * + * + *
+   * 3 years commitment.
+   * 
+ * + * COMMITMENT_PLAN_THREE_YEARS = 3; + */ + COMMITMENT_PLAN_THREE_YEARS(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified commitment plan.
+   * 
+ * + * COMMITMENT_PLAN_UNSPECIFIED = 0; + */ + public static final int COMMITMENT_PLAN_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * No commitment plan.
+   * 
+ * + * COMMITMENT_PLAN_NONE = 1; + */ + public static final int COMMITMENT_PLAN_NONE_VALUE = 1; + /** + * + * + *
+   * 1 year commitment.
+   * 
+ * + * COMMITMENT_PLAN_ONE_YEAR = 2; + */ + public static final int COMMITMENT_PLAN_ONE_YEAR_VALUE = 2; + /** + * + * + *
+   * 3 years commitment.
+   * 
+ * + * COMMITMENT_PLAN_THREE_YEARS = 3; + */ + public static final int COMMITMENT_PLAN_THREE_YEARS_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CommitmentPlan valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CommitmentPlan forNumber(int value) { + switch (value) { + case 0: + return COMMITMENT_PLAN_UNSPECIFIED; + case 1: + return COMMITMENT_PLAN_NONE; + case 2: + return COMMITMENT_PLAN_ONE_YEAR; + case 3: + return COMMITMENT_PLAN_THREE_YEARS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CommitmentPlan findValueByNumber(int number) { + return CommitmentPlan.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto.getDescriptor() + .getEnumTypes() + .get(8); + } + + private static final CommitmentPlan[] VALUES = values(); + + public static CommitmentPlan valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CommitmentPlan(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.CommitmentPlan) +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineMigrationTarget.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineMigrationTarget.java new file mode 100644 index 000000000000..412e327eb16f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineMigrationTarget.java @@ -0,0 +1,721 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Compute engine migration target.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget} + */ +public final class ComputeEngineMigrationTarget extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) + ComputeEngineMigrationTargetOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComputeEngineMigrationTarget.newBuilder() to construct. + private ComputeEngineMigrationTarget(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ComputeEngineMigrationTarget() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ComputeEngineMigrationTarget(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEngineMigrationTarget_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEngineMigrationTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.class, + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.Builder.class); + } + + public static final int SHAPE_FIELD_NUMBER = 1; + private com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape_; + /** + * + * + *
+   * Description of the suggested shape for the migration target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + * + * @return Whether the shape field is set. + */ + @java.lang.Override + public boolean hasShape() { + return shape_ != null; + } + /** + * + * + *
+   * Description of the suggested shape for the migration target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + * + * @return The shape. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor getShape() { + return shape_ == null + ? com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.getDefaultInstance() + : shape_; + } + /** + * + * + *
+   * Description of the suggested shape for the migration target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptorOrBuilder + getShapeOrBuilder() { + return shape_ == null + ? com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.getDefaultInstance() + : shape_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (shape_ != null) { + output.writeMessage(1, getShape()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (shape_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getShape()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget other = + (com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) obj; + + if (hasShape() != other.hasShape()) return false; + if (hasShape()) { + if (!getShape().equals(other.getShape())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasShape()) { + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShape().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Compute engine migration target.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTargetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEngineMigrationTarget_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEngineMigrationTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.class, + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + shape_ = null; + if (shapeBuilder_ != null) { + shapeBuilder_.dispose(); + shapeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEngineMigrationTarget_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget build() { + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget buildPartial() { + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget result = + new com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.shape_ = shapeBuilder_ == null ? shape_ : shapeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget other) { + if (other + == com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.getDefaultInstance()) + return this; + if (other.hasShape()) { + mergeShape(other.getShape()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getShapeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor, + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.Builder, + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptorOrBuilder> + shapeBuilder_; + /** + * + * + *
+     * Description of the suggested shape for the migration target.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + * + * @return Whether the shape field is set. + */ + public boolean hasShape() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Description of the suggested shape for the migration target.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + * + * @return The shape. + */ + public com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor getShape() { + if (shapeBuilder_ == null) { + return shape_ == null + ? com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.getDefaultInstance() + : shape_; + } else { + return shapeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Description of the suggested shape for the migration target.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + */ + public Builder setShape( + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shape_ = value; + } else { + shapeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the suggested shape for the migration target.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + */ + public Builder setShape( + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.Builder builderForValue) { + if (shapeBuilder_ == null) { + shape_ = builderForValue.build(); + } else { + shapeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the suggested shape for the migration target.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + */ + public Builder mergeShape( + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor value) { + if (shapeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && shape_ != null + && shape_ + != com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor + .getDefaultInstance()) { + getShapeBuilder().mergeFrom(value); + } else { + shape_ = value; + } + } else { + shapeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the suggested shape for the migration target.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + */ + public Builder clearShape() { + bitField0_ = (bitField0_ & ~0x00000001); + shape_ = null; + if (shapeBuilder_ != null) { + shapeBuilder_.dispose(); + shapeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the suggested shape for the migration target.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + */ + public com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.Builder + getShapeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getShapeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Description of the suggested shape for the migration target.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + */ + public com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptorOrBuilder + getShapeOrBuilder() { + if (shapeBuilder_ != null) { + return shapeBuilder_.getMessageOrBuilder(); + } else { + return shape_ == null + ? com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.getDefaultInstance() + : shape_; + } + } + /** + * + * + *
+     * Description of the suggested shape for the migration target.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor, + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.Builder, + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptorOrBuilder> + getShapeFieldBuilder() { + if (shapeBuilder_ == null) { + shapeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor, + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.Builder, + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptorOrBuilder>( + getShape(), getParentForChildren(), isClean()); + shape_ = null; + } + return shapeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) + private static final com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget(); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeEngineMigrationTarget parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineMigrationTargetOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineMigrationTargetOrBuilder.java new file mode 100644 index 000000000000..a8161353c542 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineMigrationTargetOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ComputeEngineMigrationTargetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Description of the suggested shape for the migration target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + * + * @return Whether the shape field is set. + */ + boolean hasShape(); + /** + * + * + *
+   * Description of the suggested shape for the migration target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + * + * @return The shape. + */ + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor getShape(); + /** + * + * + *
+   * Description of the suggested shape for the migration target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + */ + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptorOrBuilder getShapeOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEnginePreferences.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEnginePreferences.java new file mode 100644 index 000000000000..e300cdd18b68 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEnginePreferences.java @@ -0,0 +1,886 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * The user preferences relating to Compute Engine target platform.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ComputeEnginePreferences} + */ +public final class ComputeEnginePreferences extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ComputeEnginePreferences) + ComputeEnginePreferencesOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComputeEnginePreferences.newBuilder() to construct. + private ComputeEnginePreferences(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ComputeEnginePreferences() { + licenseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ComputeEnginePreferences(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEnginePreferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEnginePreferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.class, + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.Builder.class); + } + + public static final int MACHINE_PREFERENCES_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.MachinePreferences machinePreferences_; + /** + * + * + *
+   * Preferences concerning the machine types to consider on Compute Engine.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + * + * @return Whether the machinePreferences field is set. + */ + @java.lang.Override + public boolean hasMachinePreferences() { + return machinePreferences_ != null; + } + /** + * + * + *
+   * Preferences concerning the machine types to consider on Compute Engine.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + * + * @return The machinePreferences. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachinePreferences getMachinePreferences() { + return machinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.MachinePreferences.getDefaultInstance() + : machinePreferences_; + } + /** + * + * + *
+   * Preferences concerning the machine types to consider on Compute Engine.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachinePreferencesOrBuilder + getMachinePreferencesOrBuilder() { + return machinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.MachinePreferences.getDefaultInstance() + : machinePreferences_; + } + + public static final int LICENSE_TYPE_FIELD_NUMBER = 3; + private int licenseType_ = 0; + /** + * + * + *
+   * License type to consider when calculating costs for virtual machine
+   * insights and recommendations. If unspecified, costs are calculated
+   * based on the default licensing plan.
+   * 
+ * + * .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + * + * @return The enum numeric value on the wire for licenseType. + */ + @java.lang.Override + public int getLicenseTypeValue() { + return licenseType_; + } + /** + * + * + *
+   * License type to consider when calculating costs for virtual machine
+   * insights and recommendations. If unspecified, costs are calculated
+   * based on the default licensing plan.
+   * 
+ * + * .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + * + * @return The licenseType. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.LicenseType getLicenseType() { + com.google.cloud.migrationcenter.v1.LicenseType result = + com.google.cloud.migrationcenter.v1.LicenseType.forNumber(licenseType_); + return result == null ? com.google.cloud.migrationcenter.v1.LicenseType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (machinePreferences_ != null) { + output.writeMessage(2, getMachinePreferences()); + } + if (licenseType_ + != com.google.cloud.migrationcenter.v1.LicenseType.LICENSE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, licenseType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (machinePreferences_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMachinePreferences()); + } + if (licenseType_ + != com.google.cloud.migrationcenter.v1.LicenseType.LICENSE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, licenseType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ComputeEnginePreferences)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences other = + (com.google.cloud.migrationcenter.v1.ComputeEnginePreferences) obj; + + if (hasMachinePreferences() != other.hasMachinePreferences()) return false; + if (hasMachinePreferences()) { + if (!getMachinePreferences().equals(other.getMachinePreferences())) return false; + } + if (licenseType_ != other.licenseType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMachinePreferences()) { + hash = (37 * hash) + MACHINE_PREFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getMachinePreferences().hashCode(); + } + hash = (37 * hash) + LICENSE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + licenseType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The user preferences relating to Compute Engine target platform.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ComputeEnginePreferences} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ComputeEnginePreferences) + com.google.cloud.migrationcenter.v1.ComputeEnginePreferencesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEnginePreferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEnginePreferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.class, + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + machinePreferences_ = null; + if (machinePreferencesBuilder_ != null) { + machinePreferencesBuilder_.dispose(); + machinePreferencesBuilder_ = null; + } + licenseType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEnginePreferences_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEnginePreferences + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEnginePreferences build() { + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEnginePreferences buildPartial() { + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences result = + new com.google.cloud.migrationcenter.v1.ComputeEnginePreferences(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.machinePreferences_ = + machinePreferencesBuilder_ == null + ? machinePreferences_ + : machinePreferencesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.licenseType_ = licenseType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ComputeEnginePreferences) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ComputeEnginePreferences) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ComputeEnginePreferences other) { + if (other + == com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.getDefaultInstance()) + return this; + if (other.hasMachinePreferences()) { + mergeMachinePreferences(other.getMachinePreferences()); + } + if (other.licenseType_ != 0) { + setLicenseTypeValue(other.getLicenseTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + getMachinePreferencesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 24: + { + licenseType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.migrationcenter.v1.MachinePreferences machinePreferences_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachinePreferences, + com.google.cloud.migrationcenter.v1.MachinePreferences.Builder, + com.google.cloud.migrationcenter.v1.MachinePreferencesOrBuilder> + machinePreferencesBuilder_; + /** + * + * + *
+     * Preferences concerning the machine types to consider on Compute Engine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + * + * @return Whether the machinePreferences field is set. + */ + public boolean hasMachinePreferences() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Preferences concerning the machine types to consider on Compute Engine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + * + * @return The machinePreferences. + */ + public com.google.cloud.migrationcenter.v1.MachinePreferences getMachinePreferences() { + if (machinePreferencesBuilder_ == null) { + return machinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.MachinePreferences.getDefaultInstance() + : machinePreferences_; + } else { + return machinePreferencesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Preferences concerning the machine types to consider on Compute Engine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + */ + public Builder setMachinePreferences( + com.google.cloud.migrationcenter.v1.MachinePreferences value) { + if (machinePreferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + machinePreferences_ = value; + } else { + machinePreferencesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Preferences concerning the machine types to consider on Compute Engine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + */ + public Builder setMachinePreferences( + com.google.cloud.migrationcenter.v1.MachinePreferences.Builder builderForValue) { + if (machinePreferencesBuilder_ == null) { + machinePreferences_ = builderForValue.build(); + } else { + machinePreferencesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Preferences concerning the machine types to consider on Compute Engine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + */ + public Builder mergeMachinePreferences( + com.google.cloud.migrationcenter.v1.MachinePreferences value) { + if (machinePreferencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && machinePreferences_ != null + && machinePreferences_ + != com.google.cloud.migrationcenter.v1.MachinePreferences.getDefaultInstance()) { + getMachinePreferencesBuilder().mergeFrom(value); + } else { + machinePreferences_ = value; + } + } else { + machinePreferencesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Preferences concerning the machine types to consider on Compute Engine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + */ + public Builder clearMachinePreferences() { + bitField0_ = (bitField0_ & ~0x00000001); + machinePreferences_ = null; + if (machinePreferencesBuilder_ != null) { + machinePreferencesBuilder_.dispose(); + machinePreferencesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Preferences concerning the machine types to consider on Compute Engine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + */ + public com.google.cloud.migrationcenter.v1.MachinePreferences.Builder + getMachinePreferencesBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getMachinePreferencesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Preferences concerning the machine types to consider on Compute Engine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + */ + public com.google.cloud.migrationcenter.v1.MachinePreferencesOrBuilder + getMachinePreferencesOrBuilder() { + if (machinePreferencesBuilder_ != null) { + return machinePreferencesBuilder_.getMessageOrBuilder(); + } else { + return machinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.MachinePreferences.getDefaultInstance() + : machinePreferences_; + } + } + /** + * + * + *
+     * Preferences concerning the machine types to consider on Compute Engine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachinePreferences, + com.google.cloud.migrationcenter.v1.MachinePreferences.Builder, + com.google.cloud.migrationcenter.v1.MachinePreferencesOrBuilder> + getMachinePreferencesFieldBuilder() { + if (machinePreferencesBuilder_ == null) { + machinePreferencesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachinePreferences, + com.google.cloud.migrationcenter.v1.MachinePreferences.Builder, + com.google.cloud.migrationcenter.v1.MachinePreferencesOrBuilder>( + getMachinePreferences(), getParentForChildren(), isClean()); + machinePreferences_ = null; + } + return machinePreferencesBuilder_; + } + + private int licenseType_ = 0; + /** + * + * + *
+     * License type to consider when calculating costs for virtual machine
+     * insights and recommendations. If unspecified, costs are calculated
+     * based on the default licensing plan.
+     * 
+ * + * .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + * + * @return The enum numeric value on the wire for licenseType. + */ + @java.lang.Override + public int getLicenseTypeValue() { + return licenseType_; + } + /** + * + * + *
+     * License type to consider when calculating costs for virtual machine
+     * insights and recommendations. If unspecified, costs are calculated
+     * based on the default licensing plan.
+     * 
+ * + * .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + * + * @param value The enum numeric value on the wire for licenseType to set. + * @return This builder for chaining. + */ + public Builder setLicenseTypeValue(int value) { + licenseType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * License type to consider when calculating costs for virtual machine
+     * insights and recommendations. If unspecified, costs are calculated
+     * based on the default licensing plan.
+     * 
+ * + * .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + * + * @return The licenseType. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.LicenseType getLicenseType() { + com.google.cloud.migrationcenter.v1.LicenseType result = + com.google.cloud.migrationcenter.v1.LicenseType.forNumber(licenseType_); + return result == null ? com.google.cloud.migrationcenter.v1.LicenseType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * License type to consider when calculating costs for virtual machine
+     * insights and recommendations. If unspecified, costs are calculated
+     * based on the default licensing plan.
+     * 
+ * + * .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + * + * @param value The licenseType to set. + * @return This builder for chaining. + */ + public Builder setLicenseType(com.google.cloud.migrationcenter.v1.LicenseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + licenseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * License type to consider when calculating costs for virtual machine
+     * insights and recommendations. If unspecified, costs are calculated
+     * based on the default licensing plan.
+     * 
+ * + * .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearLicenseType() { + bitField0_ = (bitField0_ & ~0x00000002); + licenseType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ComputeEnginePreferences) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ComputeEnginePreferences) + private static final com.google.cloud.migrationcenter.v1.ComputeEnginePreferences + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ComputeEnginePreferences(); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEnginePreferences getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeEnginePreferences parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEnginePreferences getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEnginePreferencesOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEnginePreferencesOrBuilder.java new file mode 100644 index 000000000000..0981846acb41 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEnginePreferencesOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ComputeEnginePreferencesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ComputeEnginePreferences) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Preferences concerning the machine types to consider on Compute Engine.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + * + * @return Whether the machinePreferences field is set. + */ + boolean hasMachinePreferences(); + /** + * + * + *
+   * Preferences concerning the machine types to consider on Compute Engine.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + * + * @return The machinePreferences. + */ + com.google.cloud.migrationcenter.v1.MachinePreferences getMachinePreferences(); + /** + * + * + *
+   * Preferences concerning the machine types to consider on Compute Engine.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + */ + com.google.cloud.migrationcenter.v1.MachinePreferencesOrBuilder getMachinePreferencesOrBuilder(); + + /** + * + * + *
+   * License type to consider when calculating costs for virtual machine
+   * insights and recommendations. If unspecified, costs are calculated
+   * based on the default licensing plan.
+   * 
+ * + * .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + * + * @return The enum numeric value on the wire for licenseType. + */ + int getLicenseTypeValue(); + /** + * + * + *
+   * License type to consider when calculating costs for virtual machine
+   * insights and recommendations. If unspecified, costs are calculated
+   * based on the default licensing plan.
+   * 
+ * + * .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + * + * @return The licenseType. + */ + com.google.cloud.migrationcenter.v1.LicenseType getLicenseType(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineShapeDescriptor.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineShapeDescriptor.java new file mode 100644 index 000000000000..059a96c11427 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineShapeDescriptor.java @@ -0,0 +1,1093 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Compute Engine target shape descriptor.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor} + */ +public final class ComputeEngineShapeDescriptor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor) + ComputeEngineShapeDescriptorOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComputeEngineShapeDescriptor.newBuilder() to construct. + private ComputeEngineShapeDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ComputeEngineShapeDescriptor() { + series_ = ""; + machineType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ComputeEngineShapeDescriptor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEngineShapeDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEngineShapeDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.class, + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.Builder.class); + } + + public static final int MEMORY_MB_FIELD_NUMBER = 1; + private int memoryMb_ = 0; + /** + * + * + *
+   * Memory in mebibytes.
+   * 
+ * + * int32 memory_mb = 1; + * + * @return The memoryMb. + */ + @java.lang.Override + public int getMemoryMb() { + return memoryMb_; + } + + public static final int PHYSICAL_CORE_COUNT_FIELD_NUMBER = 2; + private int physicalCoreCount_ = 0; + /** + * + * + *
+   * Number of physical cores.
+   * 
+ * + * int32 physical_core_count = 2; + * + * @return The physicalCoreCount. + */ + @java.lang.Override + public int getPhysicalCoreCount() { + return physicalCoreCount_; + } + + public static final int LOGICAL_CORE_COUNT_FIELD_NUMBER = 3; + private int logicalCoreCount_ = 0; + /** + * + * + *
+   * Number of logical cores.
+   * 
+ * + * int32 logical_core_count = 3; + * + * @return The logicalCoreCount. + */ + @java.lang.Override + public int getLogicalCoreCount() { + return logicalCoreCount_; + } + + public static final int SERIES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object series_ = ""; + /** + * + * + *
+   * Compute Engine machine series.
+   * 
+ * + * string series = 4; + * + * @return The series. + */ + @java.lang.Override + public java.lang.String getSeries() { + java.lang.Object ref = series_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + series_ = s; + return s; + } + } + /** + * + * + *
+   * Compute Engine machine series.
+   * 
+ * + * string series = 4; + * + * @return The bytes for series. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineType_ = ""; + /** + * + * + *
+   * Compute Engine machine type.
+   * 
+ * + * string machine_type = 5; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Compute Engine machine type.
+   * 
+ * + * string machine_type = 5; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (memoryMb_ != 0) { + output.writeInt32(1, memoryMb_); + } + if (physicalCoreCount_ != 0) { + output.writeInt32(2, physicalCoreCount_); + } + if (logicalCoreCount_ != 0) { + output.writeInt32(3, logicalCoreCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, machineType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (memoryMb_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, memoryMb_); + } + if (physicalCoreCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, physicalCoreCount_); + } + if (logicalCoreCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, logicalCoreCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, machineType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor other = + (com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor) obj; + + if (getMemoryMb() != other.getMemoryMb()) return false; + if (getPhysicalCoreCount() != other.getPhysicalCoreCount()) return false; + if (getLogicalCoreCount() != other.getLogicalCoreCount()) return false; + if (!getSeries().equals(other.getSeries())) return false; + if (!getMachineType().equals(other.getMachineType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MEMORY_MB_FIELD_NUMBER; + hash = (53 * hash) + getMemoryMb(); + hash = (37 * hash) + PHYSICAL_CORE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getPhysicalCoreCount(); + hash = (37 * hash) + LOGICAL_CORE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getLogicalCoreCount(); + hash = (37 * hash) + SERIES_FIELD_NUMBER; + hash = (53 * hash) + getSeries().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Compute Engine target shape descriptor.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor) + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEngineShapeDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEngineShapeDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.class, + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + memoryMb_ = 0; + physicalCoreCount_ = 0; + logicalCoreCount_ = 0; + series_ = ""; + machineType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ComputeEngineShapeDescriptor_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor build() { + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor buildPartial() { + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor result = + new com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.memoryMb_ = memoryMb_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.physicalCoreCount_ = physicalCoreCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.logicalCoreCount_ = logicalCoreCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.series_ = series_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.machineType_ = machineType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor other) { + if (other + == com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor.getDefaultInstance()) + return this; + if (other.getMemoryMb() != 0) { + setMemoryMb(other.getMemoryMb()); + } + if (other.getPhysicalCoreCount() != 0) { + setPhysicalCoreCount(other.getPhysicalCoreCount()); + } + if (other.getLogicalCoreCount() != 0) { + setLogicalCoreCount(other.getLogicalCoreCount()); + } + if (!other.getSeries().isEmpty()) { + series_ = other.series_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + memoryMb_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + physicalCoreCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + logicalCoreCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + series_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int memoryMb_; + /** + * + * + *
+     * Memory in mebibytes.
+     * 
+ * + * int32 memory_mb = 1; + * + * @return The memoryMb. + */ + @java.lang.Override + public int getMemoryMb() { + return memoryMb_; + } + /** + * + * + *
+     * Memory in mebibytes.
+     * 
+ * + * int32 memory_mb = 1; + * + * @param value The memoryMb to set. + * @return This builder for chaining. + */ + public Builder setMemoryMb(int value) { + + memoryMb_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Memory in mebibytes.
+     * 
+ * + * int32 memory_mb = 1; + * + * @return This builder for chaining. + */ + public Builder clearMemoryMb() { + bitField0_ = (bitField0_ & ~0x00000001); + memoryMb_ = 0; + onChanged(); + return this; + } + + private int physicalCoreCount_; + /** + * + * + *
+     * Number of physical cores.
+     * 
+ * + * int32 physical_core_count = 2; + * + * @return The physicalCoreCount. + */ + @java.lang.Override + public int getPhysicalCoreCount() { + return physicalCoreCount_; + } + /** + * + * + *
+     * Number of physical cores.
+     * 
+ * + * int32 physical_core_count = 2; + * + * @param value The physicalCoreCount to set. + * @return This builder for chaining. + */ + public Builder setPhysicalCoreCount(int value) { + + physicalCoreCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of physical cores.
+     * 
+ * + * int32 physical_core_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearPhysicalCoreCount() { + bitField0_ = (bitField0_ & ~0x00000002); + physicalCoreCount_ = 0; + onChanged(); + return this; + } + + private int logicalCoreCount_; + /** + * + * + *
+     * Number of logical cores.
+     * 
+ * + * int32 logical_core_count = 3; + * + * @return The logicalCoreCount. + */ + @java.lang.Override + public int getLogicalCoreCount() { + return logicalCoreCount_; + } + /** + * + * + *
+     * Number of logical cores.
+     * 
+ * + * int32 logical_core_count = 3; + * + * @param value The logicalCoreCount to set. + * @return This builder for chaining. + */ + public Builder setLogicalCoreCount(int value) { + + logicalCoreCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of logical cores.
+     * 
+ * + * int32 logical_core_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearLogicalCoreCount() { + bitField0_ = (bitField0_ & ~0x00000004); + logicalCoreCount_ = 0; + onChanged(); + return this; + } + + private java.lang.Object series_ = ""; + /** + * + * + *
+     * Compute Engine machine series.
+     * 
+ * + * string series = 4; + * + * @return The series. + */ + public java.lang.String getSeries() { + java.lang.Object ref = series_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + series_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Compute Engine machine series.
+     * 
+ * + * string series = 4; + * + * @return The bytes for series. + */ + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Compute Engine machine series.
+     * 
+ * + * string series = 4; + * + * @param value The series to set. + * @return This builder for chaining. + */ + public Builder setSeries(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + series_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Compute Engine machine series.
+     * 
+ * + * string series = 4; + * + * @return This builder for chaining. + */ + public Builder clearSeries() { + series_ = getDefaultInstance().getSeries(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Compute Engine machine series.
+     * 
+ * + * string series = 4; + * + * @param value The bytes for series to set. + * @return This builder for chaining. + */ + public Builder setSeriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + series_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Compute Engine machine type.
+     * 
+ * + * string machine_type = 5; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Compute Engine machine type.
+     * 
+ * + * string machine_type = 5; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Compute Engine machine type.
+     * 
+ * + * string machine_type = 5; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Compute Engine machine type.
+     * 
+ * + * string machine_type = 5; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + machineType_ = getDefaultInstance().getMachineType(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Compute Engine machine type.
+     * 
+ * + * string machine_type = 5; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor) + private static final com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor(); + } + + public static com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeEngineShapeDescriptor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineShapeDescriptorOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineShapeDescriptorOrBuilder.java new file mode 100644 index 000000000000..60f8efc7ef43 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ComputeEngineShapeDescriptorOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ComputeEngineShapeDescriptorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Memory in mebibytes.
+   * 
+ * + * int32 memory_mb = 1; + * + * @return The memoryMb. + */ + int getMemoryMb(); + + /** + * + * + *
+   * Number of physical cores.
+   * 
+ * + * int32 physical_core_count = 2; + * + * @return The physicalCoreCount. + */ + int getPhysicalCoreCount(); + + /** + * + * + *
+   * Number of logical cores.
+   * 
+ * + * int32 logical_core_count = 3; + * + * @return The logicalCoreCount. + */ + int getLogicalCoreCount(); + + /** + * + * + *
+   * Compute Engine machine series.
+   * 
+ * + * string series = 4; + * + * @return The series. + */ + java.lang.String getSeries(); + /** + * + * + *
+   * Compute Engine machine series.
+   * 
+ * + * string series = 4; + * + * @return The bytes for series. + */ + com.google.protobuf.ByteString getSeriesBytes(); + + /** + * + * + *
+   * Compute Engine machine type.
+   * 
+ * + * string machine_type = 5; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Compute Engine machine type.
+   * 
+ * + * string machine_type = 5; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CpuUsageSample.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CpuUsageSample.java new file mode 100644 index 000000000000..45091fda88ad --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CpuUsageSample.java @@ -0,0 +1,539 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * CPU usage sample.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CpuUsageSample} + */ +public final class CpuUsageSample extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.CpuUsageSample) + CpuUsageSampleOrBuilder { + private static final long serialVersionUID = 0L; + // Use CpuUsageSample.newBuilder() to construct. + private CpuUsageSample(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CpuUsageSample() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CpuUsageSample(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CpuUsageSample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CpuUsageSample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CpuUsageSample.class, + com.google.cloud.migrationcenter.v1.CpuUsageSample.Builder.class); + } + + public static final int UTILIZED_PERCENTAGE_FIELD_NUMBER = 1; + private float utilizedPercentage_ = 0F; + /** + * + * + *
+   * Percentage of total CPU capacity utilized. Must be in the interval [0,
+   * 100]. On most systems can be calculated using 100 - idle percentage.
+   * 
+ * + * float utilized_percentage = 1; + * + * @return The utilizedPercentage. + */ + @java.lang.Override + public float getUtilizedPercentage() { + return utilizedPercentage_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(utilizedPercentage_) != 0) { + output.writeFloat(1, utilizedPercentage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(utilizedPercentage_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, utilizedPercentage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.CpuUsageSample)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.CpuUsageSample other = + (com.google.cloud.migrationcenter.v1.CpuUsageSample) obj; + + if (java.lang.Float.floatToIntBits(getUtilizedPercentage()) + != java.lang.Float.floatToIntBits(other.getUtilizedPercentage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + UTILIZED_PERCENTAGE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getUtilizedPercentage()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.CpuUsageSample prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * CPU usage sample.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CpuUsageSample} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.CpuUsageSample) + com.google.cloud.migrationcenter.v1.CpuUsageSampleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CpuUsageSample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CpuUsageSample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CpuUsageSample.class, + com.google.cloud.migrationcenter.v1.CpuUsageSample.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.CpuUsageSample.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + utilizedPercentage_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CpuUsageSample_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CpuUsageSample getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.CpuUsageSample.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CpuUsageSample build() { + com.google.cloud.migrationcenter.v1.CpuUsageSample result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CpuUsageSample buildPartial() { + com.google.cloud.migrationcenter.v1.CpuUsageSample result = + new com.google.cloud.migrationcenter.v1.CpuUsageSample(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.CpuUsageSample result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.utilizedPercentage_ = utilizedPercentage_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.CpuUsageSample) { + return mergeFrom((com.google.cloud.migrationcenter.v1.CpuUsageSample) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.CpuUsageSample other) { + if (other == com.google.cloud.migrationcenter.v1.CpuUsageSample.getDefaultInstance()) + return this; + if (other.getUtilizedPercentage() != 0F) { + setUtilizedPercentage(other.getUtilizedPercentage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + utilizedPercentage_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float utilizedPercentage_; + /** + * + * + *
+     * Percentage of total CPU capacity utilized. Must be in the interval [0,
+     * 100]. On most systems can be calculated using 100 - idle percentage.
+     * 
+ * + * float utilized_percentage = 1; + * + * @return The utilizedPercentage. + */ + @java.lang.Override + public float getUtilizedPercentage() { + return utilizedPercentage_; + } + /** + * + * + *
+     * Percentage of total CPU capacity utilized. Must be in the interval [0,
+     * 100]. On most systems can be calculated using 100 - idle percentage.
+     * 
+ * + * float utilized_percentage = 1; + * + * @param value The utilizedPercentage to set. + * @return This builder for chaining. + */ + public Builder setUtilizedPercentage(float value) { + + utilizedPercentage_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Percentage of total CPU capacity utilized. Must be in the interval [0,
+     * 100]. On most systems can be calculated using 100 - idle percentage.
+     * 
+ * + * float utilized_percentage = 1; + * + * @return This builder for chaining. + */ + public Builder clearUtilizedPercentage() { + bitField0_ = (bitField0_ & ~0x00000001); + utilizedPercentage_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.CpuUsageSample) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.CpuUsageSample) + private static final com.google.cloud.migrationcenter.v1.CpuUsageSample DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.CpuUsageSample(); + } + + public static com.google.cloud.migrationcenter.v1.CpuUsageSample getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CpuUsageSample parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CpuUsageSample getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CpuUsageSampleOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CpuUsageSampleOrBuilder.java new file mode 100644 index 000000000000..65dcb1efbb1a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CpuUsageSampleOrBuilder.java @@ -0,0 +1,39 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface CpuUsageSampleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.CpuUsageSample) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Percentage of total CPU capacity utilized. Must be in the interval [0,
+   * 100]. On most systems can be calculated using 100 - idle percentage.
+   * 
+ * + * float utilized_percentage = 1; + * + * @return The utilizedPercentage. + */ + float getUtilizedPercentage(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateGroupRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateGroupRequest.java new file mode 100644 index 000000000000..e60e9e4e02ce --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateGroupRequest.java @@ -0,0 +1,1399 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to create a group.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateGroupRequest} + */ +public final class CreateGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.CreateGroupRequest) + CreateGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateGroupRequest.newBuilder() to construct. + private CreateGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateGroupRequest() { + parent_ = ""; + groupId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateGroupRequest.class, + com.google.cloud.migrationcenter.v1.CreateGroupRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + * + * + *
+   * Required. User specified ID for the group. It will become the last
+   * component of the group name. The ID must be unique within the project, must
+   * conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The ID must match the regular expression:
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User specified ID for the group. It will become the last
+   * component of the group name. The ID must be unique within the project, must
+   * conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The ID must match the regular expression:
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.Group group_; + /** + * + * + *
+   * Required. The group resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the group field is set. + */ + @java.lang.Override + public boolean hasGroup() { + return group_ != null; + } + /** + * + * + *
+   * Required. The group resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The group. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Group getGroup() { + return group_ == null ? com.google.cloud.migrationcenter.v1.Group.getDefaultInstance() : group_; + } + /** + * + * + *
+   * Required. The group resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GroupOrBuilder getGroupOrBuilder() { + return group_ == null ? com.google.cloud.migrationcenter.v1.Group.getDefaultInstance() : group_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, groupId_); + } + if (group_ != null) { + output.writeMessage(3, getGroup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, groupId_); + } + if (group_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGroup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.CreateGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.CreateGroupRequest other = + (com.google.cloud.migrationcenter.v1.CreateGroupRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getGroupId().equals(other.getGroupId())) return false; + if (hasGroup() != other.hasGroup()) return false; + if (hasGroup()) { + if (!getGroup().equals(other.getGroup())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (hasGroup()) { + hash = (37 * hash) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.CreateGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create a group.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.CreateGroupRequest) + com.google.cloud.migrationcenter.v1.CreateGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateGroupRequest.class, + com.google.cloud.migrationcenter.v1.CreateGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.CreateGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + groupId_ = ""; + group_ = null; + if (groupBuilder_ != null) { + groupBuilder_.dispose(); + groupBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateGroupRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.CreateGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateGroupRequest build() { + com.google.cloud.migrationcenter.v1.CreateGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateGroupRequest buildPartial() { + com.google.cloud.migrationcenter.v1.CreateGroupRequest result = + new com.google.cloud.migrationcenter.v1.CreateGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.CreateGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.group_ = groupBuilder_ == null ? group_ : groupBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.CreateGroupRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.CreateGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.CreateGroupRequest other) { + if (other == com.google.cloud.migrationcenter.v1.CreateGroupRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasGroup()) { + mergeGroup(other.getGroup()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getGroupFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object groupId_ = ""; + /** + * + * + *
+     * Required. User specified ID for the group. It will become the last
+     * component of the group name. The ID must be unique within the project, must
+     * conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The ID must match the regular expression:
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User specified ID for the group. It will become the last
+     * component of the group name. The ID must be unique within the project, must
+     * conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The ID must match the regular expression:
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User specified ID for the group. It will become the last
+     * component of the group name. The ID must be unique within the project, must
+     * conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The ID must match the regular expression:
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + groupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User specified ID for the group. It will become the last
+     * component of the group name. The ID must be unique within the project, must
+     * conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The ID must match the regular expression:
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User specified ID for the group. It will become the last
+     * component of the group name. The ID must be unique within the project, must
+     * conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The ID must match the regular expression:
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.Group group_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Group, + com.google.cloud.migrationcenter.v1.Group.Builder, + com.google.cloud.migrationcenter.v1.GroupOrBuilder> + groupBuilder_; + /** + * + * + *
+     * Required. The group resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the group field is set. + */ + public boolean hasGroup() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The group resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The group. + */ + public com.google.cloud.migrationcenter.v1.Group getGroup() { + if (groupBuilder_ == null) { + return group_ == null + ? com.google.cloud.migrationcenter.v1.Group.getDefaultInstance() + : group_; + } else { + return groupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The group resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGroup(com.google.cloud.migrationcenter.v1.Group value) { + if (groupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + group_ = value; + } else { + groupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The group resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGroup(com.google.cloud.migrationcenter.v1.Group.Builder builderForValue) { + if (groupBuilder_ == null) { + group_ = builderForValue.build(); + } else { + groupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The group resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeGroup(com.google.cloud.migrationcenter.v1.Group value) { + if (groupBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && group_ != null + && group_ != com.google.cloud.migrationcenter.v1.Group.getDefaultInstance()) { + getGroupBuilder().mergeFrom(value); + } else { + group_ = value; + } + } else { + groupBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The group resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGroup() { + bitField0_ = (bitField0_ & ~0x00000004); + group_ = null; + if (groupBuilder_ != null) { + groupBuilder_.dispose(); + groupBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The group resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.Group.Builder getGroupBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The group resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.GroupOrBuilder getGroupOrBuilder() { + if (groupBuilder_ != null) { + return groupBuilder_.getMessageOrBuilder(); + } else { + return group_ == null + ? com.google.cloud.migrationcenter.v1.Group.getDefaultInstance() + : group_; + } + } + /** + * + * + *
+     * Required. The group resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Group, + com.google.cloud.migrationcenter.v1.Group.Builder, + com.google.cloud.migrationcenter.v1.GroupOrBuilder> + getGroupFieldBuilder() { + if (groupBuilder_ == null) { + groupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Group, + com.google.cloud.migrationcenter.v1.Group.Builder, + com.google.cloud.migrationcenter.v1.GroupOrBuilder>( + getGroup(), getParentForChildren(), isClean()); + group_ = null; + } + return groupBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.CreateGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.CreateGroupRequest) + private static final com.google.cloud.migrationcenter.v1.CreateGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.CreateGroupRequest(); + } + + public static com.google.cloud.migrationcenter.v1.CreateGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateGroupRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateGroupRequestOrBuilder.java new file mode 100644 index 000000000000..3e21b366d583 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateGroupRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface CreateGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.CreateGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User specified ID for the group. It will become the last
+   * component of the group name. The ID must be unique within the project, must
+   * conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The ID must match the regular expression:
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + * + * + *
+   * Required. User specified ID for the group. It will become the last
+   * component of the group name. The ID must be unique within the project, must
+   * conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The ID must match the regular expression:
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString getGroupIdBytes(); + + /** + * + * + *
+   * Required. The group resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the group field is set. + */ + boolean hasGroup(); + /** + * + * + *
+   * Required. The group resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The group. + */ + com.google.cloud.migrationcenter.v1.Group getGroup(); + /** + * + * + *
+   * Required. The group resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.GroupOrBuilder getGroupOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportDataFileRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportDataFileRequest.java new file mode 100644 index 000000000000..a8f321d4467b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportDataFileRequest.java @@ -0,0 +1,1386 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to create an `ImportDataFile` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateImportDataFileRequest} + */ +public final class CreateImportDataFileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.CreateImportDataFileRequest) + CreateImportDataFileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateImportDataFileRequest.newBuilder() to construct. + private CreateImportDataFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateImportDataFileRequest() { + parent_ = ""; + importDataFileId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateImportDataFileRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateImportDataFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateImportDataFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest.class, + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Name of the parent of the ImportDataFile.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the parent of the ImportDataFile.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMPORT_DATA_FILE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object importDataFileId_ = ""; + /** + * + * + *
+   * Required. The ID of the new data file.
+   * 
+ * + * string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The importDataFileId. + */ + @java.lang.Override + public java.lang.String getImportDataFileId() { + java.lang.Object ref = importDataFileId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + importDataFileId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID of the new data file.
+   * 
+ * + * string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for importDataFileId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImportDataFileIdBytes() { + java.lang.Object ref = importDataFileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + importDataFileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMPORT_DATA_FILE_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.ImportDataFile importDataFile_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importDataFile field is set. + */ + @java.lang.Override + public boolean hasImportDataFile() { + return importDataFile_ != null; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importDataFile. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportDataFile getImportDataFile() { + return importDataFile_ == null + ? com.google.cloud.migrationcenter.v1.ImportDataFile.getDefaultInstance() + : importDataFile_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder getImportDataFileOrBuilder() { + return importDataFile_ == null + ? com.google.cloud.migrationcenter.v1.ImportDataFile.getDefaultInstance() + : importDataFile_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(importDataFileId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, importDataFileId_); + } + if (importDataFile_ != null) { + output.writeMessage(3, getImportDataFile()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(importDataFileId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, importDataFileId_); + } + if (importDataFile_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getImportDataFile()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest other = + (com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getImportDataFileId().equals(other.getImportDataFileId())) return false; + if (hasImportDataFile() != other.hasImportDataFile()) return false; + if (hasImportDataFile()) { + if (!getImportDataFile().equals(other.getImportDataFile())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + IMPORT_DATA_FILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getImportDataFileId().hashCode(); + if (hasImportDataFile()) { + hash = (37 * hash) + IMPORT_DATA_FILE_FIELD_NUMBER; + hash = (53 * hash) + getImportDataFile().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create an `ImportDataFile` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateImportDataFileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.CreateImportDataFileRequest) + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateImportDataFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateImportDataFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest.class, + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + importDataFileId_ = ""; + importDataFile_ = null; + if (importDataFileBuilder_ != null) { + importDataFileBuilder_.dispose(); + importDataFileBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateImportDataFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest build() { + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest buildPartial() { + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest result = + new com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.importDataFileId_ = importDataFileId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.importDataFile_ = + importDataFileBuilder_ == null ? importDataFile_ : importDataFileBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getImportDataFileId().isEmpty()) { + importDataFileId_ = other.importDataFileId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasImportDataFile()) { + mergeImportDataFile(other.getImportDataFile()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + importDataFileId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getImportDataFileFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Name of the parent of the ImportDataFile.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the parent of the ImportDataFile.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the parent of the ImportDataFile.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the parent of the ImportDataFile.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the parent of the ImportDataFile.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object importDataFileId_ = ""; + /** + * + * + *
+     * Required. The ID of the new data file.
+     * 
+ * + * string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The importDataFileId. + */ + public java.lang.String getImportDataFileId() { + java.lang.Object ref = importDataFileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + importDataFileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID of the new data file.
+     * 
+ * + * string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for importDataFileId. + */ + public com.google.protobuf.ByteString getImportDataFileIdBytes() { + java.lang.Object ref = importDataFileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + importDataFileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID of the new data file.
+     * 
+ * + * string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The importDataFileId to set. + * @return This builder for chaining. + */ + public Builder setImportDataFileId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + importDataFileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the new data file.
+     * 
+ * + * string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearImportDataFileId() { + importDataFileId_ = getDefaultInstance().getImportDataFileId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the new data file.
+     * 
+ * + * string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for importDataFileId to set. + * @return This builder for chaining. + */ + public Builder setImportDataFileIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + importDataFileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.ImportDataFile importDataFile_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportDataFile, + com.google.cloud.migrationcenter.v1.ImportDataFile.Builder, + com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder> + importDataFileBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importDataFile field is set. + */ + public boolean hasImportDataFile() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importDataFile. + */ + public com.google.cloud.migrationcenter.v1.ImportDataFile getImportDataFile() { + if (importDataFileBuilder_ == null) { + return importDataFile_ == null + ? com.google.cloud.migrationcenter.v1.ImportDataFile.getDefaultInstance() + : importDataFile_; + } else { + return importDataFileBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setImportDataFile(com.google.cloud.migrationcenter.v1.ImportDataFile value) { + if (importDataFileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + importDataFile_ = value; + } else { + importDataFileBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setImportDataFile( + com.google.cloud.migrationcenter.v1.ImportDataFile.Builder builderForValue) { + if (importDataFileBuilder_ == null) { + importDataFile_ = builderForValue.build(); + } else { + importDataFileBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeImportDataFile(com.google.cloud.migrationcenter.v1.ImportDataFile value) { + if (importDataFileBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && importDataFile_ != null + && importDataFile_ + != com.google.cloud.migrationcenter.v1.ImportDataFile.getDefaultInstance()) { + getImportDataFileBuilder().mergeFrom(value); + } else { + importDataFile_ = value; + } + } else { + importDataFileBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearImportDataFile() { + bitField0_ = (bitField0_ & ~0x00000004); + importDataFile_ = null; + if (importDataFileBuilder_ != null) { + importDataFileBuilder_.dispose(); + importDataFileBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ImportDataFile.Builder getImportDataFileBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getImportDataFileFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder + getImportDataFileOrBuilder() { + if (importDataFileBuilder_ != null) { + return importDataFileBuilder_.getMessageOrBuilder(); + } else { + return importDataFile_ == null + ? com.google.cloud.migrationcenter.v1.ImportDataFile.getDefaultInstance() + : importDataFile_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportDataFile, + com.google.cloud.migrationcenter.v1.ImportDataFile.Builder, + com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder> + getImportDataFileFieldBuilder() { + if (importDataFileBuilder_ == null) { + importDataFileBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportDataFile, + com.google.cloud.migrationcenter.v1.ImportDataFile.Builder, + com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder>( + getImportDataFile(), getParentForChildren(), isClean()); + importDataFile_ = null; + } + return importDataFileBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.CreateImportDataFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.CreateImportDataFileRequest) + private static final com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest(); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateImportDataFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportDataFileRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportDataFileRequestOrBuilder.java new file mode 100644 index 000000000000..8b280c680f55 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportDataFileRequestOrBuilder.java @@ -0,0 +1,169 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface CreateImportDataFileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.CreateImportDataFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the parent of the ImportDataFile.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Name of the parent of the ImportDataFile.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID of the new data file.
+   * 
+ * + * string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The importDataFileId. + */ + java.lang.String getImportDataFileId(); + /** + * + * + *
+   * Required. The ID of the new data file.
+   * 
+ * + * string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for importDataFileId. + */ + com.google.protobuf.ByteString getImportDataFileIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importDataFile field is set. + */ + boolean hasImportDataFile(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importDataFile. + */ + com.google.cloud.migrationcenter.v1.ImportDataFile getImportDataFile(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder getImportDataFileOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportJobRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportJobRequest.java new file mode 100644 index 000000000000..226fcd6208bc --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportJobRequest.java @@ -0,0 +1,1376 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to create an import job.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateImportJobRequest} + */ +public final class CreateImportJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.CreateImportJobRequest) + CreateImportJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateImportJobRequest.newBuilder() to construct. + private CreateImportJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateImportJobRequest() { + parent_ = ""; + importJobId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateImportJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateImportJobRequest.class, + com.google.cloud.migrationcenter.v1.CreateImportJobRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMPORT_JOB_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object importJobId_ = ""; + /** + * + * + *
+   * Required. ID of the import job.
+   * 
+ * + * string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The importJobId. + */ + @java.lang.Override + public java.lang.String getImportJobId() { + java.lang.Object ref = importJobId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + importJobId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. ID of the import job.
+   * 
+ * + * string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for importJobId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImportJobIdBytes() { + java.lang.Object ref = importJobId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + importJobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMPORT_JOB_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.ImportJob importJob_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importJob field is set. + */ + @java.lang.Override + public boolean hasImportJob() { + return importJob_ != null; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importJob. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJob getImportJob() { + return importJob_ == null + ? com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance() + : importJob_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJobOrBuilder getImportJobOrBuilder() { + return importJob_ == null + ? com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance() + : importJob_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(importJobId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, importJobId_); + } + if (importJob_ != null) { + output.writeMessage(3, getImportJob()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(importJobId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, importJobId_); + } + if (importJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getImportJob()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.CreateImportJobRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.CreateImportJobRequest other = + (com.google.cloud.migrationcenter.v1.CreateImportJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getImportJobId().equals(other.getImportJobId())) return false; + if (hasImportJob() != other.hasImportJob()) return false; + if (hasImportJob()) { + if (!getImportJob().equals(other.getImportJob())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + IMPORT_JOB_ID_FIELD_NUMBER; + hash = (53 * hash) + getImportJobId().hashCode(); + if (hasImportJob()) { + hash = (37 * hash) + IMPORT_JOB_FIELD_NUMBER; + hash = (53 * hash) + getImportJob().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.CreateImportJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create an import job.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateImportJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.CreateImportJobRequest) + com.google.cloud.migrationcenter.v1.CreateImportJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateImportJobRequest.class, + com.google.cloud.migrationcenter.v1.CreateImportJobRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.CreateImportJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + importJobId_ = ""; + importJob_ = null; + if (importJobBuilder_ != null) { + importJobBuilder_.dispose(); + importJobBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateImportJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateImportJobRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.CreateImportJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateImportJobRequest build() { + com.google.cloud.migrationcenter.v1.CreateImportJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateImportJobRequest buildPartial() { + com.google.cloud.migrationcenter.v1.CreateImportJobRequest result = + new com.google.cloud.migrationcenter.v1.CreateImportJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.CreateImportJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.importJobId_ = importJobId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.importJob_ = importJobBuilder_ == null ? importJob_ : importJobBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.CreateImportJobRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.CreateImportJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.CreateImportJobRequest other) { + if (other == com.google.cloud.migrationcenter.v1.CreateImportJobRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getImportJobId().isEmpty()) { + importJobId_ = other.importJobId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasImportJob()) { + mergeImportJob(other.getImportJob()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + importJobId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getImportJobFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object importJobId_ = ""; + /** + * + * + *
+     * Required. ID of the import job.
+     * 
+ * + * string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The importJobId. + */ + public java.lang.String getImportJobId() { + java.lang.Object ref = importJobId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + importJobId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. ID of the import job.
+     * 
+ * + * string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for importJobId. + */ + public com.google.protobuf.ByteString getImportJobIdBytes() { + java.lang.Object ref = importJobId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + importJobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. ID of the import job.
+     * 
+ * + * string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The importJobId to set. + * @return This builder for chaining. + */ + public Builder setImportJobId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + importJobId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the import job.
+     * 
+ * + * string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearImportJobId() { + importJobId_ = getDefaultInstance().getImportJobId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the import job.
+     * 
+ * + * string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for importJobId to set. + * @return This builder for chaining. + */ + public Builder setImportJobIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + importJobId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.ImportJob importJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportJob, + com.google.cloud.migrationcenter.v1.ImportJob.Builder, + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder> + importJobBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importJob field is set. + */ + public boolean hasImportJob() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importJob. + */ + public com.google.cloud.migrationcenter.v1.ImportJob getImportJob() { + if (importJobBuilder_ == null) { + return importJob_ == null + ? com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance() + : importJob_; + } else { + return importJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setImportJob(com.google.cloud.migrationcenter.v1.ImportJob value) { + if (importJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + importJob_ = value; + } else { + importJobBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setImportJob( + com.google.cloud.migrationcenter.v1.ImportJob.Builder builderForValue) { + if (importJobBuilder_ == null) { + importJob_ = builderForValue.build(); + } else { + importJobBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeImportJob(com.google.cloud.migrationcenter.v1.ImportJob value) { + if (importJobBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && importJob_ != null + && importJob_ != com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance()) { + getImportJobBuilder().mergeFrom(value); + } else { + importJob_ = value; + } + } else { + importJobBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearImportJob() { + bitField0_ = (bitField0_ & ~0x00000004); + importJob_ = null; + if (importJobBuilder_ != null) { + importJobBuilder_.dispose(); + importJobBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ImportJob.Builder getImportJobBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getImportJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ImportJobOrBuilder getImportJobOrBuilder() { + if (importJobBuilder_ != null) { + return importJobBuilder_.getMessageOrBuilder(); + } else { + return importJob_ == null + ? com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance() + : importJob_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportJob, + com.google.cloud.migrationcenter.v1.ImportJob.Builder, + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder> + getImportJobFieldBuilder() { + if (importJobBuilder_ == null) { + importJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportJob, + com.google.cloud.migrationcenter.v1.ImportJob.Builder, + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder>( + getImportJob(), getParentForChildren(), isClean()); + importJob_ = null; + } + return importJobBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.CreateImportJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.CreateImportJobRequest) + private static final com.google.cloud.migrationcenter.v1.CreateImportJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.CreateImportJobRequest(); + } + + public static com.google.cloud.migrationcenter.v1.CreateImportJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateImportJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateImportJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportJobRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportJobRequestOrBuilder.java new file mode 100644 index 000000000000..bf3757ca018c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateImportJobRequestOrBuilder.java @@ -0,0 +1,169 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface CreateImportJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.CreateImportJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. ID of the import job.
+   * 
+ * + * string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The importJobId. + */ + java.lang.String getImportJobId(); + /** + * + * + *
+   * Required. ID of the import job.
+   * 
+ * + * string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for importJobId. + */ + com.google.protobuf.ByteString getImportJobIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importJob field is set. + */ + boolean hasImportJob(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importJob. + */ + com.google.cloud.migrationcenter.v1.ImportJob getImportJob(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder getImportJobOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreatePreferenceSetRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreatePreferenceSetRequest.java new file mode 100644 index 000000000000..20f22166ba5f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreatePreferenceSetRequest.java @@ -0,0 +1,1419 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to create a preference set.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreatePreferenceSetRequest} + */ +public final class CreatePreferenceSetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.CreatePreferenceSetRequest) + CreatePreferenceSetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreatePreferenceSetRequest.newBuilder() to construct. + private CreatePreferenceSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePreferenceSetRequest() { + parent_ = ""; + preferenceSetId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePreferenceSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreatePreferenceSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreatePreferenceSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest.class, + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREFERENCE_SET_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object preferenceSetId_ = ""; + /** + * + * + *
+   * Required. User specified ID for the preference set. It will become the last
+   * component of the preference set name. The ID must be unique within the
+   * project, must conform with RFC-1034, is restricted to lower-cased letters,
+   * and has a maximum length of 63 characters. The ID must match the regular
+   * expression
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The preferenceSetId. + */ + @java.lang.Override + public java.lang.String getPreferenceSetId() { + java.lang.Object ref = preferenceSetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + preferenceSetId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User specified ID for the preference set. It will become the last
+   * component of the preference set name. The ID must be unique within the
+   * project, must conform with RFC-1034, is restricted to lower-cased letters,
+   * and has a maximum length of 63 characters. The ID must match the regular
+   * expression
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for preferenceSetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPreferenceSetIdBytes() { + java.lang.Object ref = preferenceSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preferenceSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREFERENCE_SET_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.PreferenceSet preferenceSet_; + /** + * + * + *
+   * Required. The preference set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the preferenceSet field is set. + */ + @java.lang.Override + public boolean hasPreferenceSet() { + return preferenceSet_ != null; + } + /** + * + * + *
+   * Required. The preference set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The preferenceSet. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PreferenceSet getPreferenceSet() { + return preferenceSet_ == null + ? com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance() + : preferenceSet_; + } + /** + * + * + *
+   * Required. The preference set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder getPreferenceSetOrBuilder() { + return preferenceSet_ == null + ? com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance() + : preferenceSet_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preferenceSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, preferenceSetId_); + } + if (preferenceSet_ != null) { + output.writeMessage(3, getPreferenceSet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preferenceSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, preferenceSetId_); + } + if (preferenceSet_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPreferenceSet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest other = + (com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPreferenceSetId().equals(other.getPreferenceSetId())) return false; + if (hasPreferenceSet() != other.hasPreferenceSet()) return false; + if (hasPreferenceSet()) { + if (!getPreferenceSet().equals(other.getPreferenceSet())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PREFERENCE_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getPreferenceSetId().hashCode(); + if (hasPreferenceSet()) { + hash = (37 * hash) + PREFERENCE_SET_FIELD_NUMBER; + hash = (53 * hash) + getPreferenceSet().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create a preference set.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreatePreferenceSetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.CreatePreferenceSetRequest) + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreatePreferenceSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreatePreferenceSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest.class, + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + preferenceSetId_ = ""; + preferenceSet_ = null; + if (preferenceSetBuilder_ != null) { + preferenceSetBuilder_.dispose(); + preferenceSetBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreatePreferenceSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest build() { + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest buildPartial() { + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest result = + new com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.preferenceSetId_ = preferenceSetId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.preferenceSet_ = + preferenceSetBuilder_ == null ? preferenceSet_ : preferenceSetBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPreferenceSetId().isEmpty()) { + preferenceSetId_ = other.preferenceSetId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPreferenceSet()) { + mergePreferenceSet(other.getPreferenceSet()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + preferenceSetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getPreferenceSetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object preferenceSetId_ = ""; + /** + * + * + *
+     * Required. User specified ID for the preference set. It will become the last
+     * component of the preference set name. The ID must be unique within the
+     * project, must conform with RFC-1034, is restricted to lower-cased letters,
+     * and has a maximum length of 63 characters. The ID must match the regular
+     * expression
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The preferenceSetId. + */ + public java.lang.String getPreferenceSetId() { + java.lang.Object ref = preferenceSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + preferenceSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User specified ID for the preference set. It will become the last
+     * component of the preference set name. The ID must be unique within the
+     * project, must conform with RFC-1034, is restricted to lower-cased letters,
+     * and has a maximum length of 63 characters. The ID must match the regular
+     * expression
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for preferenceSetId. + */ + public com.google.protobuf.ByteString getPreferenceSetIdBytes() { + java.lang.Object ref = preferenceSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preferenceSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User specified ID for the preference set. It will become the last
+     * component of the preference set name. The ID must be unique within the
+     * project, must conform with RFC-1034, is restricted to lower-cased letters,
+     * and has a maximum length of 63 characters. The ID must match the regular
+     * expression
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The preferenceSetId to set. + * @return This builder for chaining. + */ + public Builder setPreferenceSetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + preferenceSetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User specified ID for the preference set. It will become the last
+     * component of the preference set name. The ID must be unique within the
+     * project, must conform with RFC-1034, is restricted to lower-cased letters,
+     * and has a maximum length of 63 characters. The ID must match the regular
+     * expression
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPreferenceSetId() { + preferenceSetId_ = getDefaultInstance().getPreferenceSetId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User specified ID for the preference set. It will become the last
+     * component of the preference set name. The ID must be unique within the
+     * project, must conform with RFC-1034, is restricted to lower-cased letters,
+     * and has a maximum length of 63 characters. The ID must match the regular
+     * expression
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for preferenceSetId to set. + * @return This builder for chaining. + */ + public Builder setPreferenceSetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + preferenceSetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.PreferenceSet preferenceSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PreferenceSet, + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder, + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder> + preferenceSetBuilder_; + /** + * + * + *
+     * Required. The preference set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the preferenceSet field is set. + */ + public boolean hasPreferenceSet() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The preference set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The preferenceSet. + */ + public com.google.cloud.migrationcenter.v1.PreferenceSet getPreferenceSet() { + if (preferenceSetBuilder_ == null) { + return preferenceSet_ == null + ? com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance() + : preferenceSet_; + } else { + return preferenceSetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The preference set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPreferenceSet(com.google.cloud.migrationcenter.v1.PreferenceSet value) { + if (preferenceSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + preferenceSet_ = value; + } else { + preferenceSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The preference set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPreferenceSet( + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder builderForValue) { + if (preferenceSetBuilder_ == null) { + preferenceSet_ = builderForValue.build(); + } else { + preferenceSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The preference set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePreferenceSet(com.google.cloud.migrationcenter.v1.PreferenceSet value) { + if (preferenceSetBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && preferenceSet_ != null + && preferenceSet_ + != com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance()) { + getPreferenceSetBuilder().mergeFrom(value); + } else { + preferenceSet_ = value; + } + } else { + preferenceSetBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The preference set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPreferenceSet() { + bitField0_ = (bitField0_ & ~0x00000004); + preferenceSet_ = null; + if (preferenceSetBuilder_ != null) { + preferenceSetBuilder_.dispose(); + preferenceSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The preference set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.PreferenceSet.Builder getPreferenceSetBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPreferenceSetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The preference set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder getPreferenceSetOrBuilder() { + if (preferenceSetBuilder_ != null) { + return preferenceSetBuilder_.getMessageOrBuilder(); + } else { + return preferenceSet_ == null + ? com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance() + : preferenceSet_; + } + } + /** + * + * + *
+     * Required. The preference set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PreferenceSet, + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder, + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder> + getPreferenceSetFieldBuilder() { + if (preferenceSetBuilder_ == null) { + preferenceSetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PreferenceSet, + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder, + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder>( + getPreferenceSet(), getParentForChildren(), isClean()); + preferenceSet_ = null; + } + return preferenceSetBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.CreatePreferenceSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.CreatePreferenceSetRequest) + private static final com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest(); + } + + public static com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePreferenceSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreatePreferenceSetRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreatePreferenceSetRequestOrBuilder.java new file mode 100644 index 000000000000..1c2f62160d4b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreatePreferenceSetRequestOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface CreatePreferenceSetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.CreatePreferenceSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User specified ID for the preference set. It will become the last
+   * component of the preference set name. The ID must be unique within the
+   * project, must conform with RFC-1034, is restricted to lower-cased letters,
+   * and has a maximum length of 63 characters. The ID must match the regular
+   * expression
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The preferenceSetId. + */ + java.lang.String getPreferenceSetId(); + /** + * + * + *
+   * Required. User specified ID for the preference set. It will become the last
+   * component of the preference set name. The ID must be unique within the
+   * project, must conform with RFC-1034, is restricted to lower-cased letters,
+   * and has a maximum length of 63 characters. The ID must match the regular
+   * expression
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for preferenceSetId. + */ + com.google.protobuf.ByteString getPreferenceSetIdBytes(); + + /** + * + * + *
+   * Required. The preference set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the preferenceSet field is set. + */ + boolean hasPreferenceSet(); + /** + * + * + *
+   * Required. The preference set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The preferenceSet. + */ + com.google.cloud.migrationcenter.v1.PreferenceSet getPreferenceSet(); + /** + * + * + *
+   * Required. The preference set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder getPreferenceSetOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportConfigRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportConfigRequest.java new file mode 100644 index 000000000000..89b4ec9fe2af --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportConfigRequest.java @@ -0,0 +1,1410 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to create a `ReportConfig` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateReportConfigRequest} + */ +public final class CreateReportConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.CreateReportConfigRequest) + CreateReportConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateReportConfigRequest.newBuilder() to construct. + private CreateReportConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateReportConfigRequest() { + parent_ = ""; + reportConfigId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateReportConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateReportConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateReportConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest.class, + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPORT_CONFIG_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object reportConfigId_ = ""; + /** + * + * + *
+   * Required. User specified ID for the report config. It will become the last
+   * component of the report config name. The ID must be unique within the
+   * project, must conform with RFC-1034, is restricted to lower-cased letters,
+   * and has a maximum length of 63 characters. The ID must match the regular
+   * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+   * 
+ * + * string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reportConfigId. + */ + @java.lang.Override + public java.lang.String getReportConfigId() { + java.lang.Object ref = reportConfigId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reportConfigId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User specified ID for the report config. It will become the last
+   * component of the report config name. The ID must be unique within the
+   * project, must conform with RFC-1034, is restricted to lower-cased letters,
+   * and has a maximum length of 63 characters. The ID must match the regular
+   * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+   * 
+ * + * string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reportConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReportConfigIdBytes() { + java.lang.Object ref = reportConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reportConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPORT_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.ReportConfig reportConfig_; + /** + * + * + *
+   * Required. The report config set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reportConfig field is set. + */ + @java.lang.Override + public boolean hasReportConfig() { + return reportConfig_ != null; + } + /** + * + * + *
+   * Required. The report config set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reportConfig. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig getReportConfig() { + return reportConfig_ == null + ? com.google.cloud.migrationcenter.v1.ReportConfig.getDefaultInstance() + : reportConfig_; + } + /** + * + * + *
+   * Required. The report config set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder getReportConfigOrBuilder() { + return reportConfig_ == null + ? com.google.cloud.migrationcenter.v1.ReportConfig.getDefaultInstance() + : reportConfig_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reportConfigId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, reportConfigId_); + } + if (reportConfig_ != null) { + output.writeMessage(3, getReportConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reportConfigId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, reportConfigId_); + } + if (reportConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getReportConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.CreateReportConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest other = + (com.google.cloud.migrationcenter.v1.CreateReportConfigRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getReportConfigId().equals(other.getReportConfigId())) return false; + if (hasReportConfig() != other.hasReportConfig()) return false; + if (hasReportConfig()) { + if (!getReportConfig().equals(other.getReportConfig())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + REPORT_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getReportConfigId().hashCode(); + if (hasReportConfig()) { + hash = (37 * hash) + REPORT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getReportConfig().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create a `ReportConfig` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateReportConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.CreateReportConfigRequest) + com.google.cloud.migrationcenter.v1.CreateReportConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateReportConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateReportConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest.class, + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.CreateReportConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + reportConfigId_ = ""; + reportConfig_ = null; + if (reportConfigBuilder_ != null) { + reportConfigBuilder_.dispose(); + reportConfigBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateReportConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateReportConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.CreateReportConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateReportConfigRequest build() { + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateReportConfigRequest buildPartial() { + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest result = + new com.google.cloud.migrationcenter.v1.CreateReportConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.CreateReportConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.reportConfigId_ = reportConfigId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.reportConfig_ = + reportConfigBuilder_ == null ? reportConfig_ : reportConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.CreateReportConfigRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.CreateReportConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.CreateReportConfigRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.CreateReportConfigRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getReportConfigId().isEmpty()) { + reportConfigId_ = other.reportConfigId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasReportConfig()) { + mergeReportConfig(other.getReportConfig()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + reportConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getReportConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object reportConfigId_ = ""; + /** + * + * + *
+     * Required. User specified ID for the report config. It will become the last
+     * component of the report config name. The ID must be unique within the
+     * project, must conform with RFC-1034, is restricted to lower-cased letters,
+     * and has a maximum length of 63 characters. The ID must match the regular
+     * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+     * 
+ * + * string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reportConfigId. + */ + public java.lang.String getReportConfigId() { + java.lang.Object ref = reportConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reportConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User specified ID for the report config. It will become the last
+     * component of the report config name. The ID must be unique within the
+     * project, must conform with RFC-1034, is restricted to lower-cased letters,
+     * and has a maximum length of 63 characters. The ID must match the regular
+     * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+     * 
+ * + * string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reportConfigId. + */ + public com.google.protobuf.ByteString getReportConfigIdBytes() { + java.lang.Object ref = reportConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reportConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User specified ID for the report config. It will become the last
+     * component of the report config name. The ID must be unique within the
+     * project, must conform with RFC-1034, is restricted to lower-cased letters,
+     * and has a maximum length of 63 characters. The ID must match the regular
+     * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+     * 
+ * + * string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The reportConfigId to set. + * @return This builder for chaining. + */ + public Builder setReportConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reportConfigId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User specified ID for the report config. It will become the last
+     * component of the report config name. The ID must be unique within the
+     * project, must conform with RFC-1034, is restricted to lower-cased letters,
+     * and has a maximum length of 63 characters. The ID must match the regular
+     * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+     * 
+ * + * string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearReportConfigId() { + reportConfigId_ = getDefaultInstance().getReportConfigId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User specified ID for the report config. It will become the last
+     * component of the report config name. The ID must be unique within the
+     * project, must conform with RFC-1034, is restricted to lower-cased letters,
+     * and has a maximum length of 63 characters. The ID must match the regular
+     * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+     * 
+ * + * string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for reportConfigId to set. + * @return This builder for chaining. + */ + public Builder setReportConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reportConfigId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.ReportConfig reportConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportConfig, + com.google.cloud.migrationcenter.v1.ReportConfig.Builder, + com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder> + reportConfigBuilder_; + /** + * + * + *
+     * Required. The report config set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reportConfig field is set. + */ + public boolean hasReportConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The report config set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reportConfig. + */ + public com.google.cloud.migrationcenter.v1.ReportConfig getReportConfig() { + if (reportConfigBuilder_ == null) { + return reportConfig_ == null + ? com.google.cloud.migrationcenter.v1.ReportConfig.getDefaultInstance() + : reportConfig_; + } else { + return reportConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The report config set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReportConfig(com.google.cloud.migrationcenter.v1.ReportConfig value) { + if (reportConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reportConfig_ = value; + } else { + reportConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The report config set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReportConfig( + com.google.cloud.migrationcenter.v1.ReportConfig.Builder builderForValue) { + if (reportConfigBuilder_ == null) { + reportConfig_ = builderForValue.build(); + } else { + reportConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The report config set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeReportConfig(com.google.cloud.migrationcenter.v1.ReportConfig value) { + if (reportConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && reportConfig_ != null + && reportConfig_ + != com.google.cloud.migrationcenter.v1.ReportConfig.getDefaultInstance()) { + getReportConfigBuilder().mergeFrom(value); + } else { + reportConfig_ = value; + } + } else { + reportConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The report config set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearReportConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + reportConfig_ = null; + if (reportConfigBuilder_ != null) { + reportConfigBuilder_.dispose(); + reportConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The report config set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ReportConfig.Builder getReportConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getReportConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The report config set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder getReportConfigOrBuilder() { + if (reportConfigBuilder_ != null) { + return reportConfigBuilder_.getMessageOrBuilder(); + } else { + return reportConfig_ == null + ? com.google.cloud.migrationcenter.v1.ReportConfig.getDefaultInstance() + : reportConfig_; + } + } + /** + * + * + *
+     * Required. The report config set resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportConfig, + com.google.cloud.migrationcenter.v1.ReportConfig.Builder, + com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder> + getReportConfigFieldBuilder() { + if (reportConfigBuilder_ == null) { + reportConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportConfig, + com.google.cloud.migrationcenter.v1.ReportConfig.Builder, + com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder>( + getReportConfig(), getParentForChildren(), isClean()); + reportConfig_ = null; + } + return reportConfigBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.CreateReportConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.CreateReportConfigRequest) + private static final com.google.cloud.migrationcenter.v1.CreateReportConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.CreateReportConfigRequest(); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateReportConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateReportConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportConfigRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportConfigRequestOrBuilder.java new file mode 100644 index 000000000000..e4c0ad70f7ed --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportConfigRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface CreateReportConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.CreateReportConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User specified ID for the report config. It will become the last
+   * component of the report config name. The ID must be unique within the
+   * project, must conform with RFC-1034, is restricted to lower-cased letters,
+   * and has a maximum length of 63 characters. The ID must match the regular
+   * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+   * 
+ * + * string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reportConfigId. + */ + java.lang.String getReportConfigId(); + /** + * + * + *
+   * Required. User specified ID for the report config. It will become the last
+   * component of the report config name. The ID must be unique within the
+   * project, must conform with RFC-1034, is restricted to lower-cased letters,
+   * and has a maximum length of 63 characters. The ID must match the regular
+   * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+   * 
+ * + * string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reportConfigId. + */ + com.google.protobuf.ByteString getReportConfigIdBytes(); + + /** + * + * + *
+   * Required. The report config set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reportConfig field is set. + */ + boolean hasReportConfig(); + /** + * + * + *
+   * Required. The report config set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reportConfig. + */ + com.google.cloud.migrationcenter.v1.ReportConfig getReportConfig(); + /** + * + * + *
+   * Required. The report config set resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder getReportConfigOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportRequest.java new file mode 100644 index 000000000000..833e866a1781 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportRequest.java @@ -0,0 +1,1403 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Message for creating a Report.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateReportRequest} + */ +public final class CreateReportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.CreateReportRequest) + CreateReportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateReportRequest.newBuilder() to construct. + private CreateReportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateReportRequest() { + parent_ = ""; + reportId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateReportRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateReportRequest.class, + com.google.cloud.migrationcenter.v1.CreateReportRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPORT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object reportId_ = ""; + /** + * + * + *
+   * Required. User specified id for the report. It will become the last
+   * component of the report name. The id must be unique within the project,
+   * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The id must match the regular expression:
+   * [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+   * 
+ * + * string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reportId. + */ + @java.lang.Override + public java.lang.String getReportId() { + java.lang.Object ref = reportId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reportId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User specified id for the report. It will become the last
+   * component of the report name. The id must be unique within the project,
+   * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The id must match the regular expression:
+   * [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+   * 
+ * + * string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reportId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReportIdBytes() { + java.lang.Object ref = reportId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reportId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPORT_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.Report report_; + /** + * + * + *
+   * Required. The report resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the report field is set. + */ + @java.lang.Override + public boolean hasReport() { + return report_ != null; + } + /** + * + * + *
+   * Required. The report resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The report. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Report getReport() { + return report_ == null + ? com.google.cloud.migrationcenter.v1.Report.getDefaultInstance() + : report_; + } + /** + * + * + *
+   * Required. The report resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportOrBuilder getReportOrBuilder() { + return report_ == null + ? com.google.cloud.migrationcenter.v1.Report.getDefaultInstance() + : report_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reportId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, reportId_); + } + if (report_ != null) { + output.writeMessage(3, getReport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reportId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, reportId_); + } + if (report_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getReport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.CreateReportRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.CreateReportRequest other = + (com.google.cloud.migrationcenter.v1.CreateReportRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getReportId().equals(other.getReportId())) return false; + if (hasReport() != other.hasReport()) return false; + if (hasReport()) { + if (!getReport().equals(other.getReport())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + REPORT_ID_FIELD_NUMBER; + hash = (53 * hash) + getReportId().hashCode(); + if (hasReport()) { + hash = (37 * hash) + REPORT_FIELD_NUMBER; + hash = (53 * hash) + getReport().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.CreateReportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message for creating a Report.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateReportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.CreateReportRequest) + com.google.cloud.migrationcenter.v1.CreateReportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateReportRequest.class, + com.google.cloud.migrationcenter.v1.CreateReportRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.CreateReportRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + reportId_ = ""; + report_ = null; + if (reportBuilder_ != null) { + reportBuilder_.dispose(); + reportBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateReportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateReportRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.CreateReportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateReportRequest build() { + com.google.cloud.migrationcenter.v1.CreateReportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateReportRequest buildPartial() { + com.google.cloud.migrationcenter.v1.CreateReportRequest result = + new com.google.cloud.migrationcenter.v1.CreateReportRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.CreateReportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.reportId_ = reportId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.report_ = reportBuilder_ == null ? report_ : reportBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.CreateReportRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.CreateReportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.CreateReportRequest other) { + if (other == com.google.cloud.migrationcenter.v1.CreateReportRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getReportId().isEmpty()) { + reportId_ = other.reportId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasReport()) { + mergeReport(other.getReport()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + reportId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getReportFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object reportId_ = ""; + /** + * + * + *
+     * Required. User specified id for the report. It will become the last
+     * component of the report name. The id must be unique within the project,
+     * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The id must match the regular expression:
+     * [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+     * 
+ * + * string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reportId. + */ + public java.lang.String getReportId() { + java.lang.Object ref = reportId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reportId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User specified id for the report. It will become the last
+     * component of the report name. The id must be unique within the project,
+     * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The id must match the regular expression:
+     * [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+     * 
+ * + * string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reportId. + */ + public com.google.protobuf.ByteString getReportIdBytes() { + java.lang.Object ref = reportId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reportId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User specified id for the report. It will become the last
+     * component of the report name. The id must be unique within the project,
+     * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The id must match the regular expression:
+     * [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+     * 
+ * + * string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The reportId to set. + * @return This builder for chaining. + */ + public Builder setReportId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reportId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User specified id for the report. It will become the last
+     * component of the report name. The id must be unique within the project,
+     * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The id must match the regular expression:
+     * [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+     * 
+ * + * string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearReportId() { + reportId_ = getDefaultInstance().getReportId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User specified id for the report. It will become the last
+     * component of the report name. The id must be unique within the project,
+     * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The id must match the regular expression:
+     * [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+     * 
+ * + * string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for reportId to set. + * @return This builder for chaining. + */ + public Builder setReportIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reportId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.Report report_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Report, + com.google.cloud.migrationcenter.v1.Report.Builder, + com.google.cloud.migrationcenter.v1.ReportOrBuilder> + reportBuilder_; + /** + * + * + *
+     * Required. The report resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the report field is set. + */ + public boolean hasReport() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The report resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The report. + */ + public com.google.cloud.migrationcenter.v1.Report getReport() { + if (reportBuilder_ == null) { + return report_ == null + ? com.google.cloud.migrationcenter.v1.Report.getDefaultInstance() + : report_; + } else { + return reportBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The report resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReport(com.google.cloud.migrationcenter.v1.Report value) { + if (reportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + report_ = value; + } else { + reportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The report resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReport(com.google.cloud.migrationcenter.v1.Report.Builder builderForValue) { + if (reportBuilder_ == null) { + report_ = builderForValue.build(); + } else { + reportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The report resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeReport(com.google.cloud.migrationcenter.v1.Report value) { + if (reportBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && report_ != null + && report_ != com.google.cloud.migrationcenter.v1.Report.getDefaultInstance()) { + getReportBuilder().mergeFrom(value); + } else { + report_ = value; + } + } else { + reportBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The report resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearReport() { + bitField0_ = (bitField0_ & ~0x00000004); + report_ = null; + if (reportBuilder_ != null) { + reportBuilder_.dispose(); + reportBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The report resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.Report.Builder getReportBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getReportFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The report resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ReportOrBuilder getReportOrBuilder() { + if (reportBuilder_ != null) { + return reportBuilder_.getMessageOrBuilder(); + } else { + return report_ == null + ? com.google.cloud.migrationcenter.v1.Report.getDefaultInstance() + : report_; + } + } + /** + * + * + *
+     * Required. The report resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Report, + com.google.cloud.migrationcenter.v1.Report.Builder, + com.google.cloud.migrationcenter.v1.ReportOrBuilder> + getReportFieldBuilder() { + if (reportBuilder_ == null) { + reportBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Report, + com.google.cloud.migrationcenter.v1.Report.Builder, + com.google.cloud.migrationcenter.v1.ReportOrBuilder>( + getReport(), getParentForChildren(), isClean()); + report_ = null; + } + return reportBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.CreateReportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.CreateReportRequest) + private static final com.google.cloud.migrationcenter.v1.CreateReportRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.CreateReportRequest(); + } + + public static com.google.cloud.migrationcenter.v1.CreateReportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateReportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateReportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportRequestOrBuilder.java new file mode 100644 index 000000000000..6fdaa8d3e906 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateReportRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface CreateReportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.CreateReportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User specified id for the report. It will become the last
+   * component of the report name. The id must be unique within the project,
+   * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The id must match the regular expression:
+   * [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+   * 
+ * + * string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reportId. + */ + java.lang.String getReportId(); + /** + * + * + *
+   * Required. User specified id for the report. It will become the last
+   * component of the report name. The id must be unique within the project,
+   * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The id must match the regular expression:
+   * [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+   * 
+ * + * string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reportId. + */ + com.google.protobuf.ByteString getReportIdBytes(); + + /** + * + * + *
+   * Required. The report resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the report field is set. + */ + boolean hasReport(); + /** + * + * + *
+   * Required. The report resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The report. + */ + com.google.cloud.migrationcenter.v1.Report getReport(); + /** + * + * + *
+   * Required. The report resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.ReportOrBuilder getReportOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateSourceRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateSourceRequest.java new file mode 100644 index 000000000000..7a8d2386ebe0 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateSourceRequest.java @@ -0,0 +1,1403 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to create a source.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateSourceRequest} + */ +public final class CreateSourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.CreateSourceRequest) + CreateSourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSourceRequest.newBuilder() to construct. + private CreateSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSourceRequest() { + parent_ = ""; + sourceId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateSourceRequest.class, + com.google.cloud.migrationcenter.v1.CreateSourceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceId_ = ""; + /** + * + * + *
+   * Required. User specified ID for the source. It will become the last
+   * component of the source name. The ID must be unique within the project,
+   * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The ID must match the regular expression:
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sourceId. + */ + @java.lang.Override + public java.lang.String getSourceId() { + java.lang.Object ref = sourceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User specified ID for the source. It will become the last
+   * component of the source name. The ID must be unique within the project,
+   * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The ID must match the regular expression:
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceIdBytes() { + java.lang.Object ref = sourceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.Source source_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Source getSource() { + return source_ == null + ? com.google.cloud.migrationcenter.v1.Source.getDefaultInstance() + : source_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.SourceOrBuilder getSourceOrBuilder() { + return source_ == null + ? com.google.cloud.migrationcenter.v1.Source.getDefaultInstance() + : source_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceId_); + } + if (source_ != null) { + output.writeMessage(3, getSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceId_); + } + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.CreateSourceRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.CreateSourceRequest other = + (com.google.cloud.migrationcenter.v1.CreateSourceRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSourceId().equals(other.getSourceId())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSourceId().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.CreateSourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create a source.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.CreateSourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.CreateSourceRequest) + com.google.cloud.migrationcenter.v1.CreateSourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.CreateSourceRequest.class, + com.google.cloud.migrationcenter.v1.CreateSourceRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.CreateSourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + sourceId_ = ""; + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_CreateSourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateSourceRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.CreateSourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateSourceRequest build() { + com.google.cloud.migrationcenter.v1.CreateSourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateSourceRequest buildPartial() { + com.google.cloud.migrationcenter.v1.CreateSourceRequest result = + new com.google.cloud.migrationcenter.v1.CreateSourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.CreateSourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sourceId_ = sourceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.source_ = sourceBuilder_ == null ? source_ : sourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.CreateSourceRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.CreateSourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.CreateSourceRequest other) { + if (other == com.google.cloud.migrationcenter.v1.CreateSourceRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSourceId().isEmpty()) { + sourceId_ = other.sourceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + sourceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getSourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object sourceId_ = ""; + /** + * + * + *
+     * Required. User specified ID for the source. It will become the last
+     * component of the source name. The ID must be unique within the project,
+     * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The ID must match the regular expression:
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sourceId. + */ + public java.lang.String getSourceId() { + java.lang.Object ref = sourceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User specified ID for the source. It will become the last
+     * component of the source name. The ID must be unique within the project,
+     * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The ID must match the regular expression:
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sourceId. + */ + public com.google.protobuf.ByteString getSourceIdBytes() { + java.lang.Object ref = sourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User specified ID for the source. It will become the last
+     * component of the source name. The ID must be unique within the project,
+     * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The ID must match the regular expression:
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The sourceId to set. + * @return This builder for chaining. + */ + public Builder setSourceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User specified ID for the source. It will become the last
+     * component of the source name. The ID must be unique within the project,
+     * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The ID must match the regular expression:
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSourceId() { + sourceId_ = getDefaultInstance().getSourceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User specified ID for the source. It will become the last
+     * component of the source name. The ID must be unique within the project,
+     * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+     * maximum length of 63 characters. The ID must match the regular expression:
+     * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+     * 
+ * + * string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for sourceId to set. + * @return This builder for chaining. + */ + public Builder setSourceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.Source source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Source, + com.google.cloud.migrationcenter.v1.Source.Builder, + com.google.cloud.migrationcenter.v1.SourceOrBuilder> + sourceBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + public com.google.cloud.migrationcenter.v1.Source getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.migrationcenter.v1.Source.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.migrationcenter.v1.Source value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + } else { + sourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.migrationcenter.v1.Source.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSource(com.google.cloud.migrationcenter.v1.Source value) { + if (sourceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && source_ != null + && source_ != com.google.cloud.migrationcenter.v1.Source.getDefaultInstance()) { + getSourceBuilder().mergeFrom(value); + } else { + source_ = value; + } + } else { + sourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000004); + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.Source.Builder getSourceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.SourceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.migrationcenter.v1.Source.getDefaultInstance() + : source_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Source, + com.google.cloud.migrationcenter.v1.Source.Builder, + com.google.cloud.migrationcenter.v1.SourceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Source, + com.google.cloud.migrationcenter.v1.Source.Builder, + com.google.cloud.migrationcenter.v1.SourceOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.CreateSourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.CreateSourceRequest) + private static final com.google.cloud.migrationcenter.v1.CreateSourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.CreateSourceRequest(); + } + + public static com.google.cloud.migrationcenter.v1.CreateSourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CreateSourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateSourceRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateSourceRequestOrBuilder.java new file mode 100644 index 000000000000..e81c448c0dc9 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/CreateSourceRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface CreateSourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.CreateSourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User specified ID for the source. It will become the last
+   * component of the source name. The ID must be unique within the project,
+   * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The ID must match the regular expression:
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sourceId. + */ + java.lang.String getSourceId(); + /** + * + * + *
+   * Required. User specified ID for the source. It will become the last
+   * component of the source name. The ID must be unique within the project,
+   * must conform with RFC-1034, is restricted to lower-cased letters, and has a
+   * maximum length of 63 characters. The ID must match the regular expression:
+   * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+   * 
+ * + * string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sourceId. + */ + com.google.protobuf.ByteString getSourceIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + com.google.cloud.migrationcenter.v1.Source getSource(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.SourceOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DailyResourceUsageAggregation.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DailyResourceUsageAggregation.java new file mode 100644 index 000000000000..14d6249121d8 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DailyResourceUsageAggregation.java @@ -0,0 +1,6200 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Usage data aggregation for a single day.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation} + */ +public final class DailyResourceUsageAggregation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation) + DailyResourceUsageAggregationOrBuilder { + private static final long serialVersionUID = 0L; + // Use DailyResourceUsageAggregation.newBuilder() to construct. + private DailyResourceUsageAggregation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DailyResourceUsageAggregation() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DailyResourceUsageAggregation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Builder.class); + } + + public interface StatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Average usage value.
+     * 
+ * + * float average = 1; + * + * @return The average. + */ + float getAverage(); + + /** + * + * + *
+     * Median usage value.
+     * 
+ * + * float median = 2; + * + * @return The median. + */ + float getMedian(); + + /** + * + * + *
+     * 95th percentile usage value.
+     * 
+ * + * float nintey_fifth_percentile = 3; + * + * @return The ninteyFifthPercentile. + */ + float getNinteyFifthPercentile(); + + /** + * + * + *
+     * Peak usage value.
+     * 
+ * + * float peak = 4; + * + * @return The peak. + */ + float getPeak(); + } + /** + * + * + *
+   * Statistical aggregation of samples for a single resource usage.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats} + */ + public static final class Stats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats) + StatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Stats.newBuilder() to construct. + private Stats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Stats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Stats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Stats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Stats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + .class); + } + + public static final int AVERAGE_FIELD_NUMBER = 1; + private float average_ = 0F; + /** + * + * + *
+     * Average usage value.
+     * 
+ * + * float average = 1; + * + * @return The average. + */ + @java.lang.Override + public float getAverage() { + return average_; + } + + public static final int MEDIAN_FIELD_NUMBER = 2; + private float median_ = 0F; + /** + * + * + *
+     * Median usage value.
+     * 
+ * + * float median = 2; + * + * @return The median. + */ + @java.lang.Override + public float getMedian() { + return median_; + } + + public static final int NINTEY_FIFTH_PERCENTILE_FIELD_NUMBER = 3; + private float ninteyFifthPercentile_ = 0F; + /** + * + * + *
+     * 95th percentile usage value.
+     * 
+ * + * float nintey_fifth_percentile = 3; + * + * @return The ninteyFifthPercentile. + */ + @java.lang.Override + public float getNinteyFifthPercentile() { + return ninteyFifthPercentile_; + } + + public static final int PEAK_FIELD_NUMBER = 4; + private float peak_ = 0F; + /** + * + * + *
+     * Peak usage value.
+     * 
+ * + * float peak = 4; + * + * @return The peak. + */ + @java.lang.Override + public float getPeak() { + return peak_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(average_) != 0) { + output.writeFloat(1, average_); + } + if (java.lang.Float.floatToRawIntBits(median_) != 0) { + output.writeFloat(2, median_); + } + if (java.lang.Float.floatToRawIntBits(ninteyFifthPercentile_) != 0) { + output.writeFloat(3, ninteyFifthPercentile_); + } + if (java.lang.Float.floatToRawIntBits(peak_) != 0) { + output.writeFloat(4, peak_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(average_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, average_); + } + if (java.lang.Float.floatToRawIntBits(median_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, median_); + } + if (java.lang.Float.floatToRawIntBits(ninteyFifthPercentile_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, ninteyFifthPercentile_); + } + if (java.lang.Float.floatToRawIntBits(peak_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, peak_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats other = + (com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats) obj; + + if (java.lang.Float.floatToIntBits(getAverage()) + != java.lang.Float.floatToIntBits(other.getAverage())) return false; + if (java.lang.Float.floatToIntBits(getMedian()) + != java.lang.Float.floatToIntBits(other.getMedian())) return false; + if (java.lang.Float.floatToIntBits(getNinteyFifthPercentile()) + != java.lang.Float.floatToIntBits(other.getNinteyFifthPercentile())) return false; + if (java.lang.Float.floatToIntBits(getPeak()) + != java.lang.Float.floatToIntBits(other.getPeak())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AVERAGE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getAverage()); + hash = (37 * hash) + MEDIAN_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMedian()); + hash = (37 * hash) + NINTEY_FIFTH_PERCENTILE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getNinteyFifthPercentile()); + hash = (37 * hash) + PEAK_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getPeak()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Statistical aggregation of samples for a single resource usage.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats) + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Stats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Stats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + average_ = 0F; + median_ = 0F; + ninteyFifthPercentile_ = 0F; + peak_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Stats_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats build() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + buildPartial() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats result = + new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.average_ = average_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.median_ = median_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ninteyFifthPercentile_ = ninteyFifthPercentile_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.peak_ = peak_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats other) { + if (other + == com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance()) return this; + if (other.getAverage() != 0F) { + setAverage(other.getAverage()); + } + if (other.getMedian() != 0F) { + setMedian(other.getMedian()); + } + if (other.getNinteyFifthPercentile() != 0F) { + setNinteyFifthPercentile(other.getNinteyFifthPercentile()); + } + if (other.getPeak() != 0F) { + setPeak(other.getPeak()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + average_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: + { + median_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: + { + ninteyFifthPercentile_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: + { + peak_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float average_; + /** + * + * + *
+       * Average usage value.
+       * 
+ * + * float average = 1; + * + * @return The average. + */ + @java.lang.Override + public float getAverage() { + return average_; + } + /** + * + * + *
+       * Average usage value.
+       * 
+ * + * float average = 1; + * + * @param value The average to set. + * @return This builder for chaining. + */ + public Builder setAverage(float value) { + + average_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Average usage value.
+       * 
+ * + * float average = 1; + * + * @return This builder for chaining. + */ + public Builder clearAverage() { + bitField0_ = (bitField0_ & ~0x00000001); + average_ = 0F; + onChanged(); + return this; + } + + private float median_; + /** + * + * + *
+       * Median usage value.
+       * 
+ * + * float median = 2; + * + * @return The median. + */ + @java.lang.Override + public float getMedian() { + return median_; + } + /** + * + * + *
+       * Median usage value.
+       * 
+ * + * float median = 2; + * + * @param value The median to set. + * @return This builder for chaining. + */ + public Builder setMedian(float value) { + + median_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Median usage value.
+       * 
+ * + * float median = 2; + * + * @return This builder for chaining. + */ + public Builder clearMedian() { + bitField0_ = (bitField0_ & ~0x00000002); + median_ = 0F; + onChanged(); + return this; + } + + private float ninteyFifthPercentile_; + /** + * + * + *
+       * 95th percentile usage value.
+       * 
+ * + * float nintey_fifth_percentile = 3; + * + * @return The ninteyFifthPercentile. + */ + @java.lang.Override + public float getNinteyFifthPercentile() { + return ninteyFifthPercentile_; + } + /** + * + * + *
+       * 95th percentile usage value.
+       * 
+ * + * float nintey_fifth_percentile = 3; + * + * @param value The ninteyFifthPercentile to set. + * @return This builder for chaining. + */ + public Builder setNinteyFifthPercentile(float value) { + + ninteyFifthPercentile_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * 95th percentile usage value.
+       * 
+ * + * float nintey_fifth_percentile = 3; + * + * @return This builder for chaining. + */ + public Builder clearNinteyFifthPercentile() { + bitField0_ = (bitField0_ & ~0x00000004); + ninteyFifthPercentile_ = 0F; + onChanged(); + return this; + } + + private float peak_; + /** + * + * + *
+       * Peak usage value.
+       * 
+ * + * float peak = 4; + * + * @return The peak. + */ + @java.lang.Override + public float getPeak() { + return peak_; + } + /** + * + * + *
+       * Peak usage value.
+       * 
+ * + * float peak = 4; + * + * @param value The peak to set. + * @return This builder for chaining. + */ + public Builder setPeak(float value) { + + peak_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Peak usage value.
+       * 
+ * + * float peak = 4; + * + * @return This builder for chaining. + */ + public Builder clearPeak() { + bitField0_ = (bitField0_ & ~0x00000008); + peak_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats) + private static final com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats(); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Stats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CPUOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * CPU utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return Whether the utilizationPercentage field is set. + */ + boolean hasUtilizationPercentage(); + /** + * + * + *
+     * CPU utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return The utilizationPercentage. + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + getUtilizationPercentage(); + /** + * + * + *
+     * CPU utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getUtilizationPercentageOrBuilder(); + } + /** + * + * + *
+   * Statistical aggregation of CPU usage.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU} + */ + public static final class CPU extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU) + CPUOrBuilder { + private static final long serialVersionUID = 0L; + // Use CPU.newBuilder() to construct. + private CPU(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CPU() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CPU(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_CPU_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_CPU_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU.Builder.class); + } + + public static final int UTILIZATION_PERCENTAGE_FIELD_NUMBER = 1; + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + utilizationPercentage_; + /** + * + * + *
+     * CPU utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return Whether the utilizationPercentage field is set. + */ + @java.lang.Override + public boolean hasUtilizationPercentage() { + return utilizationPercentage_ != null; + } + /** + * + * + *
+     * CPU utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return The utilizationPercentage. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + getUtilizationPercentage() { + return utilizationPercentage_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : utilizationPercentage_; + } + /** + * + * + *
+     * CPU utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getUtilizationPercentageOrBuilder() { + return utilizationPercentage_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : utilizationPercentage_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (utilizationPercentage_ != null) { + output.writeMessage(1, getUtilizationPercentage()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (utilizationPercentage_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUtilizationPercentage()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU other = + (com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU) obj; + + if (hasUtilizationPercentage() != other.hasUtilizationPercentage()) return false; + if (hasUtilizationPercentage()) { + if (!getUtilizationPercentage().equals(other.getUtilizationPercentage())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUtilizationPercentage()) { + hash = (37 * hash) + UTILIZATION_PERCENTAGE_FIELD_NUMBER; + hash = (53 * hash) + getUtilizationPercentage().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Statistical aggregation of CPU usage.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU) + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPUOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_CPU_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_CPU_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + .Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + utilizationPercentage_ = null; + if (utilizationPercentageBuilder_ != null) { + utilizationPercentageBuilder_.dispose(); + utilizationPercentageBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_CPU_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU build() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU buildPartial() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU result = + new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.utilizationPercentage_ = + utilizationPercentageBuilder_ == null + ? utilizationPercentage_ + : utilizationPercentageBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU other) { + if (other + == com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + .getDefaultInstance()) return this; + if (other.hasUtilizationPercentage()) { + mergeUtilizationPercentage(other.getUtilizationPercentage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getUtilizationPercentageFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + utilizationPercentage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder> + utilizationPercentageBuilder_; + /** + * + * + *
+       * CPU utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return Whether the utilizationPercentage field is set. + */ + public boolean hasUtilizationPercentage() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * CPU utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return The utilizationPercentage. + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + getUtilizationPercentage() { + if (utilizationPercentageBuilder_ == null) { + return utilizationPercentage_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : utilizationPercentage_; + } else { + return utilizationPercentageBuilder_.getMessage(); + } + } + /** + * + * + *
+       * CPU utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public Builder setUtilizationPercentage( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats value) { + if (utilizationPercentageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + utilizationPercentage_ = value; + } else { + utilizationPercentageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * CPU utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public Builder setUtilizationPercentage( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + builderForValue) { + if (utilizationPercentageBuilder_ == null) { + utilizationPercentage_ = builderForValue.build(); + } else { + utilizationPercentageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * CPU utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public Builder mergeUtilizationPercentage( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats value) { + if (utilizationPercentageBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && utilizationPercentage_ != null + && utilizationPercentage_ + != com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance()) { + getUtilizationPercentageBuilder().mergeFrom(value); + } else { + utilizationPercentage_ = value; + } + } else { + utilizationPercentageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * CPU utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public Builder clearUtilizationPercentage() { + bitField0_ = (bitField0_ & ~0x00000001); + utilizationPercentage_ = null; + if (utilizationPercentageBuilder_ != null) { + utilizationPercentageBuilder_.dispose(); + utilizationPercentageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * CPU utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + getUtilizationPercentageBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUtilizationPercentageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * CPU utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getUtilizationPercentageOrBuilder() { + if (utilizationPercentageBuilder_ != null) { + return utilizationPercentageBuilder_.getMessageOrBuilder(); + } else { + return utilizationPercentage_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : utilizationPercentage_; + } + } + /** + * + * + *
+       * CPU utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder> + getUtilizationPercentageFieldBuilder() { + if (utilizationPercentageBuilder_ == null) { + utilizationPercentageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder>( + getUtilizationPercentage(), getParentForChildren(), isClean()); + utilizationPercentage_ = null; + } + return utilizationPercentageBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU) + private static final com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU(); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CPU parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MemoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Memory utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return Whether the utilizationPercentage field is set. + */ + boolean hasUtilizationPercentage(); + /** + * + * + *
+     * Memory utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return The utilizationPercentage. + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + getUtilizationPercentage(); + /** + * + * + *
+     * Memory utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getUtilizationPercentageOrBuilder(); + } + /** + * + * + *
+   * Statistical aggregation of memory usage.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory} + */ + public static final class Memory extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory) + MemoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Memory.newBuilder() to construct. + private Memory(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Memory() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Memory(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Memory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Memory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory.Builder + .class); + } + + public static final int UTILIZATION_PERCENTAGE_FIELD_NUMBER = 1; + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + utilizationPercentage_; + /** + * + * + *
+     * Memory utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return Whether the utilizationPercentage field is set. + */ + @java.lang.Override + public boolean hasUtilizationPercentage() { + return utilizationPercentage_ != null; + } + /** + * + * + *
+     * Memory utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return The utilizationPercentage. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + getUtilizationPercentage() { + return utilizationPercentage_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : utilizationPercentage_; + } + /** + * + * + *
+     * Memory utilization percentage.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getUtilizationPercentageOrBuilder() { + return utilizationPercentage_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : utilizationPercentage_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (utilizationPercentage_ != null) { + output.writeMessage(1, getUtilizationPercentage()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (utilizationPercentage_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUtilizationPercentage()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory other = + (com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory) obj; + + if (hasUtilizationPercentage() != other.hasUtilizationPercentage()) return false; + if (hasUtilizationPercentage()) { + if (!getUtilizationPercentage().equals(other.getUtilizationPercentage())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUtilizationPercentage()) { + hash = (37 * hash) + UTILIZATION_PERCENTAGE_FIELD_NUMBER; + hash = (53 * hash) + getUtilizationPercentage().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Statistical aggregation of memory usage.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory) + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.MemoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Memory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Memory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory.Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + utilizationPercentage_ = null; + if (utilizationPercentageBuilder_ != null) { + utilizationPercentageBuilder_.dispose(); + utilizationPercentageBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Memory_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory build() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + buildPartial() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory result = + new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.utilizationPercentage_ = + utilizationPercentageBuilder_ == null + ? utilizationPercentage_ + : utilizationPercentageBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory other) { + if (other + == com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + .getDefaultInstance()) return this; + if (other.hasUtilizationPercentage()) { + mergeUtilizationPercentage(other.getUtilizationPercentage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getUtilizationPercentageFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + utilizationPercentage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder> + utilizationPercentageBuilder_; + /** + * + * + *
+       * Memory utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return Whether the utilizationPercentage field is set. + */ + public boolean hasUtilizationPercentage() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Memory utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + * + * @return The utilizationPercentage. + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + getUtilizationPercentage() { + if (utilizationPercentageBuilder_ == null) { + return utilizationPercentage_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : utilizationPercentage_; + } else { + return utilizationPercentageBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Memory utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public Builder setUtilizationPercentage( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats value) { + if (utilizationPercentageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + utilizationPercentage_ = value; + } else { + utilizationPercentageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Memory utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public Builder setUtilizationPercentage( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + builderForValue) { + if (utilizationPercentageBuilder_ == null) { + utilizationPercentage_ = builderForValue.build(); + } else { + utilizationPercentageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Memory utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public Builder mergeUtilizationPercentage( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats value) { + if (utilizationPercentageBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && utilizationPercentage_ != null + && utilizationPercentage_ + != com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance()) { + getUtilizationPercentageBuilder().mergeFrom(value); + } else { + utilizationPercentage_ = value; + } + } else { + utilizationPercentageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Memory utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public Builder clearUtilizationPercentage() { + bitField0_ = (bitField0_ & ~0x00000001); + utilizationPercentage_ = null; + if (utilizationPercentageBuilder_ != null) { + utilizationPercentageBuilder_.dispose(); + utilizationPercentageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Memory utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + getUtilizationPercentageBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUtilizationPercentageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Memory utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getUtilizationPercentageOrBuilder() { + if (utilizationPercentageBuilder_ != null) { + return utilizationPercentageBuilder_.getMessageOrBuilder(); + } else { + return utilizationPercentage_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : utilizationPercentage_; + } + } + /** + * + * + *
+       * Memory utilization percentage.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder> + getUtilizationPercentageFieldBuilder() { + if (utilizationPercentageBuilder_ == null) { + utilizationPercentageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder>( + getUtilizationPercentage(), getParentForChildren(), isClean()); + utilizationPercentage_ = null; + } + return utilizationPercentageBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory) + private static final com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory(); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Memory parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NetworkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Network ingress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + * + * @return Whether the ingressBps field is set. + */ + boolean hasIngressBps(); + /** + * + * + *
+     * Network ingress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + * + * @return The ingressBps. + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats getIngressBps(); + /** + * + * + *
+     * Network ingress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getIngressBpsOrBuilder(); + + /** + * + * + *
+     * Network egress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + * + * @return Whether the egressBps field is set. + */ + boolean hasEgressBps(); + /** + * + * + *
+     * Network egress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + * + * @return The egressBps. + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats getEgressBps(); + /** + * + * + *
+     * Network egress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getEgressBpsOrBuilder(); + } + /** + * + * + *
+   * Statistical aggregation of network usage.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network} + */ + public static final class Network extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network) + NetworkOrBuilder { + private static final long serialVersionUID = 0L; + // Use Network.newBuilder() to construct. + private Network(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Network() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Network(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Network_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Network_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network.Builder + .class); + } + + public static final int INGRESS_BPS_FIELD_NUMBER = 1; + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingressBps_; + /** + * + * + *
+     * Network ingress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + * + * @return Whether the ingressBps field is set. + */ + @java.lang.Override + public boolean hasIngressBps() { + return ingressBps_ != null; + } + /** + * + * + *
+     * Network ingress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + * + * @return The ingressBps. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats getIngressBps() { + return ingressBps_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : ingressBps_; + } + /** + * + * + *
+     * Network ingress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getIngressBpsOrBuilder() { + return ingressBps_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : ingressBps_; + } + + public static final int EGRESS_BPS_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egressBps_; + /** + * + * + *
+     * Network egress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + * + * @return Whether the egressBps field is set. + */ + @java.lang.Override + public boolean hasEgressBps() { + return egressBps_ != null; + } + /** + * + * + *
+     * Network egress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + * + * @return The egressBps. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats getEgressBps() { + return egressBps_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : egressBps_; + } + /** + * + * + *
+     * Network egress in B/s.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getEgressBpsOrBuilder() { + return egressBps_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : egressBps_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (ingressBps_ != null) { + output.writeMessage(1, getIngressBps()); + } + if (egressBps_ != null) { + output.writeMessage(2, getEgressBps()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (ingressBps_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIngressBps()); + } + if (egressBps_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEgressBps()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network other = + (com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network) obj; + + if (hasIngressBps() != other.hasIngressBps()) return false; + if (hasIngressBps()) { + if (!getIngressBps().equals(other.getIngressBps())) return false; + } + if (hasEgressBps() != other.hasEgressBps()) return false; + if (hasEgressBps()) { + if (!getEgressBps().equals(other.getEgressBps())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIngressBps()) { + hash = (37 * hash) + INGRESS_BPS_FIELD_NUMBER; + hash = (53 * hash) + getIngressBps().hashCode(); + } + if (hasEgressBps()) { + hash = (37 * hash) + EGRESS_BPS_FIELD_NUMBER; + hash = (53 * hash) + getEgressBps().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Statistical aggregation of network usage.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network) + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.NetworkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Network_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Network_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network.Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ingressBps_ = null; + if (ingressBpsBuilder_ != null) { + ingressBpsBuilder_.dispose(); + ingressBpsBuilder_ = null; + } + egressBps_ = null; + if (egressBpsBuilder_ != null) { + egressBpsBuilder_.dispose(); + egressBpsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Network_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network build() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + buildPartial() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network result = + new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ingressBps_ = + ingressBpsBuilder_ == null ? ingressBps_ : ingressBpsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.egressBps_ = egressBpsBuilder_ == null ? egressBps_ : egressBpsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network other) { + if (other + == com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + .getDefaultInstance()) return this; + if (other.hasIngressBps()) { + mergeIngressBps(other.getIngressBps()); + } + if (other.hasEgressBps()) { + mergeEgressBps(other.getEgressBps()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getIngressBpsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEgressBpsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingressBps_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder> + ingressBpsBuilder_; + /** + * + * + *
+       * Network ingress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + * + * @return Whether the ingressBps field is set. + */ + public boolean hasIngressBps() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Network ingress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + * + * @return The ingressBps. + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + getIngressBps() { + if (ingressBpsBuilder_ == null) { + return ingressBps_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : ingressBps_; + } else { + return ingressBpsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Network ingress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + */ + public Builder setIngressBps( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats value) { + if (ingressBpsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ingressBps_ = value; + } else { + ingressBpsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Network ingress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + */ + public Builder setIngressBps( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + builderForValue) { + if (ingressBpsBuilder_ == null) { + ingressBps_ = builderForValue.build(); + } else { + ingressBpsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Network ingress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + */ + public Builder mergeIngressBps( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats value) { + if (ingressBpsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && ingressBps_ != null + && ingressBps_ + != com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance()) { + getIngressBpsBuilder().mergeFrom(value); + } else { + ingressBps_ = value; + } + } else { + ingressBpsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Network ingress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + */ + public Builder clearIngressBps() { + bitField0_ = (bitField0_ & ~0x00000001); + ingressBps_ = null; + if (ingressBpsBuilder_ != null) { + ingressBpsBuilder_.dispose(); + ingressBpsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Network ingress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + getIngressBpsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIngressBpsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Network ingress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getIngressBpsOrBuilder() { + if (ingressBpsBuilder_ != null) { + return ingressBpsBuilder_.getMessageOrBuilder(); + } else { + return ingressBps_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : ingressBps_; + } + } + /** + * + * + *
+       * Network ingress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder> + getIngressBpsFieldBuilder() { + if (ingressBpsBuilder_ == null) { + ingressBpsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder>( + getIngressBps(), getParentForChildren(), isClean()); + ingressBps_ = null; + } + return ingressBpsBuilder_; + } + + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egressBps_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder> + egressBpsBuilder_; + /** + * + * + *
+       * Network egress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + * + * @return Whether the egressBps field is set. + */ + public boolean hasEgressBps() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Network egress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + * + * @return The egressBps. + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + getEgressBps() { + if (egressBpsBuilder_ == null) { + return egressBps_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : egressBps_; + } else { + return egressBpsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Network egress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + */ + public Builder setEgressBps( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats value) { + if (egressBpsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + egressBps_ = value; + } else { + egressBpsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Network egress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + */ + public Builder setEgressBps( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + builderForValue) { + if (egressBpsBuilder_ == null) { + egressBps_ = builderForValue.build(); + } else { + egressBpsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Network egress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + */ + public Builder mergeEgressBps( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats value) { + if (egressBpsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && egressBps_ != null + && egressBps_ + != com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance()) { + getEgressBpsBuilder().mergeFrom(value); + } else { + egressBps_ = value; + } + } else { + egressBpsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Network egress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + */ + public Builder clearEgressBps() { + bitField0_ = (bitField0_ & ~0x00000002); + egressBps_ = null; + if (egressBpsBuilder_ != null) { + egressBpsBuilder_.dispose(); + egressBpsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Network egress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + getEgressBpsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEgressBpsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Network egress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getEgressBpsOrBuilder() { + if (egressBpsBuilder_ != null) { + return egressBpsBuilder_.getMessageOrBuilder(); + } else { + return egressBps_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : egressBps_; + } + } + /** + * + * + *
+       * Network egress in B/s.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder> + getEgressBpsFieldBuilder() { + if (egressBpsBuilder_ == null) { + egressBpsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder>( + getEgressBps(), getParentForChildren(), isClean()); + egressBps_ = null; + } + return egressBpsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network) + private static final com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network(); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Network parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DiskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Disk I/O operations per second.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + * + * @return Whether the iops field is set. + */ + boolean hasIops(); + /** + * + * + *
+     * Disk I/O operations per second.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + * + * @return The iops. + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats getIops(); + /** + * + * + *
+     * Disk I/O operations per second.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getIopsOrBuilder(); + } + /** + * + * + *
+   * Statistical aggregation of disk usage.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk} + */ + public static final class Disk extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk) + DiskOrBuilder { + private static final long serialVersionUID = 0L; + // Use Disk.newBuilder() to construct. + private Disk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Disk() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Disk(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Disk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Disk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk.Builder.class); + } + + public static final int IOPS_FIELD_NUMBER = 1; + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops_; + /** + * + * + *
+     * Disk I/O operations per second.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + * + * @return Whether the iops field is set. + */ + @java.lang.Override + public boolean hasIops() { + return iops_ != null; + } + /** + * + * + *
+     * Disk I/O operations per second.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + * + * @return The iops. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats getIops() { + return iops_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : iops_; + } + /** + * + * + *
+     * Disk I/O operations per second.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getIopsOrBuilder() { + return iops_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : iops_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (iops_ != null) { + output.writeMessage(1, getIops()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (iops_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIops()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk other = + (com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk) obj; + + if (hasIops() != other.hasIops()) return false; + if (hasIops()) { + if (!getIops().equals(other.getIops())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIops()) { + hash = (37 * hash) + IOPS_FIELD_NUMBER; + hash = (53 * hash) + getIops().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Statistical aggregation of disk usage.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk) + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.DiskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Disk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Disk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk.Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + iops_ = null; + if (iopsBuilder_ != null) { + iopsBuilder_.dispose(); + iopsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Disk_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk build() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk buildPartial() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk result = + new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.iops_ = iopsBuilder_ == null ? iops_ : iopsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk other) { + if (other + == com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + .getDefaultInstance()) return this; + if (other.hasIops()) { + mergeIops(other.getIops()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getIopsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder> + iopsBuilder_; + /** + * + * + *
+       * Disk I/O operations per second.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + * + * @return Whether the iops field is set. + */ + public boolean hasIops() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Disk I/O operations per second.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + * + * @return The iops. + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats getIops() { + if (iopsBuilder_ == null) { + return iops_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : iops_; + } else { + return iopsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Disk I/O operations per second.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + */ + public Builder setIops( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats value) { + if (iopsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + iops_ = value; + } else { + iopsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Disk I/O operations per second.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + */ + public Builder setIops( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + builderForValue) { + if (iopsBuilder_ == null) { + iops_ = builderForValue.build(); + } else { + iopsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Disk I/O operations per second.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + */ + public Builder mergeIops( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats value) { + if (iopsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && iops_ != null + && iops_ + != com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance()) { + getIopsBuilder().mergeFrom(value); + } else { + iops_ = value; + } + } else { + iopsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Disk I/O operations per second.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + */ + public Builder clearIops() { + bitField0_ = (bitField0_ & ~0x00000001); + iops_ = null; + if (iopsBuilder_ != null) { + iopsBuilder_.dispose(); + iopsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Disk I/O operations per second.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder + getIopsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIopsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Disk I/O operations per second.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder + getIopsOrBuilder() { + if (iopsBuilder_ != null) { + return iopsBuilder_.getMessageOrBuilder(); + } else { + return iops_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + .getDefaultInstance() + : iops_; + } + } + /** + * + * + *
+       * Disk I/O operations per second.
+       * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder> + getIopsFieldBuilder() { + if (iopsBuilder_ == null) { + iopsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.StatsOrBuilder>( + getIops(), getParentForChildren(), isClean()); + iops_ = null; + } + return iopsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk) + private static final com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk(); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Disk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DATE_FIELD_NUMBER = 1; + private com.google.type.Date date_; + /** + * + * + *
+   * Aggregation date. Day boundaries are at midnight UTC.
+   * 
+ * + * .google.type.Date date = 1; + * + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return date_ != null; + } + /** + * + * + *
+   * Aggregation date. Day boundaries are at midnight UTC.
+   * 
+ * + * .google.type.Date date = 1; + * + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + /** + * + * + *
+   * Aggregation date. Day boundaries are at midnight UTC.
+   * 
+ * + * .google.type.Date date = 1; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + public static final int CPU_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu_; + /** + * + * + *
+   * CPU usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + * + * @return Whether the cpu field is set. + */ + @java.lang.Override + public boolean hasCpu() { + return cpu_ != null; + } + /** + * + * + *
+   * CPU usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + * + * @return The cpu. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU getCpu() { + return cpu_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU.getDefaultInstance() + : cpu_; + } + /** + * + * + *
+   * CPU usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPUOrBuilder + getCpuOrBuilder() { + return cpu_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU.getDefaultInstance() + : cpu_; + } + + public static final int MEMORY_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory_; + /** + * + * + *
+   * Memory usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + * @return Whether the memory field is set. + */ + @java.lang.Override + public boolean hasMemory() { + return memory_ != null; + } + /** + * + * + *
+   * Memory usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + * @return The memory. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory getMemory() { + return memory_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + .getDefaultInstance() + : memory_; + } + /** + * + * + *
+   * Memory usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.MemoryOrBuilder + getMemoryOrBuilder() { + return memory_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + .getDefaultInstance() + : memory_; + } + + public static final int NETWORK_FIELD_NUMBER = 4; + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network_; + /** + * + * + *
+   * Network usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return network_ != null; + } + /** + * + * + *
+   * Network usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + * + * @return The network. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network getNetwork() { + return network_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + .getDefaultInstance() + : network_; + } + /** + * + * + *
+   * Network usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.NetworkOrBuilder + getNetworkOrBuilder() { + return network_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + .getDefaultInstance() + : network_; + } + + public static final int DISK_FIELD_NUMBER = 5; + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk_; + /** + * + * + *
+   * Disk usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + * + * @return Whether the disk field is set. + */ + @java.lang.Override + public boolean hasDisk() { + return disk_ != null; + } + /** + * + * + *
+   * Disk usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + * + * @return The disk. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk getDisk() { + return disk_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + .getDefaultInstance() + : disk_; + } + /** + * + * + *
+   * Disk usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.DiskOrBuilder + getDiskOrBuilder() { + return disk_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + .getDefaultInstance() + : disk_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (date_ != null) { + output.writeMessage(1, getDate()); + } + if (cpu_ != null) { + output.writeMessage(2, getCpu()); + } + if (memory_ != null) { + output.writeMessage(3, getMemory()); + } + if (network_ != null) { + output.writeMessage(4, getNetwork()); + } + if (disk_ != null) { + output.writeMessage(5, getDisk()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (date_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDate()); + } + if (cpu_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCpu()); + } + if (memory_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMemory()); + } + if (network_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getNetwork()); + } + if (disk_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDisk()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation other = + (com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation) obj; + + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate().equals(other.getDate())) return false; + } + if (hasCpu() != other.hasCpu()) return false; + if (hasCpu()) { + if (!getCpu().equals(other.getCpu())) return false; + } + if (hasMemory() != other.hasMemory()) return false; + if (hasMemory()) { + if (!getMemory().equals(other.getMemory())) return false; + } + if (hasNetwork() != other.hasNetwork()) return false; + if (hasNetwork()) { + if (!getNetwork().equals(other.getNetwork())) return false; + } + if (hasDisk() != other.hasDisk()) return false; + if (hasDisk()) { + if (!getDisk().equals(other.getDisk())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + if (hasCpu()) { + hash = (37 * hash) + CPU_FIELD_NUMBER; + hash = (53 * hash) + getCpu().hashCode(); + } + if (hasMemory()) { + hash = (37 * hash) + MEMORY_FIELD_NUMBER; + hash = (53 * hash) + getMemory().hashCode(); + } + if (hasNetwork()) { + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + } + if (hasDisk()) { + hash = (37 * hash) + DISK_FIELD_NUMBER; + hash = (53 * hash) + getDisk().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Usage data aggregation for a single day.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DailyResourceUsageAggregation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation) + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.class, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Builder.class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + cpu_ = null; + if (cpuBuilder_ != null) { + cpuBuilder_.dispose(); + cpuBuilder_ = null; + } + memory_ = null; + if (memoryBuilder_ != null) { + memoryBuilder_.dispose(); + memoryBuilder_ = null; + } + network_ = null; + if (networkBuilder_ != null) { + networkBuilder_.dispose(); + networkBuilder_ = null; + } + disk_ = null; + if (diskBuilder_ != null) { + diskBuilder_.dispose(); + diskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation build() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation buildPartial() { + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation result = + new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cpu_ = cpuBuilder_ == null ? cpu_ : cpuBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.memory_ = memoryBuilder_ == null ? memory_ : memoryBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.network_ = networkBuilder_ == null ? network_ : networkBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.disk_ = diskBuilder_ == null ? disk_ : diskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation other) { + if (other + == com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.getDefaultInstance()) + return this; + if (other.hasDate()) { + mergeDate(other.getDate()); + } + if (other.hasCpu()) { + mergeCpu(other.getCpu()); + } + if (other.hasMemory()) { + mergeMemory(other.getMemory()); + } + if (other.hasNetwork()) { + mergeNetwork(other.getNetwork()); + } + if (other.hasDisk()) { + mergeDisk(other.getDisk()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCpuFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getMemoryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getNetworkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getDiskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateBuilder_; + /** + * + * + *
+     * Aggregation date. Day boundaries are at midnight UTC.
+     * 
+ * + * .google.type.Date date = 1; + * + * @return Whether the date field is set. + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Aggregation date. Day boundaries are at midnight UTC.
+     * 
+ * + * .google.type.Date date = 1; + * + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Aggregation date. Day boundaries are at midnight UTC.
+     * 
+ * + * .google.type.Date date = 1; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + } else { + dateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation date. Day boundaries are at midnight UTC.
+     * 
+ * + * .google.type.Date date = 1; + */ + public Builder setDate(com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation date. Day boundaries are at midnight UTC.
+     * 
+ * + * .google.type.Date date = 1; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && date_ != null + && date_ != com.google.type.Date.getDefaultInstance()) { + getDateBuilder().mergeFrom(value); + } else { + date_ = value; + } + } else { + dateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation date. Day boundaries are at midnight UTC.
+     * 
+ * + * .google.type.Date date = 1; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000001); + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation date. Day boundaries are at midnight UTC.
+     * 
+ * + * .google.type.Date date = 1; + */ + public com.google.type.Date.Builder getDateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Aggregation date. Day boundaries are at midnight UTC.
+     * 
+ * + * .google.type.Date date = 1; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + } + /** + * + * + *
+     * Aggregation date. Day boundaries are at midnight UTC.
+     * 
+ * + * .google.type.Date date = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getDate(), getParentForChildren(), isClean()); + date_ = null; + } + return dateBuilder_; + } + + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPUOrBuilder> + cpuBuilder_; + /** + * + * + *
+     * CPU usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + * + * @return Whether the cpu field is set. + */ + public boolean hasCpu() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * CPU usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + * + * @return The cpu. + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU getCpu() { + if (cpuBuilder_ == null) { + return cpu_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + .getDefaultInstance() + : cpu_; + } else { + return cpuBuilder_.getMessage(); + } + } + /** + * + * + *
+     * CPU usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + */ + public Builder setCpu( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU value) { + if (cpuBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cpu_ = value; + } else { + cpuBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * CPU usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + */ + public Builder setCpu( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU.Builder + builderForValue) { + if (cpuBuilder_ == null) { + cpu_ = builderForValue.build(); + } else { + cpuBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * CPU usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + */ + public Builder mergeCpu( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU value) { + if (cpuBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && cpu_ != null + && cpu_ + != com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + .getDefaultInstance()) { + getCpuBuilder().mergeFrom(value); + } else { + cpu_ = value; + } + } else { + cpuBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * CPU usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + */ + public Builder clearCpu() { + bitField0_ = (bitField0_ & ~0x00000002); + cpu_ = null; + if (cpuBuilder_ != null) { + cpuBuilder_.dispose(); + cpuBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * CPU usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU.Builder + getCpuBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCpuFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * CPU usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPUOrBuilder + getCpuOrBuilder() { + if (cpuBuilder_ != null) { + return cpuBuilder_.getMessageOrBuilder(); + } else { + return cpu_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + .getDefaultInstance() + : cpu_; + } + } + /** + * + * + *
+     * CPU usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPUOrBuilder> + getCpuFieldBuilder() { + if (cpuBuilder_ == null) { + cpuBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPUOrBuilder>( + getCpu(), getParentForChildren(), isClean()); + cpu_ = null; + } + return cpuBuilder_; + } + + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.MemoryOrBuilder> + memoryBuilder_; + /** + * + * + *
+     * Memory usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + * + * @return Whether the memory field is set. + */ + public boolean hasMemory() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Memory usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + * + * @return The memory. + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory getMemory() { + if (memoryBuilder_ == null) { + return memory_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + .getDefaultInstance() + : memory_; + } else { + return memoryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Memory usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + */ + public Builder setMemory( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory value) { + if (memoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + memory_ = value; + } else { + memoryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Memory usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + */ + public Builder setMemory( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory.Builder + builderForValue) { + if (memoryBuilder_ == null) { + memory_ = builderForValue.build(); + } else { + memoryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Memory usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + */ + public Builder mergeMemory( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory value) { + if (memoryBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && memory_ != null + && memory_ + != com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + .getDefaultInstance()) { + getMemoryBuilder().mergeFrom(value); + } else { + memory_ = value; + } + } else { + memoryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Memory usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + */ + public Builder clearMemory() { + bitField0_ = (bitField0_ & ~0x00000004); + memory_ = null; + if (memoryBuilder_ != null) { + memoryBuilder_.dispose(); + memoryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Memory usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory.Builder + getMemoryBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMemoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Memory usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.MemoryOrBuilder + getMemoryOrBuilder() { + if (memoryBuilder_ != null) { + return memoryBuilder_.getMessageOrBuilder(); + } else { + return memory_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + .getDefaultInstance() + : memory_; + } + } + /** + * + * + *
+     * Memory usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.MemoryOrBuilder> + getMemoryFieldBuilder() { + if (memoryBuilder_ == null) { + memoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.MemoryOrBuilder>( + getMemory(), getParentForChildren(), isClean()); + memory_ = null; + } + return memoryBuilder_; + } + + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.NetworkOrBuilder> + networkBuilder_; + /** + * + * + *
+     * Network usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + * + * @return Whether the network field is set. + */ + public boolean hasNetwork() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Network usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + * + * @return The network. + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network getNetwork() { + if (networkBuilder_ == null) { + return network_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + .getDefaultInstance() + : network_; + } else { + return networkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Network usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + */ + public Builder setNetwork( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network value) { + if (networkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + } else { + networkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Network usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + */ + public Builder setNetwork( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network.Builder + builderForValue) { + if (networkBuilder_ == null) { + network_ = builderForValue.build(); + } else { + networkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Network usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + */ + public Builder mergeNetwork( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network value) { + if (networkBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && network_ != null + && network_ + != com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + .getDefaultInstance()) { + getNetworkBuilder().mergeFrom(value); + } else { + network_ = value; + } + } else { + networkBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Network usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + */ + public Builder clearNetwork() { + bitField0_ = (bitField0_ & ~0x00000008); + network_ = null; + if (networkBuilder_ != null) { + networkBuilder_.dispose(); + networkBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Network usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network.Builder + getNetworkBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Network usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.NetworkOrBuilder + getNetworkOrBuilder() { + if (networkBuilder_ != null) { + return networkBuilder_.getMessageOrBuilder(); + } else { + return network_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + .getDefaultInstance() + : network_; + } + } + /** + * + * + *
+     * Network usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.NetworkOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + networkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.NetworkOrBuilder>( + getNetwork(), getParentForChildren(), isClean()); + network_ = null; + } + return networkBuilder_; + } + + private com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.DiskOrBuilder> + diskBuilder_; + /** + * + * + *
+     * Disk usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + * + * @return Whether the disk field is set. + */ + public boolean hasDisk() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Disk usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + * + * @return The disk. + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk getDisk() { + if (diskBuilder_ == null) { + return disk_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + .getDefaultInstance() + : disk_; + } else { + return diskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Disk usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + */ + public Builder setDisk( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk value) { + if (diskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + disk_ = value; + } else { + diskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + */ + public Builder setDisk( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk.Builder + builderForValue) { + if (diskBuilder_ == null) { + disk_ = builderForValue.build(); + } else { + diskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + */ + public Builder mergeDisk( + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk value) { + if (diskBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && disk_ != null + && disk_ + != com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + .getDefaultInstance()) { + getDiskBuilder().mergeFrom(value); + } else { + disk_ = value; + } + } else { + diskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + */ + public Builder clearDisk() { + bitField0_ = (bitField0_ & ~0x00000010); + disk_ = null; + if (diskBuilder_ != null) { + diskBuilder_.dispose(); + diskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Disk usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk.Builder + getDiskBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getDiskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Disk usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + */ + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.DiskOrBuilder + getDiskOrBuilder() { + if (diskBuilder_ != null) { + return diskBuilder_.getMessageOrBuilder(); + } else { + return disk_ == null + ? com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + .getDefaultInstance() + : disk_; + } + } + /** + * + * + *
+     * Disk usage.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.DiskOrBuilder> + getDiskFieldBuilder() { + if (diskBuilder_ == null) { + diskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk.Builder, + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.DiskOrBuilder>( + getDisk(), getParentForChildren(), isClean()); + disk_ = null; + } + return diskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation) + private static final com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation(); + } + + public static com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailyResourceUsageAggregation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DailyResourceUsageAggregationOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DailyResourceUsageAggregationOrBuilder.java new file mode 100644 index 000000000000..cce284801b73 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DailyResourceUsageAggregationOrBuilder.java @@ -0,0 +1,206 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DailyResourceUsageAggregationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DailyResourceUsageAggregation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Aggregation date. Day boundaries are at midnight UTC.
+   * 
+ * + * .google.type.Date date = 1; + * + * @return Whether the date field is set. + */ + boolean hasDate(); + /** + * + * + *
+   * Aggregation date. Day boundaries are at midnight UTC.
+   * 
+ * + * .google.type.Date date = 1; + * + * @return The date. + */ + com.google.type.Date getDate(); + /** + * + * + *
+   * Aggregation date. Day boundaries are at midnight UTC.
+   * 
+ * + * .google.type.Date date = 1; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + + /** + * + * + *
+   * CPU usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + * + * @return Whether the cpu field is set. + */ + boolean hasCpu(); + /** + * + * + *
+   * CPU usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + * + * @return The cpu. + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU getCpu(); + /** + * + * + *
+   * CPU usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPUOrBuilder getCpuOrBuilder(); + + /** + * + * + *
+   * Memory usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + * @return Whether the memory field is set. + */ + boolean hasMemory(); + /** + * + * + *
+   * Memory usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * + * @return The memory. + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory getMemory(); + /** + * + * + *
+   * Memory usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.MemoryOrBuilder + getMemoryOrBuilder(); + + /** + * + * + *
+   * Network usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * Network usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + * + * @return The network. + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network getNetwork(); + /** + * + * + *
+   * Network usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.NetworkOrBuilder + getNetworkOrBuilder(); + + /** + * + * + *
+   * Disk usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + * + * @return Whether the disk field is set. + */ + boolean hasDisk(); + /** + * + * + *
+   * Disk usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + * + * @return The disk. + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk getDisk(); + /** + * + * + *
+   * Disk usage.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + */ + com.google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.DiskOrBuilder + getDiskOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteAssetRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteAssetRequest.java new file mode 100644 index 000000000000..2eac95ed8c60 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteAssetRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to delete an asset.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteAssetRequest} + */ +public final class DeleteAssetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DeleteAssetRequest) + DeleteAssetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAssetRequest.newBuilder() to construct. + private DeleteAssetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAssetRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAssetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteAssetRequest.class, + com.google.cloud.migrationcenter.v1.DeleteAssetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DeleteAssetRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DeleteAssetRequest other = + (com.google.cloud.migrationcenter.v1.DeleteAssetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DeleteAssetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete an asset.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteAssetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DeleteAssetRequest) + com.google.cloud.migrationcenter.v1.DeleteAssetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteAssetRequest.class, + com.google.cloud.migrationcenter.v1.DeleteAssetRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DeleteAssetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteAssetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteAssetRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DeleteAssetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteAssetRequest build() { + com.google.cloud.migrationcenter.v1.DeleteAssetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteAssetRequest buildPartial() { + com.google.cloud.migrationcenter.v1.DeleteAssetRequest result = + new com.google.cloud.migrationcenter.v1.DeleteAssetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.DeleteAssetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DeleteAssetRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DeleteAssetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DeleteAssetRequest other) { + if (other == com.google.cloud.migrationcenter.v1.DeleteAssetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DeleteAssetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DeleteAssetRequest) + private static final com.google.cloud.migrationcenter.v1.DeleteAssetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DeleteAssetRequest(); + } + + public static com.google.cloud.migrationcenter.v1.DeleteAssetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAssetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteAssetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteAssetRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteAssetRequestOrBuilder.java new file mode 100644 index 000000000000..015315c4f1ad --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteAssetRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DeleteAssetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DeleteAssetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteGroupRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteGroupRequest.java new file mode 100644 index 000000000000..a8ecea248484 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteGroupRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to delete a group.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteGroupRequest} + */ +public final class DeleteGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DeleteGroupRequest) + DeleteGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteGroupRequest.newBuilder() to construct. + private DeleteGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteGroupRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteGroupRequest.class, + com.google.cloud.migrationcenter.v1.DeleteGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the group resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the group resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DeleteGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DeleteGroupRequest other = + (com.google.cloud.migrationcenter.v1.DeleteGroupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DeleteGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete a group.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DeleteGroupRequest) + com.google.cloud.migrationcenter.v1.DeleteGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteGroupRequest.class, + com.google.cloud.migrationcenter.v1.DeleteGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DeleteGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteGroupRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DeleteGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteGroupRequest build() { + com.google.cloud.migrationcenter.v1.DeleteGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteGroupRequest buildPartial() { + com.google.cloud.migrationcenter.v1.DeleteGroupRequest result = + new com.google.cloud.migrationcenter.v1.DeleteGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.DeleteGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DeleteGroupRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DeleteGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DeleteGroupRequest other) { + if (other == com.google.cloud.migrationcenter.v1.DeleteGroupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the group resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the group resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the group resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the group resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the group resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DeleteGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DeleteGroupRequest) + private static final com.google.cloud.migrationcenter.v1.DeleteGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DeleteGroupRequest(); + } + + public static com.google.cloud.migrationcenter.v1.DeleteGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteGroupRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteGroupRequestOrBuilder.java new file mode 100644 index 000000000000..34b0eb1983e7 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteGroupRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DeleteGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DeleteGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the group resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the group resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportDataFileRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportDataFileRequest.java new file mode 100644 index 000000000000..061640f93cbf --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportDataFileRequest.java @@ -0,0 +1,912 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to delete an `ImportDataFile` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteImportDataFileRequest} + */ +public final class DeleteImportDataFileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DeleteImportDataFileRequest) + DeleteImportDataFileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteImportDataFileRequest.newBuilder() to construct. + private DeleteImportDataFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteImportDataFileRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteImportDataFileRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteImportDataFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteImportDataFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest.class, + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the ImportDataFile to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the ImportDataFile to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest other = + (com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete an `ImportDataFile` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteImportDataFileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DeleteImportDataFileRequest) + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteImportDataFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteImportDataFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest.class, + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteImportDataFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest build() { + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest buildPartial() { + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest result = + new com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the ImportDataFile to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the ImportDataFile to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the ImportDataFile to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the ImportDataFile to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the ImportDataFile to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DeleteImportDataFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DeleteImportDataFileRequest) + private static final com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest(); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteImportDataFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportDataFileRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportDataFileRequestOrBuilder.java new file mode 100644 index 000000000000..d37a2ba70ff3 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportDataFileRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DeleteImportDataFileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DeleteImportDataFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the ImportDataFile to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the ImportDataFile to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportJobRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportJobRequest.java new file mode 100644 index 000000000000..3d12fe5c4c52 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportJobRequest.java @@ -0,0 +1,1006 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to delete an import job.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteImportJobRequest} + */ +public final class DeleteImportJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DeleteImportJobRequest) + DeleteImportJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteImportJobRequest.newBuilder() to construct. + private DeleteImportJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteImportJobRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteImportJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest.class, + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + /** + * + * + *
+   * Optional. If set to `true`, any `ImportDataFiles` of this job will also be
+   * deleted If set to `false`, the request only works if the job has no data
+   * files.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DeleteImportJobRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest other = + (com.google.cloud.migrationcenter.v1.DeleteImportJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete an import job.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteImportJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DeleteImportJobRequest) + com.google.cloud.migrationcenter.v1.DeleteImportJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest.class, + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DeleteImportJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteImportJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteImportJobRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DeleteImportJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteImportJobRequest build() { + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteImportJobRequest buildPartial() { + com.google.cloud.migrationcenter.v1.DeleteImportJobRequest result = + new com.google.cloud.migrationcenter.v1.DeleteImportJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.DeleteImportJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DeleteImportJobRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DeleteImportJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DeleteImportJobRequest other) { + if (other == com.google.cloud.migrationcenter.v1.DeleteImportJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * Optional. If set to `true`, any `ImportDataFiles` of this job will also be
+     * deleted If set to `false`, the request only works if the job has no data
+     * files.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Optional. If set to `true`, any `ImportDataFiles` of this job will also be
+     * deleted If set to `false`, the request only works if the job has no data
+     * files.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to `true`, any `ImportDataFiles` of this job will also be
+     * deleted If set to `false`, the request only works if the job has no data
+     * files.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DeleteImportJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DeleteImportJobRequest) + private static final com.google.cloud.migrationcenter.v1.DeleteImportJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DeleteImportJobRequest(); + } + + public static com.google.cloud.migrationcenter.v1.DeleteImportJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteImportJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteImportJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportJobRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportJobRequestOrBuilder.java new file mode 100644 index 000000000000..4ddc3e10108f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteImportJobRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DeleteImportJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DeleteImportJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to `true`, any `ImportDataFiles` of this job will also be
+   * deleted If set to `false`, the request only works if the job has no data
+   * files.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeletePreferenceSetRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeletePreferenceSetRequest.java new file mode 100644 index 000000000000..bb98e764374a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeletePreferenceSetRequest.java @@ -0,0 +1,911 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to delete a preference set.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeletePreferenceSetRequest} + */ +public final class DeletePreferenceSetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DeletePreferenceSetRequest) + DeletePreferenceSetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeletePreferenceSetRequest.newBuilder() to construct. + private DeletePreferenceSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePreferenceSetRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePreferenceSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeletePreferenceSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeletePreferenceSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest.class, + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the group resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the group resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest other = + (com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete a preference set.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeletePreferenceSetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DeletePreferenceSetRequest) + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeletePreferenceSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeletePreferenceSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest.class, + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeletePreferenceSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest build() { + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest buildPartial() { + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest result = + new com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the group resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the group resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the group resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the group resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the group resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DeletePreferenceSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DeletePreferenceSetRequest) + private static final com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest(); + } + + public static com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePreferenceSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeletePreferenceSetRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeletePreferenceSetRequestOrBuilder.java new file mode 100644 index 000000000000..7e8a2f37421f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeletePreferenceSetRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DeletePreferenceSetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DeletePreferenceSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the group resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the group resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportConfigRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportConfigRequest.java new file mode 100644 index 000000000000..3cdb525bc275 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportConfigRequest.java @@ -0,0 +1,1010 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to delete a ReportConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteReportConfigRequest} + */ +public final class DeleteReportConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DeleteReportConfigRequest) + DeleteReportConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteReportConfigRequest.newBuilder() to construct. + private DeleteReportConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteReportConfigRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteReportConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteReportConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteReportConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest.class, + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + /** + * + * + *
+   * Optional. If set to `true`, any child `Reports` of this entity will also be
+   * deleted. If set to `false`, the request only works if the resource has no
+   * children.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest other = + (com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete a ReportConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteReportConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DeleteReportConfigRequest) + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteReportConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteReportConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest.class, + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteReportConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest build() { + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest buildPartial() { + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest result = + new com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * Optional. If set to `true`, any child `Reports` of this entity will also be
+     * deleted. If set to `false`, the request only works if the resource has no
+     * children.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Optional. If set to `true`, any child `Reports` of this entity will also be
+     * deleted. If set to `false`, the request only works if the resource has no
+     * children.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to `true`, any child `Reports` of this entity will also be
+     * deleted. If set to `false`, the request only works if the resource has no
+     * children.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DeleteReportConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DeleteReportConfigRequest) + private static final com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest(); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteReportConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportConfigRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportConfigRequestOrBuilder.java new file mode 100644 index 000000000000..98e102f14e19 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportConfigRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DeleteReportConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DeleteReportConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to `true`, any child `Reports` of this entity will also be
+   * deleted. If set to `false`, the request only works if the resource has no
+   * children.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportRequest.java new file mode 100644 index 000000000000..1514260c550e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to delete a Report.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteReportRequest} + */ +public final class DeleteReportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DeleteReportRequest) + DeleteReportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteReportRequest.newBuilder() to construct. + private DeleteReportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteReportRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteReportRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteReportRequest.class, + com.google.cloud.migrationcenter.v1.DeleteReportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DeleteReportRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DeleteReportRequest other = + (com.google.cloud.migrationcenter.v1.DeleteReportRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DeleteReportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete a Report.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteReportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DeleteReportRequest) + com.google.cloud.migrationcenter.v1.DeleteReportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteReportRequest.class, + com.google.cloud.migrationcenter.v1.DeleteReportRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DeleteReportRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteReportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteReportRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DeleteReportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteReportRequest build() { + com.google.cloud.migrationcenter.v1.DeleteReportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteReportRequest buildPartial() { + com.google.cloud.migrationcenter.v1.DeleteReportRequest result = + new com.google.cloud.migrationcenter.v1.DeleteReportRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.DeleteReportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DeleteReportRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DeleteReportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DeleteReportRequest other) { + if (other == com.google.cloud.migrationcenter.v1.DeleteReportRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DeleteReportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DeleteReportRequest) + private static final com.google.cloud.migrationcenter.v1.DeleteReportRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DeleteReportRequest(); + } + + public static com.google.cloud.migrationcenter.v1.DeleteReportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteReportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteReportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportRequestOrBuilder.java new file mode 100644 index 000000000000..f95c1671154b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteReportRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DeleteReportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DeleteReportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteSourceRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteSourceRequest.java new file mode 100644 index 000000000000..afc52cee6ef7 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteSourceRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to delete a source.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteSourceRequest} + */ +public final class DeleteSourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DeleteSourceRequest) + DeleteSourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteSourceRequest.newBuilder() to construct. + private DeleteSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteSourceRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteSourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteSourceRequest.class, + com.google.cloud.migrationcenter.v1.DeleteSourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DeleteSourceRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DeleteSourceRequest other = + (com.google.cloud.migrationcenter.v1.DeleteSourceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DeleteSourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete a source.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DeleteSourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DeleteSourceRequest) + com.google.cloud.migrationcenter.v1.DeleteSourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DeleteSourceRequest.class, + com.google.cloud.migrationcenter.v1.DeleteSourceRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DeleteSourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DeleteSourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteSourceRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DeleteSourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteSourceRequest build() { + com.google.cloud.migrationcenter.v1.DeleteSourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteSourceRequest buildPartial() { + com.google.cloud.migrationcenter.v1.DeleteSourceRequest result = + new com.google.cloud.migrationcenter.v1.DeleteSourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.DeleteSourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DeleteSourceRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DeleteSourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DeleteSourceRequest other) { + if (other == com.google.cloud.migrationcenter.v1.DeleteSourceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DeleteSourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DeleteSourceRequest) + private static final com.google.cloud.migrationcenter.v1.DeleteSourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DeleteSourceRequest(); + } + + public static com.google.cloud.migrationcenter.v1.DeleteSourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DeleteSourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteSourceRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteSourceRequestOrBuilder.java new file mode 100644 index 000000000000..ac246362cb2b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DeleteSourceRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DeleteSourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DeleteSourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntry.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntry.java new file mode 100644 index 000000000000..3fec76ebcb37 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntry.java @@ -0,0 +1,2241 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Single disk entry.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DiskEntry} + */ +public final class DiskEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DiskEntry) + DiskEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiskEntry.newBuilder() to construct. + private DiskEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiskEntry() { + diskLabel_ = ""; + diskLabelType_ = ""; + interfaceType_ = 0; + hwAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiskEntry(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DiskEntry.class, + com.google.cloud.migrationcenter.v1.DiskEntry.Builder.class); + } + + /** + * + * + *
+   * Disks interface type.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.DiskEntry.InterfaceType} + */ + public enum InterfaceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Interface type unknown or unspecified.
+     * 
+ * + * INTERFACE_TYPE_UNSPECIFIED = 0; + */ + INTERFACE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * IDE interface type.
+     * 
+ * + * IDE = 1; + */ + IDE(1), + /** + * + * + *
+     * SATA interface type.
+     * 
+ * + * SATA = 2; + */ + SATA(2), + /** + * + * + *
+     * SAS interface type.
+     * 
+ * + * SAS = 3; + */ + SAS(3), + /** + * + * + *
+     * SCSI interface type.
+     * 
+ * + * SCSI = 4; + */ + SCSI(4), + /** + * + * + *
+     * NVME interface type.
+     * 
+ * + * NVME = 5; + */ + NVME(5), + /** + * + * + *
+     * FC interface type.
+     * 
+ * + * FC = 6; + */ + FC(6), + /** + * + * + *
+     * iSCSI interface type.
+     * 
+ * + * ISCSI = 7; + */ + ISCSI(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Interface type unknown or unspecified.
+     * 
+ * + * INTERFACE_TYPE_UNSPECIFIED = 0; + */ + public static final int INTERFACE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * IDE interface type.
+     * 
+ * + * IDE = 1; + */ + public static final int IDE_VALUE = 1; + /** + * + * + *
+     * SATA interface type.
+     * 
+ * + * SATA = 2; + */ + public static final int SATA_VALUE = 2; + /** + * + * + *
+     * SAS interface type.
+     * 
+ * + * SAS = 3; + */ + public static final int SAS_VALUE = 3; + /** + * + * + *
+     * SCSI interface type.
+     * 
+ * + * SCSI = 4; + */ + public static final int SCSI_VALUE = 4; + /** + * + * + *
+     * NVME interface type.
+     * 
+ * + * NVME = 5; + */ + public static final int NVME_VALUE = 5; + /** + * + * + *
+     * FC interface type.
+     * 
+ * + * FC = 6; + */ + public static final int FC_VALUE = 6; + /** + * + * + *
+     * iSCSI interface type.
+     * 
+ * + * ISCSI = 7; + */ + public static final int ISCSI_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InterfaceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static InterfaceType forNumber(int value) { + switch (value) { + case 0: + return INTERFACE_TYPE_UNSPECIFIED; + case 1: + return IDE; + case 2: + return SATA; + case 3: + return SAS; + case 4: + return SCSI; + case 5: + return NVME; + case 6: + return FC; + case 7: + return ISCSI; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public InterfaceType findValueByNumber(int number) { + return InterfaceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.DiskEntry.getDescriptor().getEnumTypes().get(0); + } + + private static final InterfaceType[] VALUES = values(); + + public static InterfaceType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private InterfaceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.DiskEntry.InterfaceType) + } + + private int platformSpecificCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object platformSpecific_; + + public enum PlatformSpecificCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VMWARE(20), + PLATFORMSPECIFIC_NOT_SET(0); + private final int value; + + private PlatformSpecificCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PlatformSpecificCase valueOf(int value) { + return forNumber(value); + } + + public static PlatformSpecificCase forNumber(int value) { + switch (value) { + case 20: + return VMWARE; + case 0: + return PLATFORMSPECIFIC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PlatformSpecificCase getPlatformSpecificCase() { + return PlatformSpecificCase.forNumber(platformSpecificCase_); + } + + public static final int CAPACITY_BYTES_FIELD_NUMBER = 1; + private long capacityBytes_ = 0L; + /** + * + * + *
+   * Disk capacity.
+   * 
+ * + * int64 capacity_bytes = 1; + * + * @return The capacityBytes. + */ + @java.lang.Override + public long getCapacityBytes() { + return capacityBytes_; + } + + public static final int FREE_BYTES_FIELD_NUMBER = 2; + private long freeBytes_ = 0L; + /** + * + * + *
+   * Disk free space.
+   * 
+ * + * int64 free_bytes = 2; + * + * @return The freeBytes. + */ + @java.lang.Override + public long getFreeBytes() { + return freeBytes_; + } + + public static final int DISK_LABEL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object diskLabel_ = ""; + /** + * + * + *
+   * Disk label.
+   * 
+ * + * string disk_label = 3; + * + * @return The diskLabel. + */ + @java.lang.Override + public java.lang.String getDiskLabel() { + java.lang.Object ref = diskLabel_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diskLabel_ = s; + return s; + } + } + /** + * + * + *
+   * Disk label.
+   * 
+ * + * string disk_label = 3; + * + * @return The bytes for diskLabel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDiskLabelBytes() { + java.lang.Object ref = diskLabel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISK_LABEL_TYPE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object diskLabelType_ = ""; + /** + * + * + *
+   * Disk label type (e.g. BIOS/GPT)
+   * 
+ * + * string disk_label_type = 4; + * + * @return The diskLabelType. + */ + @java.lang.Override + public java.lang.String getDiskLabelType() { + java.lang.Object ref = diskLabelType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diskLabelType_ = s; + return s; + } + } + /** + * + * + *
+   * Disk label type (e.g. BIOS/GPT)
+   * 
+ * + * string disk_label_type = 4; + * + * @return The bytes for diskLabelType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDiskLabelTypeBytes() { + java.lang.Object ref = diskLabelType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskLabelType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACE_TYPE_FIELD_NUMBER = 5; + private int interfaceType_ = 0; + /** + * + * + *
+   * Disks interface type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + * + * @return The enum numeric value on the wire for interfaceType. + */ + @java.lang.Override + public int getInterfaceTypeValue() { + return interfaceType_; + } + /** + * + * + *
+   * Disks interface type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + * + * @return The interfaceType. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType getInterfaceType() { + com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType result = + com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType.forNumber(interfaceType_); + return result == null + ? com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType.UNRECOGNIZED + : result; + } + + public static final int PARTITIONS_FIELD_NUMBER = 6; + private com.google.cloud.migrationcenter.v1.DiskPartitionList partitions_; + /** + * + * + *
+   * Partition layout.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + * + * @return Whether the partitions field is set. + */ + @java.lang.Override + public boolean hasPartitions() { + return partitions_ != null; + } + /** + * + * + *
+   * Partition layout.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + * + * @return The partitions. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartitionList getPartitions() { + return partitions_ == null + ? com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance() + : partitions_; + } + /** + * + * + *
+   * Partition layout.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder getPartitionsOrBuilder() { + return partitions_ == null + ? com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance() + : partitions_; + } + + public static final int HW_ADDRESS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object hwAddress_ = ""; + /** + * + * + *
+   * Disk hardware address (e.g. 0:1 for SCSI).
+   * 
+ * + * string hw_address = 7; + * + * @return The hwAddress. + */ + @java.lang.Override + public java.lang.String getHwAddress() { + java.lang.Object ref = hwAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hwAddress_ = s; + return s; + } + } + /** + * + * + *
+   * Disk hardware address (e.g. 0:1 for SCSI).
+   * 
+ * + * string hw_address = 7; + * + * @return The bytes for hwAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHwAddressBytes() { + java.lang.Object ref = hwAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hwAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VMWARE_FIELD_NUMBER = 20; + /** + * + * + *
+   * VMware disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + * + * @return Whether the vmware field is set. + */ + @java.lang.Override + public boolean hasVmware() { + return platformSpecificCase_ == 20; + } + /** + * + * + *
+   * VMware disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + * + * @return The vmware. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig getVmware() { + if (platformSpecificCase_ == 20) { + return (com.google.cloud.migrationcenter.v1.VmwareDiskConfig) platformSpecific_; + } + return com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDefaultInstance(); + } + /** + * + * + *
+   * VMware disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfigOrBuilder getVmwareOrBuilder() { + if (platformSpecificCase_ == 20) { + return (com.google.cloud.migrationcenter.v1.VmwareDiskConfig) platformSpecific_; + } + return com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (capacityBytes_ != 0L) { + output.writeInt64(1, capacityBytes_); + } + if (freeBytes_ != 0L) { + output.writeInt64(2, freeBytes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diskLabel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, diskLabel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diskLabelType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, diskLabelType_); + } + if (interfaceType_ + != com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType.INTERFACE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, interfaceType_); + } + if (partitions_ != null) { + output.writeMessage(6, getPartitions()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hwAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, hwAddress_); + } + if (platformSpecificCase_ == 20) { + output.writeMessage( + 20, (com.google.cloud.migrationcenter.v1.VmwareDiskConfig) platformSpecific_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (capacityBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, capacityBytes_); + } + if (freeBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, freeBytes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diskLabel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, diskLabel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diskLabelType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, diskLabelType_); + } + if (interfaceType_ + != com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType.INTERFACE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, interfaceType_); + } + if (partitions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPartitions()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hwAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, hwAddress_); + } + if (platformSpecificCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.cloud.migrationcenter.v1.VmwareDiskConfig) platformSpecific_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DiskEntry)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DiskEntry other = + (com.google.cloud.migrationcenter.v1.DiskEntry) obj; + + if (getCapacityBytes() != other.getCapacityBytes()) return false; + if (getFreeBytes() != other.getFreeBytes()) return false; + if (!getDiskLabel().equals(other.getDiskLabel())) return false; + if (!getDiskLabelType().equals(other.getDiskLabelType())) return false; + if (interfaceType_ != other.interfaceType_) return false; + if (hasPartitions() != other.hasPartitions()) return false; + if (hasPartitions()) { + if (!getPartitions().equals(other.getPartitions())) return false; + } + if (!getHwAddress().equals(other.getHwAddress())) return false; + if (!getPlatformSpecificCase().equals(other.getPlatformSpecificCase())) return false; + switch (platformSpecificCase_) { + case 20: + if (!getVmware().equals(other.getVmware())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CAPACITY_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCapacityBytes()); + hash = (37 * hash) + FREE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFreeBytes()); + hash = (37 * hash) + DISK_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getDiskLabel().hashCode(); + hash = (37 * hash) + DISK_LABEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getDiskLabelType().hashCode(); + hash = (37 * hash) + INTERFACE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + interfaceType_; + if (hasPartitions()) { + hash = (37 * hash) + PARTITIONS_FIELD_NUMBER; + hash = (53 * hash) + getPartitions().hashCode(); + } + hash = (37 * hash) + HW_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getHwAddress().hashCode(); + switch (platformSpecificCase_) { + case 20: + hash = (37 * hash) + VMWARE_FIELD_NUMBER; + hash = (53 * hash) + getVmware().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.DiskEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Single disk entry.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DiskEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DiskEntry) + com.google.cloud.migrationcenter.v1.DiskEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DiskEntry.class, + com.google.cloud.migrationcenter.v1.DiskEntry.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DiskEntry.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + capacityBytes_ = 0L; + freeBytes_ = 0L; + diskLabel_ = ""; + diskLabelType_ = ""; + interfaceType_ = 0; + partitions_ = null; + if (partitionsBuilder_ != null) { + partitionsBuilder_.dispose(); + partitionsBuilder_ = null; + } + hwAddress_ = ""; + if (vmwareBuilder_ != null) { + vmwareBuilder_.clear(); + } + platformSpecificCase_ = 0; + platformSpecific_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntry getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DiskEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntry build() { + com.google.cloud.migrationcenter.v1.DiskEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntry buildPartial() { + com.google.cloud.migrationcenter.v1.DiskEntry result = + new com.google.cloud.migrationcenter.v1.DiskEntry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.DiskEntry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.capacityBytes_ = capacityBytes_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.freeBytes_ = freeBytes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.diskLabel_ = diskLabel_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.diskLabelType_ = diskLabelType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.interfaceType_ = interfaceType_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.partitions_ = partitionsBuilder_ == null ? partitions_ : partitionsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.hwAddress_ = hwAddress_; + } + } + + private void buildPartialOneofs(com.google.cloud.migrationcenter.v1.DiskEntry result) { + result.platformSpecificCase_ = platformSpecificCase_; + result.platformSpecific_ = this.platformSpecific_; + if (platformSpecificCase_ == 20 && vmwareBuilder_ != null) { + result.platformSpecific_ = vmwareBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DiskEntry) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DiskEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DiskEntry other) { + if (other == com.google.cloud.migrationcenter.v1.DiskEntry.getDefaultInstance()) return this; + if (other.getCapacityBytes() != 0L) { + setCapacityBytes(other.getCapacityBytes()); + } + if (other.getFreeBytes() != 0L) { + setFreeBytes(other.getFreeBytes()); + } + if (!other.getDiskLabel().isEmpty()) { + diskLabel_ = other.diskLabel_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDiskLabelType().isEmpty()) { + diskLabelType_ = other.diskLabelType_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.interfaceType_ != 0) { + setInterfaceTypeValue(other.getInterfaceTypeValue()); + } + if (other.hasPartitions()) { + mergePartitions(other.getPartitions()); + } + if (!other.getHwAddress().isEmpty()) { + hwAddress_ = other.hwAddress_; + bitField0_ |= 0x00000040; + onChanged(); + } + switch (other.getPlatformSpecificCase()) { + case VMWARE: + { + mergeVmware(other.getVmware()); + break; + } + case PLATFORMSPECIFIC_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + capacityBytes_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + freeBytes_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + diskLabel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + diskLabelType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + interfaceType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + input.readMessage(getPartitionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + hwAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 162: + { + input.readMessage(getVmwareFieldBuilder().getBuilder(), extensionRegistry); + platformSpecificCase_ = 20; + break; + } // case 162 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int platformSpecificCase_ = 0; + private java.lang.Object platformSpecific_; + + public PlatformSpecificCase getPlatformSpecificCase() { + return PlatformSpecificCase.forNumber(platformSpecificCase_); + } + + public Builder clearPlatformSpecific() { + platformSpecificCase_ = 0; + platformSpecific_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private long capacityBytes_; + /** + * + * + *
+     * Disk capacity.
+     * 
+ * + * int64 capacity_bytes = 1; + * + * @return The capacityBytes. + */ + @java.lang.Override + public long getCapacityBytes() { + return capacityBytes_; + } + /** + * + * + *
+     * Disk capacity.
+     * 
+ * + * int64 capacity_bytes = 1; + * + * @param value The capacityBytes to set. + * @return This builder for chaining. + */ + public Builder setCapacityBytes(long value) { + + capacityBytes_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk capacity.
+     * 
+ * + * int64 capacity_bytes = 1; + * + * @return This builder for chaining. + */ + public Builder clearCapacityBytes() { + bitField0_ = (bitField0_ & ~0x00000001); + capacityBytes_ = 0L; + onChanged(); + return this; + } + + private long freeBytes_; + /** + * + * + *
+     * Disk free space.
+     * 
+ * + * int64 free_bytes = 2; + * + * @return The freeBytes. + */ + @java.lang.Override + public long getFreeBytes() { + return freeBytes_; + } + /** + * + * + *
+     * Disk free space.
+     * 
+ * + * int64 free_bytes = 2; + * + * @param value The freeBytes to set. + * @return This builder for chaining. + */ + public Builder setFreeBytes(long value) { + + freeBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk free space.
+     * 
+ * + * int64 free_bytes = 2; + * + * @return This builder for chaining. + */ + public Builder clearFreeBytes() { + bitField0_ = (bitField0_ & ~0x00000002); + freeBytes_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object diskLabel_ = ""; + /** + * + * + *
+     * Disk label.
+     * 
+ * + * string disk_label = 3; + * + * @return The diskLabel. + */ + public java.lang.String getDiskLabel() { + java.lang.Object ref = diskLabel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diskLabel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Disk label.
+     * 
+ * + * string disk_label = 3; + * + * @return The bytes for diskLabel. + */ + public com.google.protobuf.ByteString getDiskLabelBytes() { + java.lang.Object ref = diskLabel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Disk label.
+     * 
+ * + * string disk_label = 3; + * + * @param value The diskLabel to set. + * @return This builder for chaining. + */ + public Builder setDiskLabel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + diskLabel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk label.
+     * 
+ * + * string disk_label = 3; + * + * @return This builder for chaining. + */ + public Builder clearDiskLabel() { + diskLabel_ = getDefaultInstance().getDiskLabel(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Disk label.
+     * 
+ * + * string disk_label = 3; + * + * @param value The bytes for diskLabel to set. + * @return This builder for chaining. + */ + public Builder setDiskLabelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + diskLabel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object diskLabelType_ = ""; + /** + * + * + *
+     * Disk label type (e.g. BIOS/GPT)
+     * 
+ * + * string disk_label_type = 4; + * + * @return The diskLabelType. + */ + public java.lang.String getDiskLabelType() { + java.lang.Object ref = diskLabelType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diskLabelType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Disk label type (e.g. BIOS/GPT)
+     * 
+ * + * string disk_label_type = 4; + * + * @return The bytes for diskLabelType. + */ + public com.google.protobuf.ByteString getDiskLabelTypeBytes() { + java.lang.Object ref = diskLabelType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskLabelType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Disk label type (e.g. BIOS/GPT)
+     * 
+ * + * string disk_label_type = 4; + * + * @param value The diskLabelType to set. + * @return This builder for chaining. + */ + public Builder setDiskLabelType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + diskLabelType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk label type (e.g. BIOS/GPT)
+     * 
+ * + * string disk_label_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearDiskLabelType() { + diskLabelType_ = getDefaultInstance().getDiskLabelType(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Disk label type (e.g. BIOS/GPT)
+     * 
+ * + * string disk_label_type = 4; + * + * @param value The bytes for diskLabelType to set. + * @return This builder for chaining. + */ + public Builder setDiskLabelTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + diskLabelType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int interfaceType_ = 0; + /** + * + * + *
+     * Disks interface type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + * + * @return The enum numeric value on the wire for interfaceType. + */ + @java.lang.Override + public int getInterfaceTypeValue() { + return interfaceType_; + } + /** + * + * + *
+     * Disks interface type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + * + * @param value The enum numeric value on the wire for interfaceType to set. + * @return This builder for chaining. + */ + public Builder setInterfaceTypeValue(int value) { + interfaceType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Disks interface type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + * + * @return The interfaceType. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType getInterfaceType() { + com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType result = + com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType.forNumber(interfaceType_); + return result == null + ? com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Disks interface type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + * + * @param value The interfaceType to set. + * @return This builder for chaining. + */ + public Builder setInterfaceType( + com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + interfaceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Disks interface type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + * + * @return This builder for chaining. + */ + public Builder clearInterfaceType() { + bitField0_ = (bitField0_ & ~0x00000010); + interfaceType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.DiskPartitionList partitions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskPartitionList, + com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder, + com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder> + partitionsBuilder_; + /** + * + * + *
+     * Partition layout.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + * + * @return Whether the partitions field is set. + */ + public boolean hasPartitions() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Partition layout.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + * + * @return The partitions. + */ + public com.google.cloud.migrationcenter.v1.DiskPartitionList getPartitions() { + if (partitionsBuilder_ == null) { + return partitions_ == null + ? com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance() + : partitions_; + } else { + return partitionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Partition layout.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + */ + public Builder setPartitions(com.google.cloud.migrationcenter.v1.DiskPartitionList value) { + if (partitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partitions_ = value; + } else { + partitionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition layout.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + */ + public Builder setPartitions( + com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder builderForValue) { + if (partitionsBuilder_ == null) { + partitions_ = builderForValue.build(); + } else { + partitionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition layout.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + */ + public Builder mergePartitions(com.google.cloud.migrationcenter.v1.DiskPartitionList value) { + if (partitionsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && partitions_ != null + && partitions_ + != com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance()) { + getPartitionsBuilder().mergeFrom(value); + } else { + partitions_ = value; + } + } else { + partitionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition layout.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + */ + public Builder clearPartitions() { + bitField0_ = (bitField0_ & ~0x00000020); + partitions_ = null; + if (partitionsBuilder_ != null) { + partitionsBuilder_.dispose(); + partitionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Partition layout.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + */ + public com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder getPartitionsBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getPartitionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Partition layout.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + */ + public com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder getPartitionsOrBuilder() { + if (partitionsBuilder_ != null) { + return partitionsBuilder_.getMessageOrBuilder(); + } else { + return partitions_ == null + ? com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance() + : partitions_; + } + } + /** + * + * + *
+     * Partition layout.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskPartitionList, + com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder, + com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder> + getPartitionsFieldBuilder() { + if (partitionsBuilder_ == null) { + partitionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskPartitionList, + com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder, + com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder>( + getPartitions(), getParentForChildren(), isClean()); + partitions_ = null; + } + return partitionsBuilder_; + } + + private java.lang.Object hwAddress_ = ""; + /** + * + * + *
+     * Disk hardware address (e.g. 0:1 for SCSI).
+     * 
+ * + * string hw_address = 7; + * + * @return The hwAddress. + */ + public java.lang.String getHwAddress() { + java.lang.Object ref = hwAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hwAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Disk hardware address (e.g. 0:1 for SCSI).
+     * 
+ * + * string hw_address = 7; + * + * @return The bytes for hwAddress. + */ + public com.google.protobuf.ByteString getHwAddressBytes() { + java.lang.Object ref = hwAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hwAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Disk hardware address (e.g. 0:1 for SCSI).
+     * 
+ * + * string hw_address = 7; + * + * @param value The hwAddress to set. + * @return This builder for chaining. + */ + public Builder setHwAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + hwAddress_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk hardware address (e.g. 0:1 for SCSI).
+     * 
+ * + * string hw_address = 7; + * + * @return This builder for chaining. + */ + public Builder clearHwAddress() { + hwAddress_ = getDefaultInstance().getHwAddress(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Disk hardware address (e.g. 0:1 for SCSI).
+     * 
+ * + * string hw_address = 7; + * + * @param value The bytes for hwAddress to set. + * @return This builder for chaining. + */ + public Builder setHwAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + hwAddress_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VmwareDiskConfig, + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.Builder, + com.google.cloud.migrationcenter.v1.VmwareDiskConfigOrBuilder> + vmwareBuilder_; + /** + * + * + *
+     * VMware disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + * + * @return Whether the vmware field is set. + */ + @java.lang.Override + public boolean hasVmware() { + return platformSpecificCase_ == 20; + } + /** + * + * + *
+     * VMware disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + * + * @return The vmware. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig getVmware() { + if (vmwareBuilder_ == null) { + if (platformSpecificCase_ == 20) { + return (com.google.cloud.migrationcenter.v1.VmwareDiskConfig) platformSpecific_; + } + return com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDefaultInstance(); + } else { + if (platformSpecificCase_ == 20) { + return vmwareBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * VMware disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + */ + public Builder setVmware(com.google.cloud.migrationcenter.v1.VmwareDiskConfig value) { + if (vmwareBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + platformSpecific_ = value; + onChanged(); + } else { + vmwareBuilder_.setMessage(value); + } + platformSpecificCase_ = 20; + return this; + } + /** + * + * + *
+     * VMware disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + */ + public Builder setVmware( + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.Builder builderForValue) { + if (vmwareBuilder_ == null) { + platformSpecific_ = builderForValue.build(); + onChanged(); + } else { + vmwareBuilder_.setMessage(builderForValue.build()); + } + platformSpecificCase_ = 20; + return this; + } + /** + * + * + *
+     * VMware disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + */ + public Builder mergeVmware(com.google.cloud.migrationcenter.v1.VmwareDiskConfig value) { + if (vmwareBuilder_ == null) { + if (platformSpecificCase_ == 20 + && platformSpecific_ + != com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDefaultInstance()) { + platformSpecific_ = + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.newBuilder( + (com.google.cloud.migrationcenter.v1.VmwareDiskConfig) platformSpecific_) + .mergeFrom(value) + .buildPartial(); + } else { + platformSpecific_ = value; + } + onChanged(); + } else { + if (platformSpecificCase_ == 20) { + vmwareBuilder_.mergeFrom(value); + } else { + vmwareBuilder_.setMessage(value); + } + } + platformSpecificCase_ = 20; + return this; + } + /** + * + * + *
+     * VMware disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + */ + public Builder clearVmware() { + if (vmwareBuilder_ == null) { + if (platformSpecificCase_ == 20) { + platformSpecificCase_ = 0; + platformSpecific_ = null; + onChanged(); + } + } else { + if (platformSpecificCase_ == 20) { + platformSpecificCase_ = 0; + platformSpecific_ = null; + } + vmwareBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * VMware disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + */ + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig.Builder getVmwareBuilder() { + return getVmwareFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * VMware disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfigOrBuilder getVmwareOrBuilder() { + if ((platformSpecificCase_ == 20) && (vmwareBuilder_ != null)) { + return vmwareBuilder_.getMessageOrBuilder(); + } else { + if (platformSpecificCase_ == 20) { + return (com.google.cloud.migrationcenter.v1.VmwareDiskConfig) platformSpecific_; + } + return com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * VMware disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VmwareDiskConfig, + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.Builder, + com.google.cloud.migrationcenter.v1.VmwareDiskConfigOrBuilder> + getVmwareFieldBuilder() { + if (vmwareBuilder_ == null) { + if (!(platformSpecificCase_ == 20)) { + platformSpecific_ = + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDefaultInstance(); + } + vmwareBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VmwareDiskConfig, + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.Builder, + com.google.cloud.migrationcenter.v1.VmwareDiskConfigOrBuilder>( + (com.google.cloud.migrationcenter.v1.VmwareDiskConfig) platformSpecific_, + getParentForChildren(), + isClean()); + platformSpecific_ = null; + } + platformSpecificCase_ = 20; + onChanged(); + return vmwareBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DiskEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DiskEntry) + private static final com.google.cloud.migrationcenter.v1.DiskEntry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DiskEntry(); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryList.java new file mode 100644 index 000000000000..df23d0f853be --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryList.java @@ -0,0 +1,936 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * VM disks.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DiskEntryList} + */ +public final class DiskEntryList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DiskEntryList) + DiskEntryListOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiskEntryList.newBuilder() to construct. + private DiskEntryList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiskEntryList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiskEntryList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskEntryList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskEntryList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DiskEntryList.class, + com.google.cloud.migrationcenter.v1.DiskEntryList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * Disk entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Disk entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Disk entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Disk entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntry getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Disk entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntryOrBuilder getEntriesOrBuilder(int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DiskEntryList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DiskEntryList other = + (com.google.cloud.migrationcenter.v1.DiskEntryList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.DiskEntryList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * VM disks.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DiskEntryList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DiskEntryList) + com.google.cloud.migrationcenter.v1.DiskEntryListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskEntryList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskEntryList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DiskEntryList.class, + com.google.cloud.migrationcenter.v1.DiskEntryList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DiskEntryList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskEntryList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntryList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DiskEntryList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntryList build() { + com.google.cloud.migrationcenter.v1.DiskEntryList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntryList buildPartial() { + com.google.cloud.migrationcenter.v1.DiskEntryList result = + new com.google.cloud.migrationcenter.v1.DiskEntryList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.DiskEntryList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.DiskEntryList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DiskEntryList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DiskEntryList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DiskEntryList other) { + if (other == com.google.cloud.migrationcenter.v1.DiskEntryList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.DiskEntry m = + input.readMessage( + com.google.cloud.migrationcenter.v1.DiskEntry.parser(), extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskEntry, + com.google.cloud.migrationcenter.v1.DiskEntry.Builder, + com.google.cloud.migrationcenter.v1.DiskEntryOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.DiskEntry getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public Builder setEntries(int index, com.google.cloud.migrationcenter.v1.DiskEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.DiskEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.DiskEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public Builder addEntries(int index, com.google.cloud.migrationcenter.v1.DiskEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.DiskEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.DiskEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.DiskEntry.Builder getEntriesBuilder(int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.DiskEntryOrBuilder getEntriesOrBuilder(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.DiskEntry.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.DiskEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.DiskEntry.Builder addEntriesBuilder(int index) { + return getEntriesFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.DiskEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Disk entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskEntry, + com.google.cloud.migrationcenter.v1.DiskEntry.Builder, + com.google.cloud.migrationcenter.v1.DiskEntryOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskEntry, + com.google.cloud.migrationcenter.v1.DiskEntry.Builder, + com.google.cloud.migrationcenter.v1.DiskEntryOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DiskEntryList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DiskEntryList) + private static final com.google.cloud.migrationcenter.v1.DiskEntryList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DiskEntryList(); + } + + public static com.google.cloud.migrationcenter.v1.DiskEntryList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskEntryList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntryList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryListOrBuilder.java new file mode 100644 index 000000000000..fe147dd21ab8 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DiskEntryListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DiskEntryList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Disk entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Disk entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + com.google.cloud.migrationcenter.v1.DiskEntry getEntries(int index); + /** + * + * + *
+   * Disk entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Disk entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Disk entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + com.google.cloud.migrationcenter.v1.DiskEntryOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryOrBuilder.java new file mode 100644 index 000000000000..1d4bd1882593 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskEntryOrBuilder.java @@ -0,0 +1,223 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DiskEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DiskEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Disk capacity.
+   * 
+ * + * int64 capacity_bytes = 1; + * + * @return The capacityBytes. + */ + long getCapacityBytes(); + + /** + * + * + *
+   * Disk free space.
+   * 
+ * + * int64 free_bytes = 2; + * + * @return The freeBytes. + */ + long getFreeBytes(); + + /** + * + * + *
+   * Disk label.
+   * 
+ * + * string disk_label = 3; + * + * @return The diskLabel. + */ + java.lang.String getDiskLabel(); + /** + * + * + *
+   * Disk label.
+   * 
+ * + * string disk_label = 3; + * + * @return The bytes for diskLabel. + */ + com.google.protobuf.ByteString getDiskLabelBytes(); + + /** + * + * + *
+   * Disk label type (e.g. BIOS/GPT)
+   * 
+ * + * string disk_label_type = 4; + * + * @return The diskLabelType. + */ + java.lang.String getDiskLabelType(); + /** + * + * + *
+   * Disk label type (e.g. BIOS/GPT)
+   * 
+ * + * string disk_label_type = 4; + * + * @return The bytes for diskLabelType. + */ + com.google.protobuf.ByteString getDiskLabelTypeBytes(); + + /** + * + * + *
+   * Disks interface type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + * + * @return The enum numeric value on the wire for interfaceType. + */ + int getInterfaceTypeValue(); + /** + * + * + *
+   * Disks interface type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + * + * @return The interfaceType. + */ + com.google.cloud.migrationcenter.v1.DiskEntry.InterfaceType getInterfaceType(); + + /** + * + * + *
+   * Partition layout.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + * + * @return Whether the partitions field is set. + */ + boolean hasPartitions(); + /** + * + * + *
+   * Partition layout.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + * + * @return The partitions. + */ + com.google.cloud.migrationcenter.v1.DiskPartitionList getPartitions(); + /** + * + * + *
+   * Partition layout.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + */ + com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder getPartitionsOrBuilder(); + + /** + * + * + *
+   * Disk hardware address (e.g. 0:1 for SCSI).
+   * 
+ * + * string hw_address = 7; + * + * @return The hwAddress. + */ + java.lang.String getHwAddress(); + /** + * + * + *
+   * Disk hardware address (e.g. 0:1 for SCSI).
+   * 
+ * + * string hw_address = 7; + * + * @return The bytes for hwAddress. + */ + com.google.protobuf.ByteString getHwAddressBytes(); + + /** + * + * + *
+   * VMware disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + * + * @return Whether the vmware field is set. + */ + boolean hasVmware(); + /** + * + * + *
+   * VMware disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + * + * @return The vmware. + */ + com.google.cloud.migrationcenter.v1.VmwareDiskConfig getVmware(); + /** + * + * + *
+   * VMware disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + */ + com.google.cloud.migrationcenter.v1.VmwareDiskConfigOrBuilder getVmwareOrBuilder(); + + com.google.cloud.migrationcenter.v1.DiskEntry.PlatformSpecificCase getPlatformSpecificCase(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartition.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartition.java new file mode 100644 index 000000000000..74d421bdceb8 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartition.java @@ -0,0 +1,1625 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Disk Partition details.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DiskPartition} + */ +public final class DiskPartition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DiskPartition) + DiskPartitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiskPartition.newBuilder() to construct. + private DiskPartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiskPartition() { + type_ = ""; + fileSystem_ = ""; + mountPoint_ = ""; + uuid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiskPartition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DiskPartition.class, + com.google.cloud.migrationcenter.v1.DiskPartition.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+   * Partition type.
+   * 
+ * + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * Partition type.
+   * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_SYSTEM_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object fileSystem_ = ""; + /** + * + * + *
+   * Partition file system.
+   * 
+ * + * string file_system = 2; + * + * @return The fileSystem. + */ + @java.lang.Override + public java.lang.String getFileSystem() { + java.lang.Object ref = fileSystem_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileSystem_ = s; + return s; + } + } + /** + * + * + *
+   * Partition file system.
+   * 
+ * + * string file_system = 2; + * + * @return The bytes for fileSystem. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFileSystemBytes() { + java.lang.Object ref = fileSystem_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileSystem_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MOUNT_POINT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object mountPoint_ = ""; + /** + * + * + *
+   * Mount pount (Linux/Windows) or drive letter (Windows).
+   * 
+ * + * string mount_point = 3; + * + * @return The mountPoint. + */ + @java.lang.Override + public java.lang.String getMountPoint() { + java.lang.Object ref = mountPoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mountPoint_ = s; + return s; + } + } + /** + * + * + *
+   * Mount pount (Linux/Windows) or drive letter (Windows).
+   * 
+ * + * string mount_point = 3; + * + * @return The bytes for mountPoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMountPointBytes() { + java.lang.Object ref = mountPoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mountPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CAPACITY_BYTES_FIELD_NUMBER = 4; + private long capacityBytes_ = 0L; + /** + * + * + *
+   * Partition capacity.
+   * 
+ * + * int64 capacity_bytes = 4; + * + * @return The capacityBytes. + */ + @java.lang.Override + public long getCapacityBytes() { + return capacityBytes_; + } + + public static final int FREE_BYTES_FIELD_NUMBER = 5; + private long freeBytes_ = 0L; + /** + * + * + *
+   * Partition free space.
+   * 
+ * + * int64 free_bytes = 5; + * + * @return The freeBytes. + */ + @java.lang.Override + public long getFreeBytes() { + return freeBytes_; + } + + public static final int UUID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object uuid_ = ""; + /** + * + * + *
+   * Partition UUID.
+   * 
+ * + * string uuid = 6; + * + * @return The uuid. + */ + @java.lang.Override + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } + } + /** + * + * + *
+   * Partition UUID.
+   * 
+ * + * string uuid = 6; + * + * @return The bytes for uuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUB_PARTITIONS_FIELD_NUMBER = 7; + private com.google.cloud.migrationcenter.v1.DiskPartitionList subPartitions_; + /** + * + * + *
+   * Sub-partitions.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + * + * @return Whether the subPartitions field is set. + */ + @java.lang.Override + public boolean hasSubPartitions() { + return subPartitions_ != null; + } + /** + * + * + *
+   * Sub-partitions.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + * + * @return The subPartitions. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartitionList getSubPartitions() { + return subPartitions_ == null + ? com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance() + : subPartitions_; + } + /** + * + * + *
+   * Sub-partitions.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder + getSubPartitionsOrBuilder() { + return subPartitions_ == null + ? com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance() + : subPartitions_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileSystem_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fileSystem_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mountPoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mountPoint_); + } + if (capacityBytes_ != 0L) { + output.writeInt64(4, capacityBytes_); + } + if (freeBytes_ != 0L) { + output.writeInt64(5, freeBytes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, uuid_); + } + if (subPartitions_ != null) { + output.writeMessage(7, getSubPartitions()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileSystem_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fileSystem_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mountPoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mountPoint_); + } + if (capacityBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, capacityBytes_); + } + if (freeBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, freeBytes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, uuid_); + } + if (subPartitions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSubPartitions()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DiskPartition)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DiskPartition other = + (com.google.cloud.migrationcenter.v1.DiskPartition) obj; + + if (!getType().equals(other.getType())) return false; + if (!getFileSystem().equals(other.getFileSystem())) return false; + if (!getMountPoint().equals(other.getMountPoint())) return false; + if (getCapacityBytes() != other.getCapacityBytes()) return false; + if (getFreeBytes() != other.getFreeBytes()) return false; + if (!getUuid().equals(other.getUuid())) return false; + if (hasSubPartitions() != other.hasSubPartitions()) return false; + if (hasSubPartitions()) { + if (!getSubPartitions().equals(other.getSubPartitions())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + FILE_SYSTEM_FIELD_NUMBER; + hash = (53 * hash) + getFileSystem().hashCode(); + hash = (37 * hash) + MOUNT_POINT_FIELD_NUMBER; + hash = (53 * hash) + getMountPoint().hashCode(); + hash = (37 * hash) + CAPACITY_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCapacityBytes()); + hash = (37 * hash) + FREE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFreeBytes()); + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + if (hasSubPartitions()) { + hash = (37 * hash) + SUB_PARTITIONS_FIELD_NUMBER; + hash = (53 * hash) + getSubPartitions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.DiskPartition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Disk Partition details.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DiskPartition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DiskPartition) + com.google.cloud.migrationcenter.v1.DiskPartitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DiskPartition.class, + com.google.cloud.migrationcenter.v1.DiskPartition.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DiskPartition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + fileSystem_ = ""; + mountPoint_ = ""; + capacityBytes_ = 0L; + freeBytes_ = 0L; + uuid_ = ""; + subPartitions_ = null; + if (subPartitionsBuilder_ != null) { + subPartitionsBuilder_.dispose(); + subPartitionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskPartition_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartition getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DiskPartition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartition build() { + com.google.cloud.migrationcenter.v1.DiskPartition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartition buildPartial() { + com.google.cloud.migrationcenter.v1.DiskPartition result = + new com.google.cloud.migrationcenter.v1.DiskPartition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.DiskPartition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fileSystem_ = fileSystem_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.mountPoint_ = mountPoint_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.capacityBytes_ = capacityBytes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.freeBytes_ = freeBytes_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.uuid_ = uuid_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.subPartitions_ = + subPartitionsBuilder_ == null ? subPartitions_ : subPartitionsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DiskPartition) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DiskPartition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DiskPartition other) { + if (other == com.google.cloud.migrationcenter.v1.DiskPartition.getDefaultInstance()) + return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFileSystem().isEmpty()) { + fileSystem_ = other.fileSystem_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getMountPoint().isEmpty()) { + mountPoint_ = other.mountPoint_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getCapacityBytes() != 0L) { + setCapacityBytes(other.getCapacityBytes()); + } + if (other.getFreeBytes() != 0L) { + setFreeBytes(other.getFreeBytes()); + } + if (!other.getUuid().isEmpty()) { + uuid_ = other.uuid_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasSubPartitions()) { + mergeSubPartitions(other.getSubPartitions()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + fileSystem_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + mountPoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + capacityBytes_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + freeBytes_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + uuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getSubPartitionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * Partition type.
+     * 
+ * + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Partition type.
+     * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Partition type.
+     * 
+ * + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition type.
+     * 
+ * + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Partition type.
+     * 
+ * + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object fileSystem_ = ""; + /** + * + * + *
+     * Partition file system.
+     * 
+ * + * string file_system = 2; + * + * @return The fileSystem. + */ + public java.lang.String getFileSystem() { + java.lang.Object ref = fileSystem_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileSystem_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Partition file system.
+     * 
+ * + * string file_system = 2; + * + * @return The bytes for fileSystem. + */ + public com.google.protobuf.ByteString getFileSystemBytes() { + java.lang.Object ref = fileSystem_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileSystem_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Partition file system.
+     * 
+ * + * string file_system = 2; + * + * @param value The fileSystem to set. + * @return This builder for chaining. + */ + public Builder setFileSystem(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fileSystem_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition file system.
+     * 
+ * + * string file_system = 2; + * + * @return This builder for chaining. + */ + public Builder clearFileSystem() { + fileSystem_ = getDefaultInstance().getFileSystem(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Partition file system.
+     * 
+ * + * string file_system = 2; + * + * @param value The bytes for fileSystem to set. + * @return This builder for chaining. + */ + public Builder setFileSystemBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fileSystem_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object mountPoint_ = ""; + /** + * + * + *
+     * Mount pount (Linux/Windows) or drive letter (Windows).
+     * 
+ * + * string mount_point = 3; + * + * @return The mountPoint. + */ + public java.lang.String getMountPoint() { + java.lang.Object ref = mountPoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mountPoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Mount pount (Linux/Windows) or drive letter (Windows).
+     * 
+ * + * string mount_point = 3; + * + * @return The bytes for mountPoint. + */ + public com.google.protobuf.ByteString getMountPointBytes() { + java.lang.Object ref = mountPoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mountPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Mount pount (Linux/Windows) or drive letter (Windows).
+     * 
+ * + * string mount_point = 3; + * + * @param value The mountPoint to set. + * @return This builder for chaining. + */ + public Builder setMountPoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mountPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Mount pount (Linux/Windows) or drive letter (Windows).
+     * 
+ * + * string mount_point = 3; + * + * @return This builder for chaining. + */ + public Builder clearMountPoint() { + mountPoint_ = getDefaultInstance().getMountPoint(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Mount pount (Linux/Windows) or drive letter (Windows).
+     * 
+ * + * string mount_point = 3; + * + * @param value The bytes for mountPoint to set. + * @return This builder for chaining. + */ + public Builder setMountPointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mountPoint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long capacityBytes_; + /** + * + * + *
+     * Partition capacity.
+     * 
+ * + * int64 capacity_bytes = 4; + * + * @return The capacityBytes. + */ + @java.lang.Override + public long getCapacityBytes() { + return capacityBytes_; + } + /** + * + * + *
+     * Partition capacity.
+     * 
+ * + * int64 capacity_bytes = 4; + * + * @param value The capacityBytes to set. + * @return This builder for chaining. + */ + public Builder setCapacityBytes(long value) { + + capacityBytes_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition capacity.
+     * 
+ * + * int64 capacity_bytes = 4; + * + * @return This builder for chaining. + */ + public Builder clearCapacityBytes() { + bitField0_ = (bitField0_ & ~0x00000008); + capacityBytes_ = 0L; + onChanged(); + return this; + } + + private long freeBytes_; + /** + * + * + *
+     * Partition free space.
+     * 
+ * + * int64 free_bytes = 5; + * + * @return The freeBytes. + */ + @java.lang.Override + public long getFreeBytes() { + return freeBytes_; + } + /** + * + * + *
+     * Partition free space.
+     * 
+ * + * int64 free_bytes = 5; + * + * @param value The freeBytes to set. + * @return This builder for chaining. + */ + public Builder setFreeBytes(long value) { + + freeBytes_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition free space.
+     * 
+ * + * int64 free_bytes = 5; + * + * @return This builder for chaining. + */ + public Builder clearFreeBytes() { + bitField0_ = (bitField0_ & ~0x00000010); + freeBytes_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object uuid_ = ""; + /** + * + * + *
+     * Partition UUID.
+     * 
+ * + * string uuid = 6; + * + * @return The uuid. + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Partition UUID.
+     * 
+ * + * string uuid = 6; + * + * @return The bytes for uuid. + */ + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Partition UUID.
+     * 
+ * + * string uuid = 6; + * + * @param value The uuid to set. + * @return This builder for chaining. + */ + public Builder setUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uuid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition UUID.
+     * 
+ * + * string uuid = 6; + * + * @return This builder for chaining. + */ + public Builder clearUuid() { + uuid_ = getDefaultInstance().getUuid(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Partition UUID.
+     * 
+ * + * string uuid = 6; + * + * @param value The bytes for uuid to set. + * @return This builder for chaining. + */ + public Builder setUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uuid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.DiskPartitionList subPartitions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskPartitionList, + com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder, + com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder> + subPartitionsBuilder_; + /** + * + * + *
+     * Sub-partitions.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + * + * @return Whether the subPartitions field is set. + */ + public boolean hasSubPartitions() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Sub-partitions.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + * + * @return The subPartitions. + */ + public com.google.cloud.migrationcenter.v1.DiskPartitionList getSubPartitions() { + if (subPartitionsBuilder_ == null) { + return subPartitions_ == null + ? com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance() + : subPartitions_; + } else { + return subPartitionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Sub-partitions.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + */ + public Builder setSubPartitions(com.google.cloud.migrationcenter.v1.DiskPartitionList value) { + if (subPartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subPartitions_ = value; + } else { + subPartitionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Sub-partitions.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + */ + public Builder setSubPartitions( + com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder builderForValue) { + if (subPartitionsBuilder_ == null) { + subPartitions_ = builderForValue.build(); + } else { + subPartitionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Sub-partitions.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + */ + public Builder mergeSubPartitions(com.google.cloud.migrationcenter.v1.DiskPartitionList value) { + if (subPartitionsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && subPartitions_ != null + && subPartitions_ + != com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance()) { + getSubPartitionsBuilder().mergeFrom(value); + } else { + subPartitions_ = value; + } + } else { + subPartitionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Sub-partitions.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + */ + public Builder clearSubPartitions() { + bitField0_ = (bitField0_ & ~0x00000040); + subPartitions_ = null; + if (subPartitionsBuilder_ != null) { + subPartitionsBuilder_.dispose(); + subPartitionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Sub-partitions.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + */ + public com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder getSubPartitionsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getSubPartitionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Sub-partitions.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + */ + public com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder + getSubPartitionsOrBuilder() { + if (subPartitionsBuilder_ != null) { + return subPartitionsBuilder_.getMessageOrBuilder(); + } else { + return subPartitions_ == null + ? com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance() + : subPartitions_; + } + } + /** + * + * + *
+     * Sub-partitions.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskPartitionList, + com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder, + com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder> + getSubPartitionsFieldBuilder() { + if (subPartitionsBuilder_ == null) { + subPartitionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskPartitionList, + com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder, + com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder>( + getSubPartitions(), getParentForChildren(), isClean()); + subPartitions_ = null; + } + return subPartitionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DiskPartition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DiskPartition) + private static final com.google.cloud.migrationcenter.v1.DiskPartition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DiskPartition(); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskPartition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionList.java new file mode 100644 index 000000000000..4b702527c604 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionList.java @@ -0,0 +1,941 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Disk partition list.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DiskPartitionList} + */ +public final class DiskPartitionList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DiskPartitionList) + DiskPartitionListOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiskPartitionList.newBuilder() to construct. + private DiskPartitionList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiskPartitionList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiskPartitionList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskPartitionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskPartitionList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DiskPartitionList.class, + com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * Partition entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Partition entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Partition entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Partition entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartition getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Partition entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartitionOrBuilder getEntriesOrBuilder(int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DiskPartitionList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DiskPartitionList other = + (com.google.cloud.migrationcenter.v1.DiskPartitionList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.DiskPartitionList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Disk partition list.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DiskPartitionList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DiskPartitionList) + com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskPartitionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskPartitionList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DiskPartitionList.class, + com.google.cloud.migrationcenter.v1.DiskPartitionList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DiskPartitionList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskPartitionList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartitionList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartitionList build() { + com.google.cloud.migrationcenter.v1.DiskPartitionList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartitionList buildPartial() { + com.google.cloud.migrationcenter.v1.DiskPartitionList result = + new com.google.cloud.migrationcenter.v1.DiskPartitionList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.DiskPartitionList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.DiskPartitionList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DiskPartitionList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DiskPartitionList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DiskPartitionList other) { + if (other == com.google.cloud.migrationcenter.v1.DiskPartitionList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.DiskPartition m = + input.readMessage( + com.google.cloud.migrationcenter.v1.DiskPartition.parser(), + extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskPartition, + com.google.cloud.migrationcenter.v1.DiskPartition.Builder, + com.google.cloud.migrationcenter.v1.DiskPartitionOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public com.google.cloud.migrationcenter.v1.DiskPartition getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public Builder setEntries(int index, com.google.cloud.migrationcenter.v1.DiskPartition value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.DiskPartition.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.DiskPartition value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public Builder addEntries(int index, com.google.cloud.migrationcenter.v1.DiskPartition value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.DiskPartition.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.DiskPartition.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public com.google.cloud.migrationcenter.v1.DiskPartition.Builder getEntriesBuilder(int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public com.google.cloud.migrationcenter.v1.DiskPartitionOrBuilder getEntriesOrBuilder( + int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public com.google.cloud.migrationcenter.v1.DiskPartition.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.DiskPartition.getDefaultInstance()); + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public com.google.cloud.migrationcenter.v1.DiskPartition.Builder addEntriesBuilder(int index) { + return getEntriesFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.DiskPartition.getDefaultInstance()); + } + /** + * + * + *
+     * Partition entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskPartition, + com.google.cloud.migrationcenter.v1.DiskPartition.Builder, + com.google.cloud.migrationcenter.v1.DiskPartitionOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskPartition, + com.google.cloud.migrationcenter.v1.DiskPartition.Builder, + com.google.cloud.migrationcenter.v1.DiskPartitionOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DiskPartitionList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DiskPartitionList) + private static final com.google.cloud.migrationcenter.v1.DiskPartitionList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DiskPartitionList(); + } + + public static com.google.cloud.migrationcenter.v1.DiskPartitionList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskPartitionList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskPartitionList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionListOrBuilder.java new file mode 100644 index 000000000000..cbfca194faa1 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DiskPartitionListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DiskPartitionList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Partition entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Partition entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + com.google.cloud.migrationcenter.v1.DiskPartition getEntries(int index); + /** + * + * + *
+   * Partition entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Partition entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Partition entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + com.google.cloud.migrationcenter.v1.DiskPartitionOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionOrBuilder.java new file mode 100644 index 000000000000..9b5a9dbb5fc9 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskPartitionOrBuilder.java @@ -0,0 +1,186 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DiskPartitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DiskPartition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Partition type.
+   * 
+ * + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * Partition type.
+   * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * Partition file system.
+   * 
+ * + * string file_system = 2; + * + * @return The fileSystem. + */ + java.lang.String getFileSystem(); + /** + * + * + *
+   * Partition file system.
+   * 
+ * + * string file_system = 2; + * + * @return The bytes for fileSystem. + */ + com.google.protobuf.ByteString getFileSystemBytes(); + + /** + * + * + *
+   * Mount pount (Linux/Windows) or drive letter (Windows).
+   * 
+ * + * string mount_point = 3; + * + * @return The mountPoint. + */ + java.lang.String getMountPoint(); + /** + * + * + *
+   * Mount pount (Linux/Windows) or drive letter (Windows).
+   * 
+ * + * string mount_point = 3; + * + * @return The bytes for mountPoint. + */ + com.google.protobuf.ByteString getMountPointBytes(); + + /** + * + * + *
+   * Partition capacity.
+   * 
+ * + * int64 capacity_bytes = 4; + * + * @return The capacityBytes. + */ + long getCapacityBytes(); + + /** + * + * + *
+   * Partition free space.
+   * 
+ * + * int64 free_bytes = 5; + * + * @return The freeBytes. + */ + long getFreeBytes(); + + /** + * + * + *
+   * Partition UUID.
+   * 
+ * + * string uuid = 6; + * + * @return The uuid. + */ + java.lang.String getUuid(); + /** + * + * + *
+   * Partition UUID.
+   * 
+ * + * string uuid = 6; + * + * @return The bytes for uuid. + */ + com.google.protobuf.ByteString getUuidBytes(); + + /** + * + * + *
+   * Sub-partitions.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + * + * @return Whether the subPartitions field is set. + */ + boolean hasSubPartitions(); + /** + * + * + *
+   * Sub-partitions.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + * + * @return The subPartitions. + */ + com.google.cloud.migrationcenter.v1.DiskPartitionList getSubPartitions(); + /** + * + * + *
+   * Sub-partitions.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + */ + com.google.cloud.migrationcenter.v1.DiskPartitionListOrBuilder getSubPartitionsOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskUsageSample.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskUsageSample.java new file mode 100644 index 000000000000..9e5786e4f502 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskUsageSample.java @@ -0,0 +1,535 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Disk usage sample. Values are across all disks.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DiskUsageSample} + */ +public final class DiskUsageSample extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.DiskUsageSample) + DiskUsageSampleOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiskUsageSample.newBuilder() to construct. + private DiskUsageSample(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiskUsageSample() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiskUsageSample(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskUsageSample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskUsageSample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DiskUsageSample.class, + com.google.cloud.migrationcenter.v1.DiskUsageSample.Builder.class); + } + + public static final int AVERAGE_IOPS_FIELD_NUMBER = 1; + private float averageIops_ = 0F; + /** + * + * + *
+   * Average IOPS sampled over a short window. Must be non-negative.
+   * 
+ * + * float average_iops = 1; + * + * @return The averageIops. + */ + @java.lang.Override + public float getAverageIops() { + return averageIops_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(averageIops_) != 0) { + output.writeFloat(1, averageIops_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(averageIops_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, averageIops_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.DiskUsageSample)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.DiskUsageSample other = + (com.google.cloud.migrationcenter.v1.DiskUsageSample) obj; + + if (java.lang.Float.floatToIntBits(getAverageIops()) + != java.lang.Float.floatToIntBits(other.getAverageIops())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AVERAGE_IOPS_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getAverageIops()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.DiskUsageSample prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Disk usage sample. Values are across all disks.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.DiskUsageSample} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.DiskUsageSample) + com.google.cloud.migrationcenter.v1.DiskUsageSampleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskUsageSample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskUsageSample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.DiskUsageSample.class, + com.google.cloud.migrationcenter.v1.DiskUsageSample.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.DiskUsageSample.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + averageIops_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_DiskUsageSample_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskUsageSample getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.DiskUsageSample.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskUsageSample build() { + com.google.cloud.migrationcenter.v1.DiskUsageSample result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskUsageSample buildPartial() { + com.google.cloud.migrationcenter.v1.DiskUsageSample result = + new com.google.cloud.migrationcenter.v1.DiskUsageSample(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.DiskUsageSample result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.averageIops_ = averageIops_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.DiskUsageSample) { + return mergeFrom((com.google.cloud.migrationcenter.v1.DiskUsageSample) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.DiskUsageSample other) { + if (other == com.google.cloud.migrationcenter.v1.DiskUsageSample.getDefaultInstance()) + return this; + if (other.getAverageIops() != 0F) { + setAverageIops(other.getAverageIops()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + averageIops_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float averageIops_; + /** + * + * + *
+     * Average IOPS sampled over a short window. Must be non-negative.
+     * 
+ * + * float average_iops = 1; + * + * @return The averageIops. + */ + @java.lang.Override + public float getAverageIops() { + return averageIops_; + } + /** + * + * + *
+     * Average IOPS sampled over a short window. Must be non-negative.
+     * 
+ * + * float average_iops = 1; + * + * @param value The averageIops to set. + * @return This builder for chaining. + */ + public Builder setAverageIops(float value) { + + averageIops_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Average IOPS sampled over a short window. Must be non-negative.
+     * 
+ * + * float average_iops = 1; + * + * @return This builder for chaining. + */ + public Builder clearAverageIops() { + bitField0_ = (bitField0_ & ~0x00000001); + averageIops_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.DiskUsageSample) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.DiskUsageSample) + private static final com.google.cloud.migrationcenter.v1.DiskUsageSample DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.DiskUsageSample(); + } + + public static com.google.cloud.migrationcenter.v1.DiskUsageSample getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskUsageSample parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskUsageSample getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskUsageSampleOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskUsageSampleOrBuilder.java new file mode 100644 index 000000000000..ad7b84bd04d2 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/DiskUsageSampleOrBuilder.java @@ -0,0 +1,38 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface DiskUsageSampleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.DiskUsageSample) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Average IOPS sampled over a short window. Must be non-negative.
+   * 
+ * + * float average_iops = 1; + * + * @return The averageIops. + */ + float getAverageIops(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrame.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrame.java new file mode 100644 index 000000000000..b393371c4113 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrame.java @@ -0,0 +1,1758 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Message representing a frame which failed to be processed due to an error.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ErrorFrame} + */ +public final class ErrorFrame extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ErrorFrame) + ErrorFrameOrBuilder { + private static final long serialVersionUID = 0L; + // Use ErrorFrame.newBuilder() to construct. + private ErrorFrame(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ErrorFrame() { + name_ = ""; + violations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ErrorFrame(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ErrorFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ErrorFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ErrorFrame.class, + com.google.cloud.migrationcenter.v1.ErrorFrame.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The identifier of the ErrorFrame.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The identifier of the ErrorFrame.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIOLATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List violations_; + /** + * + * + *
+   * Output only. All the violations that were detected for the frame.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getViolationsList() { + return violations_; + } + /** + * + * + *
+   * Output only. All the violations that were detected for the frame.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getViolationsOrBuilderList() { + return violations_; + } + /** + * + * + *
+   * Output only. All the violations that were detected for the frame.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getViolationsCount() { + return violations_.size(); + } + /** + * + * + *
+   * Output only. All the violations that were detected for the frame.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FrameViolationEntry getViolations(int index) { + return violations_.get(index); + } + /** + * + * + *
+   * Output only. All the violations that were detected for the frame.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FrameViolationEntryOrBuilder getViolationsOrBuilder( + int index) { + return violations_.get(index); + } + + public static final int ORIGINAL_FRAME_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.AssetFrame originalFrame_; + /** + * + * + *
+   * Output only. The frame that was originally reported.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the originalFrame field is set. + */ + @java.lang.Override + public boolean hasOriginalFrame() { + return originalFrame_ != null; + } + /** + * + * + *
+   * Output only. The frame that was originally reported.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The originalFrame. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetFrame getOriginalFrame() { + return originalFrame_ == null + ? com.google.cloud.migrationcenter.v1.AssetFrame.getDefaultInstance() + : originalFrame_; + } + /** + * + * + *
+   * Output only. The frame that was originally reported.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder getOriginalFrameOrBuilder() { + return originalFrame_ == null + ? com.google.cloud.migrationcenter.v1.AssetFrame.getDefaultInstance() + : originalFrame_; + } + + public static final int INGESTION_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp ingestionTime_; + /** + * + * + *
+   * Output only. Frame ingestion time.
+   * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the ingestionTime field is set. + */ + @java.lang.Override + public boolean hasIngestionTime() { + return ingestionTime_ != null; + } + /** + * + * + *
+   * Output only. Frame ingestion time.
+   * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The ingestionTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getIngestionTime() { + return ingestionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : ingestionTime_; + } + /** + * + * + *
+   * Output only. Frame ingestion time.
+   * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getIngestionTimeOrBuilder() { + return ingestionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : ingestionTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < violations_.size(); i++) { + output.writeMessage(2, violations_.get(i)); + } + if (originalFrame_ != null) { + output.writeMessage(3, getOriginalFrame()); + } + if (ingestionTime_ != null) { + output.writeMessage(4, getIngestionTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < violations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, violations_.get(i)); + } + if (originalFrame_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOriginalFrame()); + } + if (ingestionTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getIngestionTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ErrorFrame)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ErrorFrame other = + (com.google.cloud.migrationcenter.v1.ErrorFrame) obj; + + if (!getName().equals(other.getName())) return false; + if (!getViolationsList().equals(other.getViolationsList())) return false; + if (hasOriginalFrame() != other.hasOriginalFrame()) return false; + if (hasOriginalFrame()) { + if (!getOriginalFrame().equals(other.getOriginalFrame())) return false; + } + if (hasIngestionTime() != other.hasIngestionTime()) return false; + if (hasIngestionTime()) { + if (!getIngestionTime().equals(other.getIngestionTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getViolationsCount() > 0) { + hash = (37 * hash) + VIOLATIONS_FIELD_NUMBER; + hash = (53 * hash) + getViolationsList().hashCode(); + } + if (hasOriginalFrame()) { + hash = (37 * hash) + ORIGINAL_FRAME_FIELD_NUMBER; + hash = (53 * hash) + getOriginalFrame().hashCode(); + } + if (hasIngestionTime()) { + hash = (37 * hash) + INGESTION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getIngestionTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.ErrorFrame prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message representing a frame which failed to be processed due to an error.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ErrorFrame} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ErrorFrame) + com.google.cloud.migrationcenter.v1.ErrorFrameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ErrorFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ErrorFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ErrorFrame.class, + com.google.cloud.migrationcenter.v1.ErrorFrame.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ErrorFrame.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (violationsBuilder_ == null) { + violations_ = java.util.Collections.emptyList(); + } else { + violations_ = null; + violationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + originalFrame_ = null; + if (originalFrameBuilder_ != null) { + originalFrameBuilder_.dispose(); + originalFrameBuilder_ = null; + } + ingestionTime_ = null; + if (ingestionTimeBuilder_ != null) { + ingestionTimeBuilder_.dispose(); + ingestionTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ErrorFrame_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ErrorFrame getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ErrorFrame.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ErrorFrame build() { + com.google.cloud.migrationcenter.v1.ErrorFrame result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ErrorFrame buildPartial() { + com.google.cloud.migrationcenter.v1.ErrorFrame result = + new com.google.cloud.migrationcenter.v1.ErrorFrame(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.migrationcenter.v1.ErrorFrame result) { + if (violationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + violations_ = java.util.Collections.unmodifiableList(violations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.violations_ = violations_; + } else { + result.violations_ = violationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ErrorFrame result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.originalFrame_ = + originalFrameBuilder_ == null ? originalFrame_ : originalFrameBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ingestionTime_ = + ingestionTimeBuilder_ == null ? ingestionTime_ : ingestionTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ErrorFrame) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ErrorFrame) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ErrorFrame other) { + if (other == com.google.cloud.migrationcenter.v1.ErrorFrame.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (violationsBuilder_ == null) { + if (!other.violations_.isEmpty()) { + if (violations_.isEmpty()) { + violations_ = other.violations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureViolationsIsMutable(); + violations_.addAll(other.violations_); + } + onChanged(); + } + } else { + if (!other.violations_.isEmpty()) { + if (violationsBuilder_.isEmpty()) { + violationsBuilder_.dispose(); + violationsBuilder_ = null; + violations_ = other.violations_; + bitField0_ = (bitField0_ & ~0x00000002); + violationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getViolationsFieldBuilder() + : null; + } else { + violationsBuilder_.addAllMessages(other.violations_); + } + } + } + if (other.hasOriginalFrame()) { + mergeOriginalFrame(other.getOriginalFrame()); + } + if (other.hasIngestionTime()) { + mergeIngestionTime(other.getIngestionTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.migrationcenter.v1.FrameViolationEntry m = + input.readMessage( + com.google.cloud.migrationcenter.v1.FrameViolationEntry.parser(), + extensionRegistry); + if (violationsBuilder_ == null) { + ensureViolationsIsMutable(); + violations_.add(m); + } else { + violationsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage(getOriginalFrameFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getIngestionTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The identifier of the ErrorFrame.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The identifier of the ErrorFrame.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The identifier of the ErrorFrame.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The identifier of the ErrorFrame.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The identifier of the ErrorFrame.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List violations_ = + java.util.Collections.emptyList(); + + private void ensureViolationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + violations_ = + new java.util.ArrayList( + violations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FrameViolationEntry, + com.google.cloud.migrationcenter.v1.FrameViolationEntry.Builder, + com.google.cloud.migrationcenter.v1.FrameViolationEntryOrBuilder> + violationsBuilder_; + + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getViolationsList() { + if (violationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(violations_); + } else { + return violationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getViolationsCount() { + if (violationsBuilder_ == null) { + return violations_.size(); + } else { + return violationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.FrameViolationEntry getViolations(int index) { + if (violationsBuilder_ == null) { + return violations_.get(index); + } else { + return violationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setViolations( + int index, com.google.cloud.migrationcenter.v1.FrameViolationEntry value) { + if (violationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViolationsIsMutable(); + violations_.set(index, value); + onChanged(); + } else { + violationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setViolations( + int index, + com.google.cloud.migrationcenter.v1.FrameViolationEntry.Builder builderForValue) { + if (violationsBuilder_ == null) { + ensureViolationsIsMutable(); + violations_.set(index, builderForValue.build()); + onChanged(); + } else { + violationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addViolations(com.google.cloud.migrationcenter.v1.FrameViolationEntry value) { + if (violationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViolationsIsMutable(); + violations_.add(value); + onChanged(); + } else { + violationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addViolations( + int index, com.google.cloud.migrationcenter.v1.FrameViolationEntry value) { + if (violationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureViolationsIsMutable(); + violations_.add(index, value); + onChanged(); + } else { + violationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addViolations( + com.google.cloud.migrationcenter.v1.FrameViolationEntry.Builder builderForValue) { + if (violationsBuilder_ == null) { + ensureViolationsIsMutable(); + violations_.add(builderForValue.build()); + onChanged(); + } else { + violationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addViolations( + int index, + com.google.cloud.migrationcenter.v1.FrameViolationEntry.Builder builderForValue) { + if (violationsBuilder_ == null) { + ensureViolationsIsMutable(); + violations_.add(index, builderForValue.build()); + onChanged(); + } else { + violationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllViolations( + java.lang.Iterable + values) { + if (violationsBuilder_ == null) { + ensureViolationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, violations_); + onChanged(); + } else { + violationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearViolations() { + if (violationsBuilder_ == null) { + violations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + violationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeViolations(int index) { + if (violationsBuilder_ == null) { + ensureViolationsIsMutable(); + violations_.remove(index); + onChanged(); + } else { + violationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.FrameViolationEntry.Builder getViolationsBuilder( + int index) { + return getViolationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.FrameViolationEntryOrBuilder getViolationsOrBuilder( + int index) { + if (violationsBuilder_ == null) { + return violations_.get(index); + } else { + return violationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.migrationcenter.v1.FrameViolationEntryOrBuilder> + getViolationsOrBuilderList() { + if (violationsBuilder_ != null) { + return violationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(violations_); + } + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.FrameViolationEntry.Builder addViolationsBuilder() { + return getViolationsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.FrameViolationEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.FrameViolationEntry.Builder addViolationsBuilder( + int index) { + return getViolationsFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.FrameViolationEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. All the violations that were detected for the frame.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getViolationsBuilderList() { + return getViolationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FrameViolationEntry, + com.google.cloud.migrationcenter.v1.FrameViolationEntry.Builder, + com.google.cloud.migrationcenter.v1.FrameViolationEntryOrBuilder> + getViolationsFieldBuilder() { + if (violationsBuilder_ == null) { + violationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FrameViolationEntry, + com.google.cloud.migrationcenter.v1.FrameViolationEntry.Builder, + com.google.cloud.migrationcenter.v1.FrameViolationEntryOrBuilder>( + violations_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + violations_ = null; + } + return violationsBuilder_; + } + + private com.google.cloud.migrationcenter.v1.AssetFrame originalFrame_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetFrame, + com.google.cloud.migrationcenter.v1.AssetFrame.Builder, + com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder> + originalFrameBuilder_; + /** + * + * + *
+     * Output only. The frame that was originally reported.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the originalFrame field is set. + */ + public boolean hasOriginalFrame() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The frame that was originally reported.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The originalFrame. + */ + public com.google.cloud.migrationcenter.v1.AssetFrame getOriginalFrame() { + if (originalFrameBuilder_ == null) { + return originalFrame_ == null + ? com.google.cloud.migrationcenter.v1.AssetFrame.getDefaultInstance() + : originalFrame_; + } else { + return originalFrameBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The frame that was originally reported.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOriginalFrame(com.google.cloud.migrationcenter.v1.AssetFrame value) { + if (originalFrameBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originalFrame_ = value; + } else { + originalFrameBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The frame that was originally reported.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOriginalFrame( + com.google.cloud.migrationcenter.v1.AssetFrame.Builder builderForValue) { + if (originalFrameBuilder_ == null) { + originalFrame_ = builderForValue.build(); + } else { + originalFrameBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The frame that was originally reported.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeOriginalFrame(com.google.cloud.migrationcenter.v1.AssetFrame value) { + if (originalFrameBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && originalFrame_ != null + && originalFrame_ + != com.google.cloud.migrationcenter.v1.AssetFrame.getDefaultInstance()) { + getOriginalFrameBuilder().mergeFrom(value); + } else { + originalFrame_ = value; + } + } else { + originalFrameBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The frame that was originally reported.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOriginalFrame() { + bitField0_ = (bitField0_ & ~0x00000004); + originalFrame_ = null; + if (originalFrameBuilder_ != null) { + originalFrameBuilder_.dispose(); + originalFrameBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The frame that was originally reported.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.AssetFrame.Builder getOriginalFrameBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOriginalFrameFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The frame that was originally reported.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder getOriginalFrameOrBuilder() { + if (originalFrameBuilder_ != null) { + return originalFrameBuilder_.getMessageOrBuilder(); + } else { + return originalFrame_ == null + ? com.google.cloud.migrationcenter.v1.AssetFrame.getDefaultInstance() + : originalFrame_; + } + } + /** + * + * + *
+     * Output only. The frame that was originally reported.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetFrame, + com.google.cloud.migrationcenter.v1.AssetFrame.Builder, + com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder> + getOriginalFrameFieldBuilder() { + if (originalFrameBuilder_ == null) { + originalFrameBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetFrame, + com.google.cloud.migrationcenter.v1.AssetFrame.Builder, + com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder>( + getOriginalFrame(), getParentForChildren(), isClean()); + originalFrame_ = null; + } + return originalFrameBuilder_; + } + + private com.google.protobuf.Timestamp ingestionTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + ingestionTimeBuilder_; + /** + * + * + *
+     * Output only. Frame ingestion time.
+     * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the ingestionTime field is set. + */ + public boolean hasIngestionTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Frame ingestion time.
+     * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The ingestionTime. + */ + public com.google.protobuf.Timestamp getIngestionTime() { + if (ingestionTimeBuilder_ == null) { + return ingestionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : ingestionTime_; + } else { + return ingestionTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Frame ingestion time.
+     * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setIngestionTime(com.google.protobuf.Timestamp value) { + if (ingestionTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ingestionTime_ = value; + } else { + ingestionTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Frame ingestion time.
+     * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setIngestionTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (ingestionTimeBuilder_ == null) { + ingestionTime_ = builderForValue.build(); + } else { + ingestionTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Frame ingestion time.
+     * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeIngestionTime(com.google.protobuf.Timestamp value) { + if (ingestionTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && ingestionTime_ != null + && ingestionTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getIngestionTimeBuilder().mergeFrom(value); + } else { + ingestionTime_ = value; + } + } else { + ingestionTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Frame ingestion time.
+     * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearIngestionTime() { + bitField0_ = (bitField0_ & ~0x00000008); + ingestionTime_ = null; + if (ingestionTimeBuilder_ != null) { + ingestionTimeBuilder_.dispose(); + ingestionTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Frame ingestion time.
+     * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getIngestionTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getIngestionTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Frame ingestion time.
+     * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getIngestionTimeOrBuilder() { + if (ingestionTimeBuilder_ != null) { + return ingestionTimeBuilder_.getMessageOrBuilder(); + } else { + return ingestionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : ingestionTime_; + } + } + /** + * + * + *
+     * Output only. Frame ingestion time.
+     * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getIngestionTimeFieldBuilder() { + if (ingestionTimeBuilder_ == null) { + ingestionTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getIngestionTime(), getParentForChildren(), isClean()); + ingestionTime_ = null; + } + return ingestionTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ErrorFrame) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ErrorFrame) + private static final com.google.cloud.migrationcenter.v1.ErrorFrame DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ErrorFrame(); + } + + public static com.google.cloud.migrationcenter.v1.ErrorFrame getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ErrorFrame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ErrorFrame getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameName.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameName.java new file mode 100644 index 000000000000..2542e2b1b116 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameName.java @@ -0,0 +1,260 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ErrorFrameName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_SOURCE_ERROR_FRAME = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String source; + private final String errorFrame; + + @Deprecated + protected ErrorFrameName() { + project = null; + location = null; + source = null; + errorFrame = null; + } + + private ErrorFrameName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + source = Preconditions.checkNotNull(builder.getSource()); + errorFrame = Preconditions.checkNotNull(builder.getErrorFrame()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSource() { + return source; + } + + public String getErrorFrame() { + return errorFrame; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ErrorFrameName of( + String project, String location, String source, String errorFrame) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setSource(source) + .setErrorFrame(errorFrame) + .build(); + } + + public static String format(String project, String location, String source, String errorFrame) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setSource(source) + .setErrorFrame(errorFrame) + .build() + .toString(); + } + + public static ErrorFrameName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_SOURCE_ERROR_FRAME.validatedMatch( + formattedString, "ErrorFrameName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("source"), + matchMap.get("error_frame")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ErrorFrameName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_SOURCE_ERROR_FRAME.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (source != null) { + fieldMapBuilder.put("source", source); + } + if (errorFrame != null) { + fieldMapBuilder.put("error_frame", errorFrame); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SOURCE_ERROR_FRAME.instantiate( + "project", project, "location", location, "source", source, "error_frame", errorFrame); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ErrorFrameName that = ((ErrorFrameName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.source, that.source) + && Objects.equals(this.errorFrame, that.errorFrame); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(source); + h *= 1000003; + h ^= Objects.hashCode(errorFrame); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}. + */ + public static class Builder { + private String project; + private String location; + private String source; + private String errorFrame; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSource() { + return source; + } + + public String getErrorFrame() { + return errorFrame; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setSource(String source) { + this.source = source; + return this; + } + + public Builder setErrorFrame(String errorFrame) { + this.errorFrame = errorFrame; + return this; + } + + private Builder(ErrorFrameName errorFrameName) { + this.project = errorFrameName.project; + this.location = errorFrameName.location; + this.source = errorFrameName.source; + this.errorFrame = errorFrameName.errorFrame; + } + + public ErrorFrameName build() { + return new ErrorFrameName(this); + } + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameOrBuilder.java new file mode 100644 index 000000000000..43c76b223d32 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameOrBuilder.java @@ -0,0 +1,195 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ErrorFrameOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ErrorFrame) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The identifier of the ErrorFrame.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The identifier of the ErrorFrame.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. All the violations that were detected for the frame.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getViolationsList(); + /** + * + * + *
+   * Output only. All the violations that were detected for the frame.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.FrameViolationEntry getViolations(int index); + /** + * + * + *
+   * Output only. All the violations that were detected for the frame.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getViolationsCount(); + /** + * + * + *
+   * Output only. All the violations that were detected for the frame.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getViolationsOrBuilderList(); + /** + * + * + *
+   * Output only. All the violations that were detected for the frame.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.FrameViolationEntryOrBuilder getViolationsOrBuilder( + int index); + + /** + * + * + *
+   * Output only. The frame that was originally reported.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the originalFrame field is set. + */ + boolean hasOriginalFrame(); + /** + * + * + *
+   * Output only. The frame that was originally reported.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The originalFrame. + */ + com.google.cloud.migrationcenter.v1.AssetFrame getOriginalFrame(); + /** + * + * + *
+   * Output only. The frame that was originally reported.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder getOriginalFrameOrBuilder(); + + /** + * + * + *
+   * Output only. Frame ingestion time.
+   * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the ingestionTime field is set. + */ + boolean hasIngestionTime(); + /** + * + * + *
+   * Output only. Frame ingestion time.
+   * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The ingestionTime. + */ + com.google.protobuf.Timestamp getIngestionTime(); + /** + * + * + *
+   * Output only. Frame ingestion time.
+   * 
+ * + * + * .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getIngestionTimeOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameView.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameView.java new file mode 100644 index 000000000000..3edd888011db --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ErrorFrameView.java @@ -0,0 +1,179 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * ErrorFrameView can be specified in ErrorFrames List and Get requests to
+ * control the level of details that is returned for the original frame.
+ * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.ErrorFrameView} + */ +public enum ErrorFrameView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Value is unset. The system will fallback to the default value.
+   * 
+ * + * ERROR_FRAME_VIEW_UNSPECIFIED = 0; + */ + ERROR_FRAME_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * Include basic frame data, but not the full contents.
+   * 
+ * + * ERROR_FRAME_VIEW_BASIC = 1; + */ + ERROR_FRAME_VIEW_BASIC(1), + /** + * + * + *
+   * Include everything.
+   * 
+ * + * ERROR_FRAME_VIEW_FULL = 2; + */ + ERROR_FRAME_VIEW_FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Value is unset. The system will fallback to the default value.
+   * 
+ * + * ERROR_FRAME_VIEW_UNSPECIFIED = 0; + */ + public static final int ERROR_FRAME_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Include basic frame data, but not the full contents.
+   * 
+ * + * ERROR_FRAME_VIEW_BASIC = 1; + */ + public static final int ERROR_FRAME_VIEW_BASIC_VALUE = 1; + /** + * + * + *
+   * Include everything.
+   * 
+ * + * ERROR_FRAME_VIEW_FULL = 2; + */ + public static final int ERROR_FRAME_VIEW_FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ErrorFrameView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ErrorFrameView forNumber(int value) { + switch (value) { + case 0: + return ERROR_FRAME_VIEW_UNSPECIFIED; + case 1: + return ERROR_FRAME_VIEW_BASIC; + case 2: + return ERROR_FRAME_VIEW_FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ErrorFrameView findValueByNumber(int number) { + return ErrorFrameView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto.getDescriptor() + .getEnumTypes() + .get(4); + } + + private static final ErrorFrameView[] VALUES = values(); + + public static ErrorFrameView valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ErrorFrameView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.ErrorFrameView) +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ExecutionReport.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ExecutionReport.java new file mode 100644 index 000000000000..13f9cf721e44 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ExecutionReport.java @@ -0,0 +1,898 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A resource that reports result of the import job execution.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ExecutionReport} + */ +public final class ExecutionReport extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ExecutionReport) + ExecutionReportOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecutionReport.newBuilder() to construct. + private ExecutionReport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecutionReport() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecutionReport(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ExecutionReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ExecutionReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ExecutionReport.class, + com.google.cloud.migrationcenter.v1.ExecutionReport.Builder.class); + } + + public static final int FRAMES_REPORTED_FIELD_NUMBER = 1; + private int framesReported_ = 0; + /** + * + * + *
+   * Total number of asset frames reported for the import job.
+   * 
+ * + * int32 frames_reported = 1; + * + * @return The framesReported. + */ + @java.lang.Override + public int getFramesReported() { + return framesReported_; + } + + public static final int EXECUTION_ERRORS_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.ValidationReport executionErrors_; + /** + * + * + *
+   * Validation errors encountered during the execution of the import job.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + * + * @return Whether the executionErrors field is set. + */ + @java.lang.Override + public boolean hasExecutionErrors() { + return executionErrors_ != null; + } + /** + * + * + *
+   * Validation errors encountered during the execution of the import job.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + * + * @return The executionErrors. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidationReport getExecutionErrors() { + return executionErrors_ == null + ? com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance() + : executionErrors_; + } + /** + * + * + *
+   * Validation errors encountered during the execution of the import job.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder + getExecutionErrorsOrBuilder() { + return executionErrors_ == null + ? com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance() + : executionErrors_; + } + + public static final int TOTAL_ROWS_COUNT_FIELD_NUMBER = 3; + private int totalRowsCount_ = 0; + /** + * + * + *
+   * Total number of rows in the import job.
+   * 
+ * + * int32 total_rows_count = 3; + * + * @return The totalRowsCount. + */ + @java.lang.Override + public int getTotalRowsCount() { + return totalRowsCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (framesReported_ != 0) { + output.writeInt32(1, framesReported_); + } + if (executionErrors_ != null) { + output.writeMessage(2, getExecutionErrors()); + } + if (totalRowsCount_ != 0) { + output.writeInt32(3, totalRowsCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (framesReported_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, framesReported_); + } + if (executionErrors_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExecutionErrors()); + } + if (totalRowsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, totalRowsCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ExecutionReport)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ExecutionReport other = + (com.google.cloud.migrationcenter.v1.ExecutionReport) obj; + + if (getFramesReported() != other.getFramesReported()) return false; + if (hasExecutionErrors() != other.hasExecutionErrors()) return false; + if (hasExecutionErrors()) { + if (!getExecutionErrors().equals(other.getExecutionErrors())) return false; + } + if (getTotalRowsCount() != other.getTotalRowsCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FRAMES_REPORTED_FIELD_NUMBER; + hash = (53 * hash) + getFramesReported(); + if (hasExecutionErrors()) { + hash = (37 * hash) + EXECUTION_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getExecutionErrors().hashCode(); + } + hash = (37 * hash) + TOTAL_ROWS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTotalRowsCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.ExecutionReport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that reports result of the import job execution.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ExecutionReport} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ExecutionReport) + com.google.cloud.migrationcenter.v1.ExecutionReportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ExecutionReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ExecutionReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ExecutionReport.class, + com.google.cloud.migrationcenter.v1.ExecutionReport.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ExecutionReport.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + framesReported_ = 0; + executionErrors_ = null; + if (executionErrorsBuilder_ != null) { + executionErrorsBuilder_.dispose(); + executionErrorsBuilder_ = null; + } + totalRowsCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ExecutionReport_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ExecutionReport getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ExecutionReport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ExecutionReport build() { + com.google.cloud.migrationcenter.v1.ExecutionReport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ExecutionReport buildPartial() { + com.google.cloud.migrationcenter.v1.ExecutionReport result = + new com.google.cloud.migrationcenter.v1.ExecutionReport(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ExecutionReport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.framesReported_ = framesReported_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.executionErrors_ = + executionErrorsBuilder_ == null ? executionErrors_ : executionErrorsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalRowsCount_ = totalRowsCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ExecutionReport) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ExecutionReport) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ExecutionReport other) { + if (other == com.google.cloud.migrationcenter.v1.ExecutionReport.getDefaultInstance()) + return this; + if (other.getFramesReported() != 0) { + setFramesReported(other.getFramesReported()); + } + if (other.hasExecutionErrors()) { + mergeExecutionErrors(other.getExecutionErrors()); + } + if (other.getTotalRowsCount() != 0) { + setTotalRowsCount(other.getTotalRowsCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + framesReported_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getExecutionErrorsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + totalRowsCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int framesReported_; + /** + * + * + *
+     * Total number of asset frames reported for the import job.
+     * 
+ * + * int32 frames_reported = 1; + * + * @return The framesReported. + */ + @java.lang.Override + public int getFramesReported() { + return framesReported_; + } + /** + * + * + *
+     * Total number of asset frames reported for the import job.
+     * 
+ * + * int32 frames_reported = 1; + * + * @param value The framesReported to set. + * @return This builder for chaining. + */ + public Builder setFramesReported(int value) { + + framesReported_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Total number of asset frames reported for the import job.
+     * 
+ * + * int32 frames_reported = 1; + * + * @return This builder for chaining. + */ + public Builder clearFramesReported() { + bitField0_ = (bitField0_ & ~0x00000001); + framesReported_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.ValidationReport executionErrors_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ValidationReport, + com.google.cloud.migrationcenter.v1.ValidationReport.Builder, + com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder> + executionErrorsBuilder_; + /** + * + * + *
+     * Validation errors encountered during the execution of the import job.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + * + * @return Whether the executionErrors field is set. + */ + public boolean hasExecutionErrors() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Validation errors encountered during the execution of the import job.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + * + * @return The executionErrors. + */ + public com.google.cloud.migrationcenter.v1.ValidationReport getExecutionErrors() { + if (executionErrorsBuilder_ == null) { + return executionErrors_ == null + ? com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance() + : executionErrors_; + } else { + return executionErrorsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Validation errors encountered during the execution of the import job.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + */ + public Builder setExecutionErrors(com.google.cloud.migrationcenter.v1.ValidationReport value) { + if (executionErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionErrors_ = value; + } else { + executionErrorsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Validation errors encountered during the execution of the import job.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + */ + public Builder setExecutionErrors( + com.google.cloud.migrationcenter.v1.ValidationReport.Builder builderForValue) { + if (executionErrorsBuilder_ == null) { + executionErrors_ = builderForValue.build(); + } else { + executionErrorsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Validation errors encountered during the execution of the import job.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + */ + public Builder mergeExecutionErrors( + com.google.cloud.migrationcenter.v1.ValidationReport value) { + if (executionErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && executionErrors_ != null + && executionErrors_ + != com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance()) { + getExecutionErrorsBuilder().mergeFrom(value); + } else { + executionErrors_ = value; + } + } else { + executionErrorsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Validation errors encountered during the execution of the import job.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + */ + public Builder clearExecutionErrors() { + bitField0_ = (bitField0_ & ~0x00000002); + executionErrors_ = null; + if (executionErrorsBuilder_ != null) { + executionErrorsBuilder_.dispose(); + executionErrorsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Validation errors encountered during the execution of the import job.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ValidationReport.Builder + getExecutionErrorsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getExecutionErrorsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Validation errors encountered during the execution of the import job.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder + getExecutionErrorsOrBuilder() { + if (executionErrorsBuilder_ != null) { + return executionErrorsBuilder_.getMessageOrBuilder(); + } else { + return executionErrors_ == null + ? com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance() + : executionErrors_; + } + } + /** + * + * + *
+     * Validation errors encountered during the execution of the import job.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ValidationReport, + com.google.cloud.migrationcenter.v1.ValidationReport.Builder, + com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder> + getExecutionErrorsFieldBuilder() { + if (executionErrorsBuilder_ == null) { + executionErrorsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ValidationReport, + com.google.cloud.migrationcenter.v1.ValidationReport.Builder, + com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder>( + getExecutionErrors(), getParentForChildren(), isClean()); + executionErrors_ = null; + } + return executionErrorsBuilder_; + } + + private int totalRowsCount_; + /** + * + * + *
+     * Total number of rows in the import job.
+     * 
+ * + * int32 total_rows_count = 3; + * + * @return The totalRowsCount. + */ + @java.lang.Override + public int getTotalRowsCount() { + return totalRowsCount_; + } + /** + * + * + *
+     * Total number of rows in the import job.
+     * 
+ * + * int32 total_rows_count = 3; + * + * @param value The totalRowsCount to set. + * @return This builder for chaining. + */ + public Builder setTotalRowsCount(int value) { + + totalRowsCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Total number of rows in the import job.
+     * 
+ * + * int32 total_rows_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearTotalRowsCount() { + bitField0_ = (bitField0_ & ~0x00000004); + totalRowsCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ExecutionReport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ExecutionReport) + private static final com.google.cloud.migrationcenter.v1.ExecutionReport DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ExecutionReport(); + } + + public static com.google.cloud.migrationcenter.v1.ExecutionReport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecutionReport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ExecutionReport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ExecutionReportOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ExecutionReportOrBuilder.java new file mode 100644 index 000000000000..c55f31d264c5 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ExecutionReportOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ExecutionReportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ExecutionReport) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Total number of asset frames reported for the import job.
+   * 
+ * + * int32 frames_reported = 1; + * + * @return The framesReported. + */ + int getFramesReported(); + + /** + * + * + *
+   * Validation errors encountered during the execution of the import job.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + * + * @return Whether the executionErrors field is set. + */ + boolean hasExecutionErrors(); + /** + * + * + *
+   * Validation errors encountered during the execution of the import job.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + * + * @return The executionErrors. + */ + com.google.cloud.migrationcenter.v1.ValidationReport getExecutionErrors(); + /** + * + * + *
+   * Validation errors encountered during the execution of the import job.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + */ + com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder getExecutionErrorsOrBuilder(); + + /** + * + * + *
+   * Total number of rows in the import job.
+   * 
+ * + * int32 total_rows_count = 3; + * + * @return The totalRowsCount. + */ + int getTotalRowsCount(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FileValidationReport.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FileValidationReport.java new file mode 100644 index 000000000000..ee86fab74778 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FileValidationReport.java @@ -0,0 +1,1718 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A resource that aggregates the validation errors found in an import job file.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.FileValidationReport} + */ +public final class FileValidationReport extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.FileValidationReport) + FileValidationReportOrBuilder { + private static final long serialVersionUID = 0L; + // Use FileValidationReport.newBuilder() to construct. + private FileValidationReport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FileValidationReport() { + fileName_ = ""; + rowErrors_ = java.util.Collections.emptyList(); + fileErrors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FileValidationReport(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FileValidationReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FileValidationReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.FileValidationReport.class, + com.google.cloud.migrationcenter.v1.FileValidationReport.Builder.class); + } + + public static final int FILE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fileName_ = ""; + /** + * + * + *
+   * The name of the file.
+   * 
+ * + * string file_name = 1; + * + * @return The fileName. + */ + @java.lang.Override + public java.lang.String getFileName() { + java.lang.Object ref = fileName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileName_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the file.
+   * 
+ * + * string file_name = 1; + * + * @return The bytes for fileName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFileNameBytes() { + java.lang.Object ref = fileName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROW_ERRORS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List rowErrors_; + /** + * + * + *
+   * Partial list of rows that encountered validation error.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + @java.lang.Override + public java.util.List getRowErrorsList() { + return rowErrors_; + } + /** + * + * + *
+   * Partial list of rows that encountered validation error.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + @java.lang.Override + public java.util.List + getRowErrorsOrBuilderList() { + return rowErrors_; + } + /** + * + * + *
+   * Partial list of rows that encountered validation error.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + @java.lang.Override + public int getRowErrorsCount() { + return rowErrors_.size(); + } + /** + * + * + *
+   * Partial list of rows that encountered validation error.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportRowError getRowErrors(int index) { + return rowErrors_.get(index); + } + /** + * + * + *
+   * Partial list of rows that encountered validation error.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportRowErrorOrBuilder getRowErrorsOrBuilder( + int index) { + return rowErrors_.get(index); + } + + public static final int PARTIAL_REPORT_FIELD_NUMBER = 3; + private boolean partialReport_ = false; + /** + * + * + *
+   * Flag indicating that processing was aborted due to maximum number of
+   * errors.
+   * 
+ * + * bool partial_report = 3; + * + * @return The partialReport. + */ + @java.lang.Override + public boolean getPartialReport() { + return partialReport_; + } + + public static final int FILE_ERRORS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List fileErrors_; + /** + * + * + *
+   * List of file level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + @java.lang.Override + public java.util.List getFileErrorsList() { + return fileErrors_; + } + /** + * + * + *
+   * List of file level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + @java.lang.Override + public java.util.List + getFileErrorsOrBuilderList() { + return fileErrors_; + } + /** + * + * + *
+   * List of file level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + @java.lang.Override + public int getFileErrorsCount() { + return fileErrors_.size(); + } + /** + * + * + *
+   * List of file level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportError getFileErrors(int index) { + return fileErrors_.get(index); + } + /** + * + * + *
+   * List of file level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder getFileErrorsOrBuilder( + int index) { + return fileErrors_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fileName_); + } + for (int i = 0; i < rowErrors_.size(); i++) { + output.writeMessage(2, rowErrors_.get(i)); + } + if (partialReport_ != false) { + output.writeBool(3, partialReport_); + } + for (int i = 0; i < fileErrors_.size(); i++) { + output.writeMessage(4, fileErrors_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fileName_); + } + for (int i = 0; i < rowErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, rowErrors_.get(i)); + } + if (partialReport_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, partialReport_); + } + for (int i = 0; i < fileErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, fileErrors_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.FileValidationReport)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.FileValidationReport other = + (com.google.cloud.migrationcenter.v1.FileValidationReport) obj; + + if (!getFileName().equals(other.getFileName())) return false; + if (!getRowErrorsList().equals(other.getRowErrorsList())) return false; + if (getPartialReport() != other.getPartialReport()) return false; + if (!getFileErrorsList().equals(other.getFileErrorsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFileName().hashCode(); + if (getRowErrorsCount() > 0) { + hash = (37 * hash) + ROW_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getRowErrorsList().hashCode(); + } + hash = (37 * hash) + PARTIAL_REPORT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPartialReport()); + if (getFileErrorsCount() > 0) { + hash = (37 * hash) + FILE_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getFileErrorsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.FileValidationReport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that aggregates the validation errors found in an import job file.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.FileValidationReport} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.FileValidationReport) + com.google.cloud.migrationcenter.v1.FileValidationReportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FileValidationReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FileValidationReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.FileValidationReport.class, + com.google.cloud.migrationcenter.v1.FileValidationReport.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.FileValidationReport.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fileName_ = ""; + if (rowErrorsBuilder_ == null) { + rowErrors_ = java.util.Collections.emptyList(); + } else { + rowErrors_ = null; + rowErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + partialReport_ = false; + if (fileErrorsBuilder_ == null) { + fileErrors_ = java.util.Collections.emptyList(); + } else { + fileErrors_ = null; + fileErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FileValidationReport_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FileValidationReport getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.FileValidationReport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FileValidationReport build() { + com.google.cloud.migrationcenter.v1.FileValidationReport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FileValidationReport buildPartial() { + com.google.cloud.migrationcenter.v1.FileValidationReport result = + new com.google.cloud.migrationcenter.v1.FileValidationReport(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.FileValidationReport result) { + if (rowErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + rowErrors_ = java.util.Collections.unmodifiableList(rowErrors_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rowErrors_ = rowErrors_; + } else { + result.rowErrors_ = rowErrorsBuilder_.build(); + } + if (fileErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + fileErrors_ = java.util.Collections.unmodifiableList(fileErrors_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.fileErrors_ = fileErrors_; + } else { + result.fileErrors_ = fileErrorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.FileValidationReport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fileName_ = fileName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.partialReport_ = partialReport_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.FileValidationReport) { + return mergeFrom((com.google.cloud.migrationcenter.v1.FileValidationReport) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.FileValidationReport other) { + if (other == com.google.cloud.migrationcenter.v1.FileValidationReport.getDefaultInstance()) + return this; + if (!other.getFileName().isEmpty()) { + fileName_ = other.fileName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (rowErrorsBuilder_ == null) { + if (!other.rowErrors_.isEmpty()) { + if (rowErrors_.isEmpty()) { + rowErrors_ = other.rowErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRowErrorsIsMutable(); + rowErrors_.addAll(other.rowErrors_); + } + onChanged(); + } + } else { + if (!other.rowErrors_.isEmpty()) { + if (rowErrorsBuilder_.isEmpty()) { + rowErrorsBuilder_.dispose(); + rowErrorsBuilder_ = null; + rowErrors_ = other.rowErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + rowErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRowErrorsFieldBuilder() + : null; + } else { + rowErrorsBuilder_.addAllMessages(other.rowErrors_); + } + } + } + if (other.getPartialReport() != false) { + setPartialReport(other.getPartialReport()); + } + if (fileErrorsBuilder_ == null) { + if (!other.fileErrors_.isEmpty()) { + if (fileErrors_.isEmpty()) { + fileErrors_ = other.fileErrors_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureFileErrorsIsMutable(); + fileErrors_.addAll(other.fileErrors_); + } + onChanged(); + } + } else { + if (!other.fileErrors_.isEmpty()) { + if (fileErrorsBuilder_.isEmpty()) { + fileErrorsBuilder_.dispose(); + fileErrorsBuilder_ = null; + fileErrors_ = other.fileErrors_; + bitField0_ = (bitField0_ & ~0x00000008); + fileErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFileErrorsFieldBuilder() + : null; + } else { + fileErrorsBuilder_.addAllMessages(other.fileErrors_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + fileName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.migrationcenter.v1.ImportRowError m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ImportRowError.parser(), + extensionRegistry); + if (rowErrorsBuilder_ == null) { + ensureRowErrorsIsMutable(); + rowErrors_.add(m); + } else { + rowErrorsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + partialReport_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + com.google.cloud.migrationcenter.v1.ImportError m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ImportError.parser(), + extensionRegistry); + if (fileErrorsBuilder_ == null) { + ensureFileErrorsIsMutable(); + fileErrors_.add(m); + } else { + fileErrorsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object fileName_ = ""; + /** + * + * + *
+     * The name of the file.
+     * 
+ * + * string file_name = 1; + * + * @return The fileName. + */ + public java.lang.String getFileName() { + java.lang.Object ref = fileName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the file.
+     * 
+ * + * string file_name = 1; + * + * @return The bytes for fileName. + */ + public com.google.protobuf.ByteString getFileNameBytes() { + java.lang.Object ref = fileName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the file.
+     * 
+ * + * string file_name = 1; + * + * @param value The fileName to set. + * @return This builder for chaining. + */ + public Builder setFileName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fileName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the file.
+     * 
+ * + * string file_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearFileName() { + fileName_ = getDefaultInstance().getFileName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the file.
+     * 
+ * + * string file_name = 1; + * + * @param value The bytes for fileName to set. + * @return This builder for chaining. + */ + public Builder setFileNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fileName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List rowErrors_ = + java.util.Collections.emptyList(); + + private void ensureRowErrorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + rowErrors_ = + new java.util.ArrayList(rowErrors_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportRowError, + com.google.cloud.migrationcenter.v1.ImportRowError.Builder, + com.google.cloud.migrationcenter.v1.ImportRowErrorOrBuilder> + rowErrorsBuilder_; + + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public java.util.List getRowErrorsList() { + if (rowErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rowErrors_); + } else { + return rowErrorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public int getRowErrorsCount() { + if (rowErrorsBuilder_ == null) { + return rowErrors_.size(); + } else { + return rowErrorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ImportRowError getRowErrors(int index) { + if (rowErrorsBuilder_ == null) { + return rowErrors_.get(index); + } else { + return rowErrorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public Builder setRowErrors( + int index, com.google.cloud.migrationcenter.v1.ImportRowError value) { + if (rowErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowErrorsIsMutable(); + rowErrors_.set(index, value); + onChanged(); + } else { + rowErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public Builder setRowErrors( + int index, com.google.cloud.migrationcenter.v1.ImportRowError.Builder builderForValue) { + if (rowErrorsBuilder_ == null) { + ensureRowErrorsIsMutable(); + rowErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + rowErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public Builder addRowErrors(com.google.cloud.migrationcenter.v1.ImportRowError value) { + if (rowErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowErrorsIsMutable(); + rowErrors_.add(value); + onChanged(); + } else { + rowErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public Builder addRowErrors( + int index, com.google.cloud.migrationcenter.v1.ImportRowError value) { + if (rowErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowErrorsIsMutable(); + rowErrors_.add(index, value); + onChanged(); + } else { + rowErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public Builder addRowErrors( + com.google.cloud.migrationcenter.v1.ImportRowError.Builder builderForValue) { + if (rowErrorsBuilder_ == null) { + ensureRowErrorsIsMutable(); + rowErrors_.add(builderForValue.build()); + onChanged(); + } else { + rowErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public Builder addRowErrors( + int index, com.google.cloud.migrationcenter.v1.ImportRowError.Builder builderForValue) { + if (rowErrorsBuilder_ == null) { + ensureRowErrorsIsMutable(); + rowErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + rowErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public Builder addAllRowErrors( + java.lang.Iterable values) { + if (rowErrorsBuilder_ == null) { + ensureRowErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rowErrors_); + onChanged(); + } else { + rowErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public Builder clearRowErrors() { + if (rowErrorsBuilder_ == null) { + rowErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + rowErrorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public Builder removeRowErrors(int index) { + if (rowErrorsBuilder_ == null) { + ensureRowErrorsIsMutable(); + rowErrors_.remove(index); + onChanged(); + } else { + rowErrorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ImportRowError.Builder getRowErrorsBuilder( + int index) { + return getRowErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ImportRowErrorOrBuilder getRowErrorsOrBuilder( + int index) { + if (rowErrorsBuilder_ == null) { + return rowErrors_.get(index); + } else { + return rowErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public java.util.List + getRowErrorsOrBuilderList() { + if (rowErrorsBuilder_ != null) { + return rowErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rowErrors_); + } + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ImportRowError.Builder addRowErrorsBuilder() { + return getRowErrorsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.ImportRowError.getDefaultInstance()); + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ImportRowError.Builder addRowErrorsBuilder( + int index) { + return getRowErrorsFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.ImportRowError.getDefaultInstance()); + } + /** + * + * + *
+     * Partial list of rows that encountered validation error.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + public java.util.List + getRowErrorsBuilderList() { + return getRowErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportRowError, + com.google.cloud.migrationcenter.v1.ImportRowError.Builder, + com.google.cloud.migrationcenter.v1.ImportRowErrorOrBuilder> + getRowErrorsFieldBuilder() { + if (rowErrorsBuilder_ == null) { + rowErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportRowError, + com.google.cloud.migrationcenter.v1.ImportRowError.Builder, + com.google.cloud.migrationcenter.v1.ImportRowErrorOrBuilder>( + rowErrors_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + rowErrors_ = null; + } + return rowErrorsBuilder_; + } + + private boolean partialReport_; + /** + * + * + *
+     * Flag indicating that processing was aborted due to maximum number of
+     * errors.
+     * 
+ * + * bool partial_report = 3; + * + * @return The partialReport. + */ + @java.lang.Override + public boolean getPartialReport() { + return partialReport_; + } + /** + * + * + *
+     * Flag indicating that processing was aborted due to maximum number of
+     * errors.
+     * 
+ * + * bool partial_report = 3; + * + * @param value The partialReport to set. + * @return This builder for chaining. + */ + public Builder setPartialReport(boolean value) { + + partialReport_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Flag indicating that processing was aborted due to maximum number of
+     * errors.
+     * 
+ * + * bool partial_report = 3; + * + * @return This builder for chaining. + */ + public Builder clearPartialReport() { + bitField0_ = (bitField0_ & ~0x00000004); + partialReport_ = false; + onChanged(); + return this; + } + + private java.util.List fileErrors_ = + java.util.Collections.emptyList(); + + private void ensureFileErrorsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + fileErrors_ = + new java.util.ArrayList(fileErrors_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportError, + com.google.cloud.migrationcenter.v1.ImportError.Builder, + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder> + fileErrorsBuilder_; + + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public java.util.List getFileErrorsList() { + if (fileErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fileErrors_); + } else { + return fileErrorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public int getFileErrorsCount() { + if (fileErrorsBuilder_ == null) { + return fileErrors_.size(); + } else { + return fileErrorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public com.google.cloud.migrationcenter.v1.ImportError getFileErrors(int index) { + if (fileErrorsBuilder_ == null) { + return fileErrors_.get(index); + } else { + return fileErrorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public Builder setFileErrors(int index, com.google.cloud.migrationcenter.v1.ImportError value) { + if (fileErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileErrorsIsMutable(); + fileErrors_.set(index, value); + onChanged(); + } else { + fileErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public Builder setFileErrors( + int index, com.google.cloud.migrationcenter.v1.ImportError.Builder builderForValue) { + if (fileErrorsBuilder_ == null) { + ensureFileErrorsIsMutable(); + fileErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + fileErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public Builder addFileErrors(com.google.cloud.migrationcenter.v1.ImportError value) { + if (fileErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileErrorsIsMutable(); + fileErrors_.add(value); + onChanged(); + } else { + fileErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public Builder addFileErrors(int index, com.google.cloud.migrationcenter.v1.ImportError value) { + if (fileErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileErrorsIsMutable(); + fileErrors_.add(index, value); + onChanged(); + } else { + fileErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public Builder addFileErrors( + com.google.cloud.migrationcenter.v1.ImportError.Builder builderForValue) { + if (fileErrorsBuilder_ == null) { + ensureFileErrorsIsMutable(); + fileErrors_.add(builderForValue.build()); + onChanged(); + } else { + fileErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public Builder addFileErrors( + int index, com.google.cloud.migrationcenter.v1.ImportError.Builder builderForValue) { + if (fileErrorsBuilder_ == null) { + ensureFileErrorsIsMutable(); + fileErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + fileErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public Builder addAllFileErrors( + java.lang.Iterable values) { + if (fileErrorsBuilder_ == null) { + ensureFileErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileErrors_); + onChanged(); + } else { + fileErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public Builder clearFileErrors() { + if (fileErrorsBuilder_ == null) { + fileErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + fileErrorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public Builder removeFileErrors(int index) { + if (fileErrorsBuilder_ == null) { + ensureFileErrorsIsMutable(); + fileErrors_.remove(index); + onChanged(); + } else { + fileErrorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public com.google.cloud.migrationcenter.v1.ImportError.Builder getFileErrorsBuilder(int index) { + return getFileErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder getFileErrorsOrBuilder( + int index) { + if (fileErrorsBuilder_ == null) { + return fileErrors_.get(index); + } else { + return fileErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public java.util.List + getFileErrorsOrBuilderList() { + if (fileErrorsBuilder_ != null) { + return fileErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fileErrors_); + } + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public com.google.cloud.migrationcenter.v1.ImportError.Builder addFileErrorsBuilder() { + return getFileErrorsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.ImportError.getDefaultInstance()); + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public com.google.cloud.migrationcenter.v1.ImportError.Builder addFileErrorsBuilder(int index) { + return getFileErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.ImportError.getDefaultInstance()); + } + /** + * + * + *
+     * List of file level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + public java.util.List + getFileErrorsBuilderList() { + return getFileErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportError, + com.google.cloud.migrationcenter.v1.ImportError.Builder, + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder> + getFileErrorsFieldBuilder() { + if (fileErrorsBuilder_ == null) { + fileErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportError, + com.google.cloud.migrationcenter.v1.ImportError.Builder, + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder>( + fileErrors_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + fileErrors_ = null; + } + return fileErrorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.FileValidationReport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.FileValidationReport) + private static final com.google.cloud.migrationcenter.v1.FileValidationReport DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.FileValidationReport(); + } + + public static com.google.cloud.migrationcenter.v1.FileValidationReport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FileValidationReport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FileValidationReport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FileValidationReportOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FileValidationReportOrBuilder.java new file mode 100644 index 000000000000..6efe86227f4c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FileValidationReportOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface FileValidationReportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.FileValidationReport) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the file.
+   * 
+ * + * string file_name = 1; + * + * @return The fileName. + */ + java.lang.String getFileName(); + /** + * + * + *
+   * The name of the file.
+   * 
+ * + * string file_name = 1; + * + * @return The bytes for fileName. + */ + com.google.protobuf.ByteString getFileNameBytes(); + + /** + * + * + *
+   * Partial list of rows that encountered validation error.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + java.util.List getRowErrorsList(); + /** + * + * + *
+   * Partial list of rows that encountered validation error.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + com.google.cloud.migrationcenter.v1.ImportRowError getRowErrors(int index); + /** + * + * + *
+   * Partial list of rows that encountered validation error.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + int getRowErrorsCount(); + /** + * + * + *
+   * Partial list of rows that encountered validation error.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + java.util.List + getRowErrorsOrBuilderList(); + /** + * + * + *
+   * Partial list of rows that encountered validation error.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + com.google.cloud.migrationcenter.v1.ImportRowErrorOrBuilder getRowErrorsOrBuilder(int index); + + /** + * + * + *
+   * Flag indicating that processing was aborted due to maximum number of
+   * errors.
+   * 
+ * + * bool partial_report = 3; + * + * @return The partialReport. + */ + boolean getPartialReport(); + + /** + * + * + *
+   * List of file level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + java.util.List getFileErrorsList(); + /** + * + * + *
+   * List of file level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + com.google.cloud.migrationcenter.v1.ImportError getFileErrors(int index); + /** + * + * + *
+   * List of file level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + int getFileErrorsCount(); + /** + * + * + *
+   * List of file level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + java.util.List + getFileErrorsOrBuilderList(); + /** + * + * + *
+   * List of file level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder getFileErrorsOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FitDescriptor.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FitDescriptor.java new file mode 100644 index 000000000000..9e980c2cb600 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FitDescriptor.java @@ -0,0 +1,779 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Describes the fit level of an asset for migration to a specific target.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.FitDescriptor} + */ +public final class FitDescriptor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.FitDescriptor) + FitDescriptorOrBuilder { + private static final long serialVersionUID = 0L; + // Use FitDescriptor.newBuilder() to construct. + private FitDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FitDescriptor() { + fitLevel_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FitDescriptor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FitDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FitDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.FitDescriptor.class, + com.google.cloud.migrationcenter.v1.FitDescriptor.Builder.class); + } + + /** + * + * + *
+   * Fit level.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.FitDescriptor.FitLevel} + */ + public enum FitLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not enough information.
+     * 
+ * + * FIT_LEVEL_UNSPECIFIED = 0; + */ + FIT_LEVEL_UNSPECIFIED(0), + /** + * + * + *
+     * Fit.
+     * 
+ * + * FIT = 1; + */ + FIT(1), + /** + * + * + *
+     * No Fit.
+     * 
+ * + * NO_FIT = 2; + */ + NO_FIT(2), + /** + * + * + *
+     * Fit with effort.
+     * 
+ * + * REQUIRES_EFFORT = 3; + */ + REQUIRES_EFFORT(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not enough information.
+     * 
+ * + * FIT_LEVEL_UNSPECIFIED = 0; + */ + public static final int FIT_LEVEL_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Fit.
+     * 
+ * + * FIT = 1; + */ + public static final int FIT_VALUE = 1; + /** + * + * + *
+     * No Fit.
+     * 
+ * + * NO_FIT = 2; + */ + public static final int NO_FIT_VALUE = 2; + /** + * + * + *
+     * Fit with effort.
+     * 
+ * + * REQUIRES_EFFORT = 3; + */ + public static final int REQUIRES_EFFORT_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FitLevel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FitLevel forNumber(int value) { + switch (value) { + case 0: + return FIT_LEVEL_UNSPECIFIED; + case 1: + return FIT; + case 2: + return NO_FIT; + case 3: + return REQUIRES_EFFORT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FitLevel findValueByNumber(int number) { + return FitLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.FitDescriptor.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FitLevel[] VALUES = values(); + + public static FitLevel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FitLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.FitDescriptor.FitLevel) + } + + public static final int FIT_LEVEL_FIELD_NUMBER = 1; + private int fitLevel_ = 0; + /** + * + * + *
+   * Fit level.
+   * 
+ * + * .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + * + * @return The enum numeric value on the wire for fitLevel. + */ + @java.lang.Override + public int getFitLevelValue() { + return fitLevel_; + } + /** + * + * + *
+   * Fit level.
+   * 
+ * + * .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + * + * @return The fitLevel. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel getFitLevel() { + com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel result = + com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel.forNumber(fitLevel_); + return result == null + ? com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (fitLevel_ + != com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel.FIT_LEVEL_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, fitLevel_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fitLevel_ + != com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel.FIT_LEVEL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, fitLevel_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.FitDescriptor)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.FitDescriptor other = + (com.google.cloud.migrationcenter.v1.FitDescriptor) obj; + + if (fitLevel_ != other.fitLevel_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIT_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + fitLevel_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.FitDescriptor prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes the fit level of an asset for migration to a specific target.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.FitDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.FitDescriptor) + com.google.cloud.migrationcenter.v1.FitDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FitDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FitDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.FitDescriptor.class, + com.google.cloud.migrationcenter.v1.FitDescriptor.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.FitDescriptor.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fitLevel_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FitDescriptor_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FitDescriptor getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.FitDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FitDescriptor build() { + com.google.cloud.migrationcenter.v1.FitDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FitDescriptor buildPartial() { + com.google.cloud.migrationcenter.v1.FitDescriptor result = + new com.google.cloud.migrationcenter.v1.FitDescriptor(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.FitDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fitLevel_ = fitLevel_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.FitDescriptor) { + return mergeFrom((com.google.cloud.migrationcenter.v1.FitDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.FitDescriptor other) { + if (other == com.google.cloud.migrationcenter.v1.FitDescriptor.getDefaultInstance()) + return this; + if (other.fitLevel_ != 0) { + setFitLevelValue(other.getFitLevelValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + fitLevel_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int fitLevel_ = 0; + /** + * + * + *
+     * Fit level.
+     * 
+ * + * .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + * + * @return The enum numeric value on the wire for fitLevel. + */ + @java.lang.Override + public int getFitLevelValue() { + return fitLevel_; + } + /** + * + * + *
+     * Fit level.
+     * 
+ * + * .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + * + * @param value The enum numeric value on the wire for fitLevel to set. + * @return This builder for chaining. + */ + public Builder setFitLevelValue(int value) { + fitLevel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Fit level.
+     * 
+ * + * .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + * + * @return The fitLevel. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel getFitLevel() { + com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel result = + com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel.forNumber(fitLevel_); + return result == null + ? com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Fit level.
+     * 
+ * + * .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + * + * @param value The fitLevel to set. + * @return This builder for chaining. + */ + public Builder setFitLevel(com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fitLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Fit level.
+     * 
+ * + * .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + * + * @return This builder for chaining. + */ + public Builder clearFitLevel() { + bitField0_ = (bitField0_ & ~0x00000001); + fitLevel_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.FitDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.FitDescriptor) + private static final com.google.cloud.migrationcenter.v1.FitDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.FitDescriptor(); + } + + public static com.google.cloud.migrationcenter.v1.FitDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FitDescriptor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FitDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FitDescriptorOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FitDescriptorOrBuilder.java new file mode 100644 index 000000000000..f5479068f4aa --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FitDescriptorOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface FitDescriptorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.FitDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Fit level.
+   * 
+ * + * .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + * + * @return The enum numeric value on the wire for fitLevel. + */ + int getFitLevelValue(); + /** + * + * + *
+   * Fit level.
+   * 
+ * + * .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + * + * @return The fitLevel. + */ + com.google.cloud.migrationcenter.v1.FitDescriptor.FitLevel getFitLevel(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FrameViolationEntry.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FrameViolationEntry.java new file mode 100644 index 000000000000..47a41934987e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FrameViolationEntry.java @@ -0,0 +1,809 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A resource that contains a single violation of a reported `AssetFrame`
+ * resource.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.FrameViolationEntry} + */ +public final class FrameViolationEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.FrameViolationEntry) + FrameViolationEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use FrameViolationEntry.newBuilder() to construct. + private FrameViolationEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FrameViolationEntry() { + field_ = ""; + violation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FrameViolationEntry(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FrameViolationEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FrameViolationEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.FrameViolationEntry.class, + com.google.cloud.migrationcenter.v1.FrameViolationEntry.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object field_ = ""; + /** + * + * + *
+   * The field of the original frame where the violation occurred.
+   * 
+ * + * string field = 1; + * + * @return The field. + */ + @java.lang.Override + public java.lang.String getField() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } + } + /** + * + * + *
+   * The field of the original frame where the violation occurred.
+   * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIOLATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object violation_ = ""; + /** + * + * + *
+   * A message describing the violation.
+   * 
+ * + * string violation = 2; + * + * @return The violation. + */ + @java.lang.Override + public java.lang.String getViolation() { + java.lang.Object ref = violation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + violation_ = s; + return s; + } + } + /** + * + * + *
+   * A message describing the violation.
+   * 
+ * + * string violation = 2; + * + * @return The bytes for violation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getViolationBytes() { + java.lang.Object ref = violation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + violation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(violation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, violation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(violation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, violation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.FrameViolationEntry)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.FrameViolationEntry other = + (com.google.cloud.migrationcenter.v1.FrameViolationEntry) obj; + + if (!getField().equals(other.getField())) return false; + if (!getViolation().equals(other.getViolation())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + hash = (37 * hash) + VIOLATION_FIELD_NUMBER; + hash = (53 * hash) + getViolation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.FrameViolationEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that contains a single violation of a reported `AssetFrame`
+   * resource.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.FrameViolationEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.FrameViolationEntry) + com.google.cloud.migrationcenter.v1.FrameViolationEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FrameViolationEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FrameViolationEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.FrameViolationEntry.class, + com.google.cloud.migrationcenter.v1.FrameViolationEntry.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.FrameViolationEntry.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + field_ = ""; + violation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FrameViolationEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FrameViolationEntry getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.FrameViolationEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FrameViolationEntry build() { + com.google.cloud.migrationcenter.v1.FrameViolationEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FrameViolationEntry buildPartial() { + com.google.cloud.migrationcenter.v1.FrameViolationEntry result = + new com.google.cloud.migrationcenter.v1.FrameViolationEntry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.FrameViolationEntry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.field_ = field_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.violation_ = violation_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.FrameViolationEntry) { + return mergeFrom((com.google.cloud.migrationcenter.v1.FrameViolationEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.FrameViolationEntry other) { + if (other == com.google.cloud.migrationcenter.v1.FrameViolationEntry.getDefaultInstance()) + return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getViolation().isEmpty()) { + violation_ = other.violation_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + field_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + violation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object field_ = ""; + /** + * + * + *
+     * The field of the original frame where the violation occurred.
+     * 
+ * + * string field = 1; + * + * @return The field. + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The field of the original frame where the violation occurred.
+     * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The field of the original frame where the violation occurred.
+     * 
+ * + * string field = 1; + * + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The field of the original frame where the violation occurred.
+     * 
+ * + * string field = 1; + * + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = getDefaultInstance().getField(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The field of the original frame where the violation occurred.
+     * 
+ * + * string field = 1; + * + * @param value The bytes for field to set. + * @return This builder for chaining. + */ + public Builder setFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object violation_ = ""; + /** + * + * + *
+     * A message describing the violation.
+     * 
+ * + * string violation = 2; + * + * @return The violation. + */ + public java.lang.String getViolation() { + java.lang.Object ref = violation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + violation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A message describing the violation.
+     * 
+ * + * string violation = 2; + * + * @return The bytes for violation. + */ + public com.google.protobuf.ByteString getViolationBytes() { + java.lang.Object ref = violation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + violation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A message describing the violation.
+     * 
+ * + * string violation = 2; + * + * @param value The violation to set. + * @return This builder for chaining. + */ + public Builder setViolation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + violation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A message describing the violation.
+     * 
+ * + * string violation = 2; + * + * @return This builder for chaining. + */ + public Builder clearViolation() { + violation_ = getDefaultInstance().getViolation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A message describing the violation.
+     * 
+ * + * string violation = 2; + * + * @param value The bytes for violation to set. + * @return This builder for chaining. + */ + public Builder setViolationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + violation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.FrameViolationEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.FrameViolationEntry) + private static final com.google.cloud.migrationcenter.v1.FrameViolationEntry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.FrameViolationEntry(); + } + + public static com.google.cloud.migrationcenter.v1.FrameViolationEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FrameViolationEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FrameViolationEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FrameViolationEntryOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FrameViolationEntryOrBuilder.java new file mode 100644 index 000000000000..632f5d65bd05 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FrameViolationEntryOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface FrameViolationEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.FrameViolationEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The field of the original frame where the violation occurred.
+   * 
+ * + * string field = 1; + * + * @return The field. + */ + java.lang.String getField(); + /** + * + * + *
+   * The field of the original frame where the violation occurred.
+   * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + com.google.protobuf.ByteString getFieldBytes(); + + /** + * + * + *
+   * A message describing the violation.
+   * 
+ * + * string violation = 2; + * + * @return The violation. + */ + java.lang.String getViolation(); + /** + * + * + *
+   * A message describing the violation.
+   * 
+ * + * string violation = 2; + * + * @return The bytes for violation. + */ + com.google.protobuf.ByteString getViolationBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Frames.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Frames.java new file mode 100644 index 000000000000..8e035e6bf47a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Frames.java @@ -0,0 +1,936 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Collection of frame data.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Frames} + */ +public final class Frames extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Frames) + FramesOrBuilder { + private static final long serialVersionUID = 0L; + // Use Frames.newBuilder() to construct. + private Frames(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Frames() { + framesData_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Frames(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Frames_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Frames_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Frames.class, + com.google.cloud.migrationcenter.v1.Frames.Builder.class); + } + + public static final int FRAMES_DATA_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List framesData_; + /** + * + * + *
+   * A repeated field of asset data.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + @java.lang.Override + public java.util.List getFramesDataList() { + return framesData_; + } + /** + * + * + *
+   * A repeated field of asset data.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + @java.lang.Override + public java.util.List + getFramesDataOrBuilderList() { + return framesData_; + } + /** + * + * + *
+   * A repeated field of asset data.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + @java.lang.Override + public int getFramesDataCount() { + return framesData_.size(); + } + /** + * + * + *
+   * A repeated field of asset data.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetFrame getFramesData(int index) { + return framesData_.get(index); + } + /** + * + * + *
+   * A repeated field of asset data.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder getFramesDataOrBuilder(int index) { + return framesData_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < framesData_.size(); i++) { + output.writeMessage(1, framesData_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < framesData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, framesData_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Frames)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Frames other = + (com.google.cloud.migrationcenter.v1.Frames) obj; + + if (!getFramesDataList().equals(other.getFramesDataList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFramesDataCount() > 0) { + hash = (37 * hash) + FRAMES_DATA_FIELD_NUMBER; + hash = (53 * hash) + getFramesDataList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Frames parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Frames parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Frames parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Frames parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Frames parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Frames parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Frames parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Frames parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Frames parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Frames parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Frames parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Frames parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.Frames prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Collection of frame data.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Frames} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Frames) + com.google.cloud.migrationcenter.v1.FramesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Frames_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Frames_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Frames.class, + com.google.cloud.migrationcenter.v1.Frames.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Frames.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (framesDataBuilder_ == null) { + framesData_ = java.util.Collections.emptyList(); + } else { + framesData_ = null; + framesDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Frames_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Frames getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Frames.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Frames build() { + com.google.cloud.migrationcenter.v1.Frames result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Frames buildPartial() { + com.google.cloud.migrationcenter.v1.Frames result = + new com.google.cloud.migrationcenter.v1.Frames(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.migrationcenter.v1.Frames result) { + if (framesDataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + framesData_ = java.util.Collections.unmodifiableList(framesData_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.framesData_ = framesData_; + } else { + result.framesData_ = framesDataBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.Frames result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Frames) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Frames) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Frames other) { + if (other == com.google.cloud.migrationcenter.v1.Frames.getDefaultInstance()) return this; + if (framesDataBuilder_ == null) { + if (!other.framesData_.isEmpty()) { + if (framesData_.isEmpty()) { + framesData_ = other.framesData_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFramesDataIsMutable(); + framesData_.addAll(other.framesData_); + } + onChanged(); + } + } else { + if (!other.framesData_.isEmpty()) { + if (framesDataBuilder_.isEmpty()) { + framesDataBuilder_.dispose(); + framesDataBuilder_ = null; + framesData_ = other.framesData_; + bitField0_ = (bitField0_ & ~0x00000001); + framesDataBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFramesDataFieldBuilder() + : null; + } else { + framesDataBuilder_.addAllMessages(other.framesData_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.AssetFrame m = + input.readMessage( + com.google.cloud.migrationcenter.v1.AssetFrame.parser(), extensionRegistry); + if (framesDataBuilder_ == null) { + ensureFramesDataIsMutable(); + framesData_.add(m); + } else { + framesDataBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List framesData_ = + java.util.Collections.emptyList(); + + private void ensureFramesDataIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + framesData_ = + new java.util.ArrayList(framesData_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetFrame, + com.google.cloud.migrationcenter.v1.AssetFrame.Builder, + com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder> + framesDataBuilder_; + + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public java.util.List getFramesDataList() { + if (framesDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(framesData_); + } else { + return framesDataBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public int getFramesDataCount() { + if (framesDataBuilder_ == null) { + return framesData_.size(); + } else { + return framesDataBuilder_.getCount(); + } + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public com.google.cloud.migrationcenter.v1.AssetFrame getFramesData(int index) { + if (framesDataBuilder_ == null) { + return framesData_.get(index); + } else { + return framesDataBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public Builder setFramesData(int index, com.google.cloud.migrationcenter.v1.AssetFrame value) { + if (framesDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesDataIsMutable(); + framesData_.set(index, value); + onChanged(); + } else { + framesDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public Builder setFramesData( + int index, com.google.cloud.migrationcenter.v1.AssetFrame.Builder builderForValue) { + if (framesDataBuilder_ == null) { + ensureFramesDataIsMutable(); + framesData_.set(index, builderForValue.build()); + onChanged(); + } else { + framesDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public Builder addFramesData(com.google.cloud.migrationcenter.v1.AssetFrame value) { + if (framesDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesDataIsMutable(); + framesData_.add(value); + onChanged(); + } else { + framesDataBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public Builder addFramesData(int index, com.google.cloud.migrationcenter.v1.AssetFrame value) { + if (framesDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFramesDataIsMutable(); + framesData_.add(index, value); + onChanged(); + } else { + framesDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public Builder addFramesData( + com.google.cloud.migrationcenter.v1.AssetFrame.Builder builderForValue) { + if (framesDataBuilder_ == null) { + ensureFramesDataIsMutable(); + framesData_.add(builderForValue.build()); + onChanged(); + } else { + framesDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public Builder addFramesData( + int index, com.google.cloud.migrationcenter.v1.AssetFrame.Builder builderForValue) { + if (framesDataBuilder_ == null) { + ensureFramesDataIsMutable(); + framesData_.add(index, builderForValue.build()); + onChanged(); + } else { + framesDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public Builder addAllFramesData( + java.lang.Iterable values) { + if (framesDataBuilder_ == null) { + ensureFramesDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, framesData_); + onChanged(); + } else { + framesDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public Builder clearFramesData() { + if (framesDataBuilder_ == null) { + framesData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + framesDataBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public Builder removeFramesData(int index) { + if (framesDataBuilder_ == null) { + ensureFramesDataIsMutable(); + framesData_.remove(index); + onChanged(); + } else { + framesDataBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public com.google.cloud.migrationcenter.v1.AssetFrame.Builder getFramesDataBuilder(int index) { + return getFramesDataFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder getFramesDataOrBuilder( + int index) { + if (framesDataBuilder_ == null) { + return framesData_.get(index); + } else { + return framesDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public java.util.List + getFramesDataOrBuilderList() { + if (framesDataBuilder_ != null) { + return framesDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(framesData_); + } + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public com.google.cloud.migrationcenter.v1.AssetFrame.Builder addFramesDataBuilder() { + return getFramesDataFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.AssetFrame.getDefaultInstance()); + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public com.google.cloud.migrationcenter.v1.AssetFrame.Builder addFramesDataBuilder(int index) { + return getFramesDataFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.AssetFrame.getDefaultInstance()); + } + /** + * + * + *
+     * A repeated field of asset data.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + public java.util.List + getFramesDataBuilderList() { + return getFramesDataFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetFrame, + com.google.cloud.migrationcenter.v1.AssetFrame.Builder, + com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder> + getFramesDataFieldBuilder() { + if (framesDataBuilder_ == null) { + framesDataBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetFrame, + com.google.cloud.migrationcenter.v1.AssetFrame.Builder, + com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder>( + framesData_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + framesData_ = null; + } + return framesDataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Frames) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Frames) + private static final com.google.cloud.migrationcenter.v1.Frames DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Frames(); + } + + public static com.google.cloud.migrationcenter.v1.Frames getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Frames parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Frames getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FramesOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FramesOrBuilder.java new file mode 100644 index 000000000000..d83fa7e627d8 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FramesOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface FramesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Frames) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A repeated field of asset data.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + java.util.List getFramesDataList(); + /** + * + * + *
+   * A repeated field of asset data.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + com.google.cloud.migrationcenter.v1.AssetFrame getFramesData(int index); + /** + * + * + *
+   * A repeated field of asset data.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + int getFramesDataCount(); + /** + * + * + *
+   * A repeated field of asset data.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + java.util.List + getFramesDataOrBuilderList(); + /** + * + * + *
+   * A repeated field of asset data.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + com.google.cloud.migrationcenter.v1.AssetFrameOrBuilder getFramesDataOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntry.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntry.java new file mode 100644 index 000000000000..48ad451cb56a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntry.java @@ -0,0 +1,1359 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Single fstab entry.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.FstabEntry} + */ +public final class FstabEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.FstabEntry) + FstabEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use FstabEntry.newBuilder() to construct. + private FstabEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FstabEntry() { + spec_ = ""; + file_ = ""; + vfstype_ = ""; + mntops_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FstabEntry(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FstabEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FstabEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.FstabEntry.class, + com.google.cloud.migrationcenter.v1.FstabEntry.Builder.class); + } + + public static final int SPEC_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object spec_ = ""; + /** + * + * + *
+   * The block special device or remote filesystem to be mounted.
+   * 
+ * + * string spec = 1; + * + * @return The spec. + */ + @java.lang.Override + public java.lang.String getSpec() { + java.lang.Object ref = spec_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spec_ = s; + return s; + } + } + /** + * + * + *
+   * The block special device or remote filesystem to be mounted.
+   * 
+ * + * string spec = 1; + * + * @return The bytes for spec. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpecBytes() { + java.lang.Object ref = spec_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spec_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object file_ = ""; + /** + * + * + *
+   * The mount point for the filesystem.
+   * 
+ * + * string file = 2; + * + * @return The file. + */ + @java.lang.Override + public java.lang.String getFile() { + java.lang.Object ref = file_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + file_ = s; + return s; + } + } + /** + * + * + *
+   * The mount point for the filesystem.
+   * 
+ * + * string file = 2; + * + * @return The bytes for file. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFileBytes() { + java.lang.Object ref = file_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + file_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VFSTYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object vfstype_ = ""; + /** + * + * + *
+   * The type of the filesystem.
+   * 
+ * + * string vfstype = 3; + * + * @return The vfstype. + */ + @java.lang.Override + public java.lang.String getVfstype() { + java.lang.Object ref = vfstype_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vfstype_ = s; + return s; + } + } + /** + * + * + *
+   * The type of the filesystem.
+   * 
+ * + * string vfstype = 3; + * + * @return The bytes for vfstype. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVfstypeBytes() { + java.lang.Object ref = vfstype_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vfstype_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MNTOPS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object mntops_ = ""; + /** + * + * + *
+   * Mount options associated with the filesystem.
+   * 
+ * + * string mntops = 4; + * + * @return The mntops. + */ + @java.lang.Override + public java.lang.String getMntops() { + java.lang.Object ref = mntops_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mntops_ = s; + return s; + } + } + /** + * + * + *
+   * Mount options associated with the filesystem.
+   * 
+ * + * string mntops = 4; + * + * @return The bytes for mntops. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMntopsBytes() { + java.lang.Object ref = mntops_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mntops_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FREQ_FIELD_NUMBER = 5; + private int freq_ = 0; + /** + * + * + *
+   * Used by dump to determine which filesystems need to be dumped.
+   * 
+ * + * int32 freq = 5; + * + * @return The freq. + */ + @java.lang.Override + public int getFreq() { + return freq_; + } + + public static final int PASSNO_FIELD_NUMBER = 6; + private int passno_ = 0; + /** + * + * + *
+   * Used by the fsck(8) program to determine the order in which filesystem
+   * checks are done at reboot time.
+   * 
+ * + * int32 passno = 6; + * + * @return The passno. + */ + @java.lang.Override + public int getPassno() { + return passno_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(spec_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, spec_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(file_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, file_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vfstype_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, vfstype_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mntops_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mntops_); + } + if (freq_ != 0) { + output.writeInt32(5, freq_); + } + if (passno_ != 0) { + output.writeInt32(6, passno_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(spec_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, spec_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(file_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, file_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vfstype_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, vfstype_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mntops_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mntops_); + } + if (freq_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, freq_); + } + if (passno_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, passno_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.FstabEntry)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.FstabEntry other = + (com.google.cloud.migrationcenter.v1.FstabEntry) obj; + + if (!getSpec().equals(other.getSpec())) return false; + if (!getFile().equals(other.getFile())) return false; + if (!getVfstype().equals(other.getVfstype())) return false; + if (!getMntops().equals(other.getMntops())) return false; + if (getFreq() != other.getFreq()) return false; + if (getPassno() != other.getPassno()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSpec().hashCode(); + hash = (37 * hash) + FILE_FIELD_NUMBER; + hash = (53 * hash) + getFile().hashCode(); + hash = (37 * hash) + VFSTYPE_FIELD_NUMBER; + hash = (53 * hash) + getVfstype().hashCode(); + hash = (37 * hash) + MNTOPS_FIELD_NUMBER; + hash = (53 * hash) + getMntops().hashCode(); + hash = (37 * hash) + FREQ_FIELD_NUMBER; + hash = (53 * hash) + getFreq(); + hash = (37 * hash) + PASSNO_FIELD_NUMBER; + hash = (53 * hash) + getPassno(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.FstabEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Single fstab entry.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.FstabEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.FstabEntry) + com.google.cloud.migrationcenter.v1.FstabEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FstabEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FstabEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.FstabEntry.class, + com.google.cloud.migrationcenter.v1.FstabEntry.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.FstabEntry.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + spec_ = ""; + file_ = ""; + vfstype_ = ""; + mntops_ = ""; + freq_ = 0; + passno_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FstabEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntry getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.FstabEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntry build() { + com.google.cloud.migrationcenter.v1.FstabEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntry buildPartial() { + com.google.cloud.migrationcenter.v1.FstabEntry result = + new com.google.cloud.migrationcenter.v1.FstabEntry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.FstabEntry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.spec_ = spec_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.file_ = file_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vfstype_ = vfstype_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mntops_ = mntops_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.freq_ = freq_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.passno_ = passno_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.FstabEntry) { + return mergeFrom((com.google.cloud.migrationcenter.v1.FstabEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.FstabEntry other) { + if (other == com.google.cloud.migrationcenter.v1.FstabEntry.getDefaultInstance()) return this; + if (!other.getSpec().isEmpty()) { + spec_ = other.spec_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFile().isEmpty()) { + file_ = other.file_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getVfstype().isEmpty()) { + vfstype_ = other.vfstype_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getMntops().isEmpty()) { + mntops_ = other.mntops_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getFreq() != 0) { + setFreq(other.getFreq()); + } + if (other.getPassno() != 0) { + setPassno(other.getPassno()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + spec_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + file_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + vfstype_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + mntops_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + freq_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + passno_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object spec_ = ""; + /** + * + * + *
+     * The block special device or remote filesystem to be mounted.
+     * 
+ * + * string spec = 1; + * + * @return The spec. + */ + public java.lang.String getSpec() { + java.lang.Object ref = spec_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spec_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The block special device or remote filesystem to be mounted.
+     * 
+ * + * string spec = 1; + * + * @return The bytes for spec. + */ + public com.google.protobuf.ByteString getSpecBytes() { + java.lang.Object ref = spec_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spec_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The block special device or remote filesystem to be mounted.
+     * 
+ * + * string spec = 1; + * + * @param value The spec to set. + * @return This builder for chaining. + */ + public Builder setSpec(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spec_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The block special device or remote filesystem to be mounted.
+     * 
+ * + * string spec = 1; + * + * @return This builder for chaining. + */ + public Builder clearSpec() { + spec_ = getDefaultInstance().getSpec(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The block special device or remote filesystem to be mounted.
+     * 
+ * + * string spec = 1; + * + * @param value The bytes for spec to set. + * @return This builder for chaining. + */ + public Builder setSpecBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spec_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object file_ = ""; + /** + * + * + *
+     * The mount point for the filesystem.
+     * 
+ * + * string file = 2; + * + * @return The file. + */ + public java.lang.String getFile() { + java.lang.Object ref = file_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + file_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The mount point for the filesystem.
+     * 
+ * + * string file = 2; + * + * @return The bytes for file. + */ + public com.google.protobuf.ByteString getFileBytes() { + java.lang.Object ref = file_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + file_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The mount point for the filesystem.
+     * 
+ * + * string file = 2; + * + * @param value The file to set. + * @return This builder for chaining. + */ + public Builder setFile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + file_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The mount point for the filesystem.
+     * 
+ * + * string file = 2; + * + * @return This builder for chaining. + */ + public Builder clearFile() { + file_ = getDefaultInstance().getFile(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The mount point for the filesystem.
+     * 
+ * + * string file = 2; + * + * @param value The bytes for file to set. + * @return This builder for chaining. + */ + public Builder setFileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + file_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object vfstype_ = ""; + /** + * + * + *
+     * The type of the filesystem.
+     * 
+ * + * string vfstype = 3; + * + * @return The vfstype. + */ + public java.lang.String getVfstype() { + java.lang.Object ref = vfstype_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vfstype_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The type of the filesystem.
+     * 
+ * + * string vfstype = 3; + * + * @return The bytes for vfstype. + */ + public com.google.protobuf.ByteString getVfstypeBytes() { + java.lang.Object ref = vfstype_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vfstype_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The type of the filesystem.
+     * 
+ * + * string vfstype = 3; + * + * @param value The vfstype to set. + * @return This builder for chaining. + */ + public Builder setVfstype(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vfstype_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the filesystem.
+     * 
+ * + * string vfstype = 3; + * + * @return This builder for chaining. + */ + public Builder clearVfstype() { + vfstype_ = getDefaultInstance().getVfstype(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the filesystem.
+     * 
+ * + * string vfstype = 3; + * + * @param value The bytes for vfstype to set. + * @return This builder for chaining. + */ + public Builder setVfstypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vfstype_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object mntops_ = ""; + /** + * + * + *
+     * Mount options associated with the filesystem.
+     * 
+ * + * string mntops = 4; + * + * @return The mntops. + */ + public java.lang.String getMntops() { + java.lang.Object ref = mntops_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mntops_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Mount options associated with the filesystem.
+     * 
+ * + * string mntops = 4; + * + * @return The bytes for mntops. + */ + public com.google.protobuf.ByteString getMntopsBytes() { + java.lang.Object ref = mntops_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mntops_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Mount options associated with the filesystem.
+     * 
+ * + * string mntops = 4; + * + * @param value The mntops to set. + * @return This builder for chaining. + */ + public Builder setMntops(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mntops_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Mount options associated with the filesystem.
+     * 
+ * + * string mntops = 4; + * + * @return This builder for chaining. + */ + public Builder clearMntops() { + mntops_ = getDefaultInstance().getMntops(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Mount options associated with the filesystem.
+     * 
+ * + * string mntops = 4; + * + * @param value The bytes for mntops to set. + * @return This builder for chaining. + */ + public Builder setMntopsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mntops_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int freq_; + /** + * + * + *
+     * Used by dump to determine which filesystems need to be dumped.
+     * 
+ * + * int32 freq = 5; + * + * @return The freq. + */ + @java.lang.Override + public int getFreq() { + return freq_; + } + /** + * + * + *
+     * Used by dump to determine which filesystems need to be dumped.
+     * 
+ * + * int32 freq = 5; + * + * @param value The freq to set. + * @return This builder for chaining. + */ + public Builder setFreq(int value) { + + freq_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Used by dump to determine which filesystems need to be dumped.
+     * 
+ * + * int32 freq = 5; + * + * @return This builder for chaining. + */ + public Builder clearFreq() { + bitField0_ = (bitField0_ & ~0x00000010); + freq_ = 0; + onChanged(); + return this; + } + + private int passno_; + /** + * + * + *
+     * Used by the fsck(8) program to determine the order in which filesystem
+     * checks are done at reboot time.
+     * 
+ * + * int32 passno = 6; + * + * @return The passno. + */ + @java.lang.Override + public int getPassno() { + return passno_; + } + /** + * + * + *
+     * Used by the fsck(8) program to determine the order in which filesystem
+     * checks are done at reboot time.
+     * 
+ * + * int32 passno = 6; + * + * @param value The passno to set. + * @return This builder for chaining. + */ + public Builder setPassno(int value) { + + passno_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Used by the fsck(8) program to determine the order in which filesystem
+     * checks are done at reboot time.
+     * 
+ * + * int32 passno = 6; + * + * @return This builder for chaining. + */ + public Builder clearPassno() { + bitField0_ = (bitField0_ & ~0x00000020); + passno_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.FstabEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.FstabEntry) + private static final com.google.cloud.migrationcenter.v1.FstabEntry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.FstabEntry(); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FstabEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryList.java new file mode 100644 index 000000000000..010e987312b5 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryList.java @@ -0,0 +1,937 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Fstab content.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.FstabEntryList} + */ +public final class FstabEntryList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.FstabEntryList) + FstabEntryListOrBuilder { + private static final long serialVersionUID = 0L; + // Use FstabEntryList.newBuilder() to construct. + private FstabEntryList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FstabEntryList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FstabEntryList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FstabEntryList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FstabEntryList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.FstabEntryList.class, + com.google.cloud.migrationcenter.v1.FstabEntryList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * Fstab entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Fstab entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Fstab entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Fstab entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntry getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Fstab entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntryOrBuilder getEntriesOrBuilder(int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.FstabEntryList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.FstabEntryList other = + (com.google.cloud.migrationcenter.v1.FstabEntryList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.FstabEntryList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Fstab content.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.FstabEntryList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.FstabEntryList) + com.google.cloud.migrationcenter.v1.FstabEntryListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FstabEntryList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FstabEntryList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.FstabEntryList.class, + com.google.cloud.migrationcenter.v1.FstabEntryList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.FstabEntryList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_FstabEntryList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntryList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.FstabEntryList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntryList build() { + com.google.cloud.migrationcenter.v1.FstabEntryList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntryList buildPartial() { + com.google.cloud.migrationcenter.v1.FstabEntryList result = + new com.google.cloud.migrationcenter.v1.FstabEntryList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.FstabEntryList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.FstabEntryList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.FstabEntryList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.FstabEntryList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.FstabEntryList other) { + if (other == com.google.cloud.migrationcenter.v1.FstabEntryList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.FstabEntry m = + input.readMessage( + com.google.cloud.migrationcenter.v1.FstabEntry.parser(), extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FstabEntry, + com.google.cloud.migrationcenter.v1.FstabEntry.Builder, + com.google.cloud.migrationcenter.v1.FstabEntryOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.FstabEntry getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public Builder setEntries(int index, com.google.cloud.migrationcenter.v1.FstabEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.FstabEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.FstabEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public Builder addEntries(int index, com.google.cloud.migrationcenter.v1.FstabEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.FstabEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.FstabEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.FstabEntry.Builder getEntriesBuilder(int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.FstabEntryOrBuilder getEntriesOrBuilder(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.FstabEntry.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.FstabEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.FstabEntry.Builder addEntriesBuilder(int index) { + return getEntriesFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.FstabEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Fstab entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FstabEntry, + com.google.cloud.migrationcenter.v1.FstabEntry.Builder, + com.google.cloud.migrationcenter.v1.FstabEntryOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FstabEntry, + com.google.cloud.migrationcenter.v1.FstabEntry.Builder, + com.google.cloud.migrationcenter.v1.FstabEntryOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.FstabEntryList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.FstabEntryList) + private static final com.google.cloud.migrationcenter.v1.FstabEntryList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.FstabEntryList(); + } + + public static com.google.cloud.migrationcenter.v1.FstabEntryList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FstabEntryList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntryList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryListOrBuilder.java new file mode 100644 index 000000000000..43637f04e3bf --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface FstabEntryListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.FstabEntryList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Fstab entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Fstab entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + com.google.cloud.migrationcenter.v1.FstabEntry getEntries(int index); + /** + * + * + *
+   * Fstab entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Fstab entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Fstab entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + com.google.cloud.migrationcenter.v1.FstabEntryOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryOrBuilder.java new file mode 100644 index 000000000000..54fa46303cce --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/FstabEntryOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface FstabEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.FstabEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The block special device or remote filesystem to be mounted.
+   * 
+ * + * string spec = 1; + * + * @return The spec. + */ + java.lang.String getSpec(); + /** + * + * + *
+   * The block special device or remote filesystem to be mounted.
+   * 
+ * + * string spec = 1; + * + * @return The bytes for spec. + */ + com.google.protobuf.ByteString getSpecBytes(); + + /** + * + * + *
+   * The mount point for the filesystem.
+   * 
+ * + * string file = 2; + * + * @return The file. + */ + java.lang.String getFile(); + /** + * + * + *
+   * The mount point for the filesystem.
+   * 
+ * + * string file = 2; + * + * @return The bytes for file. + */ + com.google.protobuf.ByteString getFileBytes(); + + /** + * + * + *
+   * The type of the filesystem.
+   * 
+ * + * string vfstype = 3; + * + * @return The vfstype. + */ + java.lang.String getVfstype(); + /** + * + * + *
+   * The type of the filesystem.
+   * 
+ * + * string vfstype = 3; + * + * @return The bytes for vfstype. + */ + com.google.protobuf.ByteString getVfstypeBytes(); + + /** + * + * + *
+   * Mount options associated with the filesystem.
+   * 
+ * + * string mntops = 4; + * + * @return The mntops. + */ + java.lang.String getMntops(); + /** + * + * + *
+   * Mount options associated with the filesystem.
+   * 
+ * + * string mntops = 4; + * + * @return The bytes for mntops. + */ + com.google.protobuf.ByteString getMntopsBytes(); + + /** + * + * + *
+   * Used by dump to determine which filesystems need to be dumped.
+   * 
+ * + * int32 freq = 5; + * + * @return The freq. + */ + int getFreq(); + + /** + * + * + *
+   * Used by the fsck(8) program to determine the order in which filesystem
+   * checks are done at reboot time.
+   * 
+ * + * int32 passno = 6; + * + * @return The passno. + */ + int getPassno(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GenericPlatformDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GenericPlatformDetails.java new file mode 100644 index 000000000000..d76efddfa34a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GenericPlatformDetails.java @@ -0,0 +1,639 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Generic platform details.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GenericPlatformDetails} + */ +public final class GenericPlatformDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GenericPlatformDetails) + GenericPlatformDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenericPlatformDetails.newBuilder() to construct. + private GenericPlatformDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenericPlatformDetails() { + location_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenericPlatformDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GenericPlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GenericPlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GenericPlatformDetails.class, + com.google.cloud.migrationcenter.v1.GenericPlatformDetails.Builder.class); + } + + public static final int LOCATION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + /** + * + * + *
+   * Free text representation of the machine location.
+   * The format of this field should not be relied on. Different VMs in the same
+   * location may have different string values for this field.
+   * 
+ * + * string location = 1; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * Free text representation of the machine location.
+   * The format of this field should not be relied on. Different VMs in the same
+   * location may have different string values for this field.
+   * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GenericPlatformDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GenericPlatformDetails other = + (com.google.cloud.migrationcenter.v1.GenericPlatformDetails) obj; + + if (!getLocation().equals(other.getLocation())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.GenericPlatformDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Generic platform details.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GenericPlatformDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GenericPlatformDetails) + com.google.cloud.migrationcenter.v1.GenericPlatformDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GenericPlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GenericPlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GenericPlatformDetails.class, + com.google.cloud.migrationcenter.v1.GenericPlatformDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GenericPlatformDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + location_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GenericPlatformDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GenericPlatformDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GenericPlatformDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GenericPlatformDetails build() { + com.google.cloud.migrationcenter.v1.GenericPlatformDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GenericPlatformDetails buildPartial() { + com.google.cloud.migrationcenter.v1.GenericPlatformDetails result = + new com.google.cloud.migrationcenter.v1.GenericPlatformDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GenericPlatformDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.location_ = location_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GenericPlatformDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GenericPlatformDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GenericPlatformDetails other) { + if (other == com.google.cloud.migrationcenter.v1.GenericPlatformDetails.getDefaultInstance()) + return this; + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * Free text representation of the machine location.
+     * The format of this field should not be relied on. Different VMs in the same
+     * location may have different string values for this field.
+     * 
+ * + * string location = 1; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Free text representation of the machine location.
+     * The format of this field should not be relied on. Different VMs in the same
+     * location may have different string values for this field.
+     * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Free text representation of the machine location.
+     * The format of this field should not be relied on. Different VMs in the same
+     * location may have different string values for this field.
+     * 
+ * + * string location = 1; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Free text representation of the machine location.
+     * The format of this field should not be relied on. Different VMs in the same
+     * location may have different string values for this field.
+     * 
+ * + * string location = 1; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Free text representation of the machine location.
+     * The format of this field should not be relied on. Different VMs in the same
+     * location may have different string values for this field.
+     * 
+ * + * string location = 1; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GenericPlatformDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GenericPlatformDetails) + private static final com.google.cloud.migrationcenter.v1.GenericPlatformDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GenericPlatformDetails(); + } + + public static com.google.cloud.migrationcenter.v1.GenericPlatformDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenericPlatformDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GenericPlatformDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GenericPlatformDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GenericPlatformDetailsOrBuilder.java new file mode 100644 index 000000000000..b93ab4ee4462 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GenericPlatformDetailsOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GenericPlatformDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GenericPlatformDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Free text representation of the machine location.
+   * The format of this field should not be relied on. Different VMs in the same
+   * location may have different string values for this field.
+   * 
+ * + * string location = 1; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * Free text representation of the machine location.
+   * The format of this field should not be relied on. Different VMs in the same
+   * location may have different string values for this field.
+   * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetAssetRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetAssetRequest.java new file mode 100644 index 000000000000..5f88a648e60b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetAssetRequest.java @@ -0,0 +1,786 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Message for getting a Asset.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetAssetRequest} + */ +public final class GetAssetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GetAssetRequest) + GetAssetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAssetRequest.newBuilder() to construct. + private GetAssetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAssetRequest() { + name_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAssetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetAssetRequest.class, + com.google.cloud.migrationcenter.v1.GetAssetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_ = 0; + /** + * + * + *
+   * View of the assets. Defaults to BASIC.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * View of the assets. Defaults to BASIC.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetView getView() { + com.google.cloud.migrationcenter.v1.AssetView result = + com.google.cloud.migrationcenter.v1.AssetView.forNumber(view_); + return result == null ? com.google.cloud.migrationcenter.v1.AssetView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (view_ != com.google.cloud.migrationcenter.v1.AssetView.ASSET_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(2, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (view_ != com.google.cloud.migrationcenter.v1.AssetView.ASSET_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GetAssetRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GetAssetRequest other = + (com.google.cloud.migrationcenter.v1.GetAssetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.GetAssetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message for getting a Asset.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetAssetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GetAssetRequest) + com.google.cloud.migrationcenter.v1.GetAssetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetAssetRequest.class, + com.google.cloud.migrationcenter.v1.GetAssetRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GetAssetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetAssetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetAssetRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GetAssetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetAssetRequest build() { + com.google.cloud.migrationcenter.v1.GetAssetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetAssetRequest buildPartial() { + com.google.cloud.migrationcenter.v1.GetAssetRequest result = + new com.google.cloud.migrationcenter.v1.GetAssetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GetAssetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GetAssetRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GetAssetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GetAssetRequest other) { + if (other == com.google.cloud.migrationcenter.v1.GetAssetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * View of the assets. Defaults to BASIC.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * View of the assets. Defaults to BASIC.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 2; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * View of the assets. Defaults to BASIC.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetView getView() { + com.google.cloud.migrationcenter.v1.AssetView result = + com.google.cloud.migrationcenter.v1.AssetView.forNumber(view_); + return result == null ? com.google.cloud.migrationcenter.v1.AssetView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * View of the assets. Defaults to BASIC.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 2; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.migrationcenter.v1.AssetView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * View of the assets. Defaults to BASIC.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 2; + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GetAssetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GetAssetRequest) + private static final com.google.cloud.migrationcenter.v1.GetAssetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GetAssetRequest(); + } + + public static com.google.cloud.migrationcenter.v1.GetAssetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAssetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetAssetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetAssetRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetAssetRequestOrBuilder.java new file mode 100644 index 000000000000..6a196c30c634 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetAssetRequestOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GetAssetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GetAssetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * View of the assets. Defaults to BASIC.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * View of the assets. Defaults to BASIC.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 2; + * + * @return The view. + */ + com.google.cloud.migrationcenter.v1.AssetView getView(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetErrorFrameRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetErrorFrameRequest.java new file mode 100644 index 000000000000..e373e47c977d --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetErrorFrameRequest.java @@ -0,0 +1,814 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** Protobuf type {@code google.cloud.migrationcenter.v1.GetErrorFrameRequest} */ +public final class GetErrorFrameRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GetErrorFrameRequest) + GetErrorFrameRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetErrorFrameRequest.newBuilder() to construct. + private GetErrorFrameRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetErrorFrameRequest() { + name_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetErrorFrameRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetErrorFrameRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetErrorFrameRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest.class, + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the frame to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the frame to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_ = 0; + /** + * + * + *
+   * Optional. An optional view mode to control the level of details for the
+   * frame. The default is a basic frame view.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Optional. An optional view mode to control the level of details for the
+   * frame. The default is a basic frame view.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ErrorFrameView getView() { + com.google.cloud.migrationcenter.v1.ErrorFrameView result = + com.google.cloud.migrationcenter.v1.ErrorFrameView.forNumber(view_); + return result == null + ? com.google.cloud.migrationcenter.v1.ErrorFrameView.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ErrorFrameView.ERROR_FRAME_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ErrorFrameView.ERROR_FRAME_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GetErrorFrameRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest other = + (com.google.cloud.migrationcenter.v1.GetErrorFrameRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.migrationcenter.v1.GetErrorFrameRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GetErrorFrameRequest) + com.google.cloud.migrationcenter.v1.GetErrorFrameRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetErrorFrameRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetErrorFrameRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest.class, + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GetErrorFrameRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetErrorFrameRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetErrorFrameRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GetErrorFrameRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetErrorFrameRequest build() { + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetErrorFrameRequest buildPartial() { + com.google.cloud.migrationcenter.v1.GetErrorFrameRequest result = + new com.google.cloud.migrationcenter.v1.GetErrorFrameRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GetErrorFrameRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GetErrorFrameRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GetErrorFrameRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GetErrorFrameRequest other) { + if (other == com.google.cloud.migrationcenter.v1.GetErrorFrameRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the frame to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the frame to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the frame to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the frame to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the frame to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Optional. An optional view mode to control the level of details for the
+     * frame. The default is a basic frame view.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Optional. An optional view mode to control the level of details for the
+     * frame. The default is a basic frame view.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional view mode to control the level of details for the
+     * frame. The default is a basic frame view.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ErrorFrameView getView() { + com.google.cloud.migrationcenter.v1.ErrorFrameView result = + com.google.cloud.migrationcenter.v1.ErrorFrameView.forNumber(view_); + return result == null + ? com.google.cloud.migrationcenter.v1.ErrorFrameView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. An optional view mode to control the level of details for the
+     * frame. The default is a basic frame view.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.migrationcenter.v1.ErrorFrameView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional view mode to control the level of details for the
+     * frame. The default is a basic frame view.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GetErrorFrameRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GetErrorFrameRequest) + private static final com.google.cloud.migrationcenter.v1.GetErrorFrameRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GetErrorFrameRequest(); + } + + public static com.google.cloud.migrationcenter.v1.GetErrorFrameRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetErrorFrameRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetErrorFrameRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetErrorFrameRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetErrorFrameRequestOrBuilder.java new file mode 100644 index 000000000000..82832d87b159 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetErrorFrameRequestOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GetErrorFrameRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GetErrorFrameRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the frame to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the frame to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional view mode to control the level of details for the
+   * frame. The default is a basic frame view.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Optional. An optional view mode to control the level of details for the
+   * frame. The default is a basic frame view.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.migrationcenter.v1.ErrorFrameView getView(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetGroupRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetGroupRequest.java new file mode 100644 index 000000000000..530d0f06686d --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetGroupRequest.java @@ -0,0 +1,638 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to get a group.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetGroupRequest} + */ +public final class GetGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GetGroupRequest) + GetGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetGroupRequest.newBuilder() to construct. + private GetGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetGroupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetGroupRequest.class, + com.google.cloud.migrationcenter.v1.GetGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GetGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GetGroupRequest other = + (com.google.cloud.migrationcenter.v1.GetGroupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.GetGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a group.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GetGroupRequest) + com.google.cloud.migrationcenter.v1.GetGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetGroupRequest.class, + com.google.cloud.migrationcenter.v1.GetGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GetGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetGroupRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GetGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetGroupRequest build() { + com.google.cloud.migrationcenter.v1.GetGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetGroupRequest buildPartial() { + com.google.cloud.migrationcenter.v1.GetGroupRequest result = + new com.google.cloud.migrationcenter.v1.GetGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GetGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GetGroupRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GetGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GetGroupRequest other) { + if (other == com.google.cloud.migrationcenter.v1.GetGroupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GetGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GetGroupRequest) + private static final com.google.cloud.migrationcenter.v1.GetGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GetGroupRequest(); + } + + public static com.google.cloud.migrationcenter.v1.GetGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetGroupRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetGroupRequestOrBuilder.java new file mode 100644 index 000000000000..09edce7dd334 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetGroupRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GetGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GetGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportDataFileRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportDataFileRequest.java new file mode 100644 index 000000000000..4545257c53bc --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportDataFileRequest.java @@ -0,0 +1,643 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to get an import data file.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetImportDataFileRequest} + */ +public final class GetImportDataFileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GetImportDataFileRequest) + GetImportDataFileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetImportDataFileRequest.newBuilder() to construct. + private GetImportDataFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetImportDataFileRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetImportDataFileRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetImportDataFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetImportDataFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest.class, + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the ImportDataFile.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the ImportDataFile.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GetImportDataFileRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest other = + (com.google.cloud.migrationcenter.v1.GetImportDataFileRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get an import data file.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetImportDataFileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GetImportDataFileRequest) + com.google.cloud.migrationcenter.v1.GetImportDataFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetImportDataFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetImportDataFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest.class, + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GetImportDataFileRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetImportDataFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetImportDataFileRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GetImportDataFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetImportDataFileRequest build() { + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetImportDataFileRequest buildPartial() { + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest result = + new com.google.cloud.migrationcenter.v1.GetImportDataFileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.GetImportDataFileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GetImportDataFileRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GetImportDataFileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GetImportDataFileRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.GetImportDataFileRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the ImportDataFile.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the ImportDataFile.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the ImportDataFile.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the ImportDataFile.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the ImportDataFile.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GetImportDataFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GetImportDataFileRequest) + private static final com.google.cloud.migrationcenter.v1.GetImportDataFileRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GetImportDataFileRequest(); + } + + public static com.google.cloud.migrationcenter.v1.GetImportDataFileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetImportDataFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetImportDataFileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportDataFileRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportDataFileRequestOrBuilder.java new file mode 100644 index 000000000000..a56747488ead --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportDataFileRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GetImportDataFileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GetImportDataFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the ImportDataFile.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the ImportDataFile.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportJobRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportJobRequest.java new file mode 100644 index 000000000000..24c6cf0d68fa --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportJobRequest.java @@ -0,0 +1,814 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to get an import job.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetImportJobRequest} + */ +public final class GetImportJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GetImportJobRequest) + GetImportJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetImportJobRequest.newBuilder() to construct. + private GetImportJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetImportJobRequest() { + name_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetImportJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetImportJobRequest.class, + com.google.cloud.migrationcenter.v1.GetImportJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_ = 0; + /** + * + * + *
+   * Optional. The level of details of the import job.
+   * Default value is FULL.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Optional. The level of details of the import job.
+   * Default value is FULL.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJobView getView() { + com.google.cloud.migrationcenter.v1.ImportJobView result = + com.google.cloud.migrationcenter.v1.ImportJobView.forNumber(view_); + return result == null ? com.google.cloud.migrationcenter.v1.ImportJobView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ImportJobView.IMPORT_JOB_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ImportJobView.IMPORT_JOB_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GetImportJobRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GetImportJobRequest other = + (com.google.cloud.migrationcenter.v1.GetImportJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.GetImportJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get an import job.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetImportJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GetImportJobRequest) + com.google.cloud.migrationcenter.v1.GetImportJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetImportJobRequest.class, + com.google.cloud.migrationcenter.v1.GetImportJobRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GetImportJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetImportJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetImportJobRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GetImportJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetImportJobRequest build() { + com.google.cloud.migrationcenter.v1.GetImportJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetImportJobRequest buildPartial() { + com.google.cloud.migrationcenter.v1.GetImportJobRequest result = + new com.google.cloud.migrationcenter.v1.GetImportJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GetImportJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GetImportJobRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GetImportJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GetImportJobRequest other) { + if (other == com.google.cloud.migrationcenter.v1.GetImportJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Optional. The level of details of the import job.
+     * Default value is FULL.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Optional. The level of details of the import job.
+     * Default value is FULL.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The level of details of the import job.
+     * Default value is FULL.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJobView getView() { + com.google.cloud.migrationcenter.v1.ImportJobView result = + com.google.cloud.migrationcenter.v1.ImportJobView.forNumber(view_); + return result == null + ? com.google.cloud.migrationcenter.v1.ImportJobView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The level of details of the import job.
+     * Default value is FULL.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.migrationcenter.v1.ImportJobView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The level of details of the import job.
+     * Default value is FULL.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GetImportJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GetImportJobRequest) + private static final com.google.cloud.migrationcenter.v1.GetImportJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GetImportJobRequest(); + } + + public static com.google.cloud.migrationcenter.v1.GetImportJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetImportJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetImportJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportJobRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportJobRequestOrBuilder.java new file mode 100644 index 000000000000..5bca96dd0bfc --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetImportJobRequestOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GetImportJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GetImportJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The level of details of the import job.
+   * Default value is FULL.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Optional. The level of details of the import job.
+   * Default value is FULL.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.migrationcenter.v1.ImportJobView getView(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetPreferenceSetRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetPreferenceSetRequest.java new file mode 100644 index 000000000000..e8f6e3a30e47 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetPreferenceSetRequest.java @@ -0,0 +1,639 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to get a preference set.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetPreferenceSetRequest} + */ +public final class GetPreferenceSetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GetPreferenceSetRequest) + GetPreferenceSetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPreferenceSetRequest.newBuilder() to construct. + private GetPreferenceSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPreferenceSetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPreferenceSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetPreferenceSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetPreferenceSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest.class, + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest other = + (com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a preference set.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetPreferenceSetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GetPreferenceSetRequest) + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetPreferenceSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetPreferenceSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest.class, + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetPreferenceSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest build() { + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest buildPartial() { + com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest result = + new com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest other) { + if (other == com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GetPreferenceSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GetPreferenceSetRequest) + private static final com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest(); + } + + public static com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPreferenceSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetPreferenceSetRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetPreferenceSetRequestOrBuilder.java new file mode 100644 index 000000000000..c1cbcc014bd7 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetPreferenceSetRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GetPreferenceSetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GetPreferenceSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportConfigRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportConfigRequest.java new file mode 100644 index 000000000000..64db7b062147 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportConfigRequest.java @@ -0,0 +1,639 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to get a `ReportConfig` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetReportConfigRequest} + */ +public final class GetReportConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GetReportConfigRequest) + GetReportConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetReportConfigRequest.newBuilder() to construct. + private GetReportConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetReportConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetReportConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetReportConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetReportConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetReportConfigRequest.class, + com.google.cloud.migrationcenter.v1.GetReportConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GetReportConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GetReportConfigRequest other = + (com.google.cloud.migrationcenter.v1.GetReportConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.GetReportConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a `ReportConfig` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetReportConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GetReportConfigRequest) + com.google.cloud.migrationcenter.v1.GetReportConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetReportConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetReportConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetReportConfigRequest.class, + com.google.cloud.migrationcenter.v1.GetReportConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GetReportConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetReportConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetReportConfigRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GetReportConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetReportConfigRequest build() { + com.google.cloud.migrationcenter.v1.GetReportConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetReportConfigRequest buildPartial() { + com.google.cloud.migrationcenter.v1.GetReportConfigRequest result = + new com.google.cloud.migrationcenter.v1.GetReportConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GetReportConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GetReportConfigRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GetReportConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GetReportConfigRequest other) { + if (other == com.google.cloud.migrationcenter.v1.GetReportConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GetReportConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GetReportConfigRequest) + private static final com.google.cloud.migrationcenter.v1.GetReportConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GetReportConfigRequest(); + } + + public static com.google.cloud.migrationcenter.v1.GetReportConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetReportConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetReportConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportConfigRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportConfigRequestOrBuilder.java new file mode 100644 index 000000000000..12e5f004a6a1 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportConfigRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GetReportConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GetReportConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportRequest.java new file mode 100644 index 000000000000..acb7fdbb9b61 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportRequest.java @@ -0,0 +1,788 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to get a Report.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetReportRequest} + */ +public final class GetReportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GetReportRequest) + GetReportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetReportRequest.newBuilder() to construct. + private GetReportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetReportRequest() { + name_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetReportRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetReportRequest.class, + com.google.cloud.migrationcenter.v1.GetReportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 6; + private int view_ = 0; + /** + * + * + *
+   * Determines what information to retrieve for the Report.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Determines what information to retrieve for the Report.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportView getView() { + com.google.cloud.migrationcenter.v1.ReportView result = + com.google.cloud.migrationcenter.v1.ReportView.forNumber(view_); + return result == null ? com.google.cloud.migrationcenter.v1.ReportView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ReportView.REPORT_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(6, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ReportView.REPORT_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GetReportRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GetReportRequest other = + (com.google.cloud.migrationcenter.v1.GetReportRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.GetReportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a Report.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetReportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GetReportRequest) + com.google.cloud.migrationcenter.v1.GetReportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetReportRequest.class, + com.google.cloud.migrationcenter.v1.GetReportRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GetReportRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetReportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetReportRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GetReportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetReportRequest build() { + com.google.cloud.migrationcenter.v1.GetReportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetReportRequest buildPartial() { + com.google.cloud.migrationcenter.v1.GetReportRequest result = + new com.google.cloud.migrationcenter.v1.GetReportRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GetReportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GetReportRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GetReportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GetReportRequest other) { + if (other == com.google.cloud.migrationcenter.v1.GetReportRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 48: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Determines what information to retrieve for the Report.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Determines what information to retrieve for the Report.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Determines what information to retrieve for the Report.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportView getView() { + com.google.cloud.migrationcenter.v1.ReportView result = + com.google.cloud.migrationcenter.v1.ReportView.forNumber(view_); + return result == null ? com.google.cloud.migrationcenter.v1.ReportView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Determines what information to retrieve for the Report.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.migrationcenter.v1.ReportView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Determines what information to retrieve for the Report.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GetReportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GetReportRequest) + private static final com.google.cloud.migrationcenter.v1.GetReportRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GetReportRequest(); + } + + public static com.google.cloud.migrationcenter.v1.GetReportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetReportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetReportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportRequestOrBuilder.java new file mode 100644 index 000000000000..9547d5b12c9c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetReportRequestOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GetReportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GetReportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Determines what information to retrieve for the Report.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Determines what information to retrieve for the Report.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The view. + */ + com.google.cloud.migrationcenter.v1.ReportView getView(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSettingsRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSettingsRequest.java new file mode 100644 index 000000000000..5ec9bd85f5b7 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSettingsRequest.java @@ -0,0 +1,639 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to get the settings.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetSettingsRequest} + */ +public final class GetSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GetSettingsRequest) + GetSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSettingsRequest.newBuilder() to construct. + private GetSettingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSettingsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSettingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetSettingsRequest.class, + com.google.cloud.migrationcenter.v1.GetSettingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GetSettingsRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GetSettingsRequest other = + (com.google.cloud.migrationcenter.v1.GetSettingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.GetSettingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get the settings.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GetSettingsRequest) + com.google.cloud.migrationcenter.v1.GetSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetSettingsRequest.class, + com.google.cloud.migrationcenter.v1.GetSettingsRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GetSettingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetSettingsRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GetSettingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetSettingsRequest build() { + com.google.cloud.migrationcenter.v1.GetSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetSettingsRequest buildPartial() { + com.google.cloud.migrationcenter.v1.GetSettingsRequest result = + new com.google.cloud.migrationcenter.v1.GetSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GetSettingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GetSettingsRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GetSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GetSettingsRequest other) { + if (other == com.google.cloud.migrationcenter.v1.GetSettingsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GetSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GetSettingsRequest) + private static final com.google.cloud.migrationcenter.v1.GetSettingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GetSettingsRequest(); + } + + public static com.google.cloud.migrationcenter.v1.GetSettingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetSettingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSettingsRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..321c3a25543e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSettingsRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GetSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GetSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSourceRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSourceRequest.java new file mode 100644 index 000000000000..db0cf81a1049 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSourceRequest.java @@ -0,0 +1,638 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to get a source.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetSourceRequest} + */ +public final class GetSourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GetSourceRequest) + GetSourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSourceRequest.newBuilder() to construct. + private GetSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSourceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetSourceRequest.class, + com.google.cloud.migrationcenter.v1.GetSourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GetSourceRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GetSourceRequest other = + (com.google.cloud.migrationcenter.v1.GetSourceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.GetSourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a source.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GetSourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GetSourceRequest) + com.google.cloud.migrationcenter.v1.GetSourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GetSourceRequest.class, + com.google.cloud.migrationcenter.v1.GetSourceRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GetSourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GetSourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetSourceRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GetSourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetSourceRequest build() { + com.google.cloud.migrationcenter.v1.GetSourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetSourceRequest buildPartial() { + com.google.cloud.migrationcenter.v1.GetSourceRequest result = + new com.google.cloud.migrationcenter.v1.GetSourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GetSourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GetSourceRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GetSourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GetSourceRequest other) { + if (other == com.google.cloud.migrationcenter.v1.GetSourceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GetSourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GetSourceRequest) + private static final com.google.cloud.migrationcenter.v1.GetSourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GetSourceRequest(); + } + + public static com.google.cloud.migrationcenter.v1.GetSourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GetSourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSourceRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSourceRequestOrBuilder.java new file mode 100644 index 000000000000..5b72fe59013e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GetSourceRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GetSourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GetSourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Group.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Group.java new file mode 100644 index 000000000000..a6086e78eddc --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Group.java @@ -0,0 +1,1887 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A resource that represents an asset group.
+ * The purpose of an asset group is to bundle a set of assets that have
+ * something in common, while allowing users to add annotations to the group.
+ * An asset can belong to multiple groups.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Group} + */ +public final class Group extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Group) + GroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use Group.newBuilder() to construct. + private Group(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Group() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Group(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Group_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Group_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Group.class, + com.google.cloud.migrationcenter.v1.Group.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The name of the group.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the group.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The timestamp when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Group_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * User-friendly display name.
+   * 
+ * + * string display_name = 5; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * User-friendly display name.
+   * 
+ * + * string display_name = 5; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The description of the resource.
+   * 
+ * + * string description = 6; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The description of the resource.
+   * 
+ * + * string description = 6; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Group)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Group other = + (com.google.cloud.migrationcenter.v1.Group) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Group parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Group parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Group parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Group parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Group parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Group parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Group parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Group parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Group parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Group parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Group parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Group parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.Group prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that represents an asset group.
+   * The purpose of an asset group is to bundle a set of assets that have
+   * something in common, while allowing users to add annotations to the group.
+   * An asset can belong to multiple groups.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Group} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Group) + com.google.cloud.migrationcenter.v1.GroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Group_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Group_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Group.class, + com.google.cloud.migrationcenter.v1.Group.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Group.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + displayName_ = ""; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Group_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Group getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Group.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Group build() { + com.google.cloud.migrationcenter.v1.Group result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Group buildPartial() { + com.google.cloud.migrationcenter.v1.Group result = + new com.google.cloud.migrationcenter.v1.Group(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.Group result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Group) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Group) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Group other) { + if (other == com.google.cloud.migrationcenter.v1.Group.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The name of the group.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the group.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the group.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the group.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the group.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * User-friendly display name.
+     * 
+ * + * string display_name = 5; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User-friendly display name.
+     * 
+ * + * string display_name = 5; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User-friendly display name.
+     * 
+ * + * string display_name = 5; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name.
+     * 
+ * + * string display_name = 5; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name.
+     * 
+ * + * string display_name = 5; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The description of the resource.
+     * 
+ * + * string description = 6; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The description of the resource.
+     * 
+ * + * string description = 6; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The description of the resource.
+     * 
+ * + * string description = 6; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the resource.
+     * 
+ * + * string description = 6; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the resource.
+     * 
+ * + * string description = 6; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Group) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Group) + private static final com.google.cloud.migrationcenter.v1.Group DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Group(); + } + + public static com.google.cloud.migrationcenter.v1.Group getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Group parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Group getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GroupName.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GroupName.java new file mode 100644 index 000000000000..ef009be18206 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GroupName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class GroupName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_GROUP = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/groups/{group}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String group; + + @Deprecated + protected GroupName() { + project = null; + location = null; + group = null; + } + + private GroupName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + group = Preconditions.checkNotNull(builder.getGroup()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getGroup() { + return group; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static GroupName of(String project, String location, String group) { + return newBuilder().setProject(project).setLocation(location).setGroup(group).build(); + } + + public static String format(String project, String location, String group) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setGroup(group) + .build() + .toString(); + } + + public static GroupName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_GROUP.validatedMatch( + formattedString, "GroupName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("group")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (GroupName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_GROUP.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (group != null) { + fieldMapBuilder.put("group", group); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_GROUP.instantiate( + "project", project, "location", location, "group", group); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + GroupName that = ((GroupName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.group, that.group); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(group); + return h; + } + + /** Builder for projects/{project}/locations/{location}/groups/{group}. */ + public static class Builder { + private String project; + private String location; + private String group; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getGroup() { + return group; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setGroup(String group) { + this.group = group; + return this; + } + + private Builder(GroupName groupName) { + this.project = groupName.project; + this.location = groupName.location; + this.group = groupName.group; + } + + public GroupName build() { + return new GroupName(this); + } + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GroupOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GroupOrBuilder.java new file mode 100644 index 000000000000..a4738dc2bceb --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GroupOrBuilder.java @@ -0,0 +1,234 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Group) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of the group.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The name of the group.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * User-friendly display name.
+   * 
+ * + * string display_name = 5; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * User-friendly display name.
+   * 
+ * + * string display_name = 5; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The description of the resource.
+   * 
+ * + * string description = 6; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the resource.
+   * 
+ * + * string description = 6; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestConfigDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestConfigDetails.java new file mode 100644 index 000000000000..4efe7244b15f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestConfigDetails.java @@ -0,0 +1,1767 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Guest OS config information.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GuestConfigDetails} + */ +public final class GuestConfigDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GuestConfigDetails) + GuestConfigDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GuestConfigDetails.newBuilder() to construct. + private GuestConfigDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GuestConfigDetails() { + issue_ = ""; + selinuxMode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GuestConfigDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestConfigDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestConfigDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GuestConfigDetails.class, + com.google.cloud.migrationcenter.v1.GuestConfigDetails.Builder.class); + } + + /** + * + * + *
+   * Security-Enhanced Linux (SELinux) mode.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode} + */ + public enum SeLinuxMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * SELinux mode unknown or unspecified.
+     * 
+ * + * SE_LINUX_MODE_UNSPECIFIED = 0; + */ + SE_LINUX_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * SELinux is disabled.
+     * 
+ * + * SE_LINUX_MODE_DISABLED = 1; + */ + SE_LINUX_MODE_DISABLED(1), + /** + * + * + *
+     * SELinux permissive mode.
+     * 
+ * + * SE_LINUX_MODE_PERMISSIVE = 2; + */ + SE_LINUX_MODE_PERMISSIVE(2), + /** + * + * + *
+     * SELinux enforcing mode.
+     * 
+ * + * SE_LINUX_MODE_ENFORCING = 3; + */ + SE_LINUX_MODE_ENFORCING(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * SELinux mode unknown or unspecified.
+     * 
+ * + * SE_LINUX_MODE_UNSPECIFIED = 0; + */ + public static final int SE_LINUX_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * SELinux is disabled.
+     * 
+ * + * SE_LINUX_MODE_DISABLED = 1; + */ + public static final int SE_LINUX_MODE_DISABLED_VALUE = 1; + /** + * + * + *
+     * SELinux permissive mode.
+     * 
+ * + * SE_LINUX_MODE_PERMISSIVE = 2; + */ + public static final int SE_LINUX_MODE_PERMISSIVE_VALUE = 2; + /** + * + * + *
+     * SELinux enforcing mode.
+     * 
+ * + * SE_LINUX_MODE_ENFORCING = 3; + */ + public static final int SE_LINUX_MODE_ENFORCING_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SeLinuxMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SeLinuxMode forNumber(int value) { + switch (value) { + case 0: + return SE_LINUX_MODE_UNSPECIFIED; + case 1: + return SE_LINUX_MODE_DISABLED; + case 2: + return SE_LINUX_MODE_PERMISSIVE; + case 3: + return SE_LINUX_MODE_ENFORCING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SeLinuxMode findValueByNumber(int number) { + return SeLinuxMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.GuestConfigDetails.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SeLinuxMode[] VALUES = values(); + + public static SeLinuxMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SeLinuxMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode) + } + + public static final int ISSUE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object issue_ = ""; + /** + * + * + *
+   * OS issue (typically /etc/issue in Linux).
+   * 
+ * + * string issue = 1; + * + * @return The issue. + */ + @java.lang.Override + public java.lang.String getIssue() { + java.lang.Object ref = issue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issue_ = s; + return s; + } + } + /** + * + * + *
+   * OS issue (typically /etc/issue in Linux).
+   * 
+ * + * string issue = 1; + * + * @return The bytes for issue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIssueBytes() { + java.lang.Object ref = issue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + issue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FSTAB_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.FstabEntryList fstab_; + /** + * + * + *
+   * Mount list (Linux fstab).
+   * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + * + * @return Whether the fstab field is set. + */ + @java.lang.Override + public boolean hasFstab() { + return fstab_ != null; + } + /** + * + * + *
+   * Mount list (Linux fstab).
+   * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + * + * @return The fstab. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntryList getFstab() { + return fstab_ == null + ? com.google.cloud.migrationcenter.v1.FstabEntryList.getDefaultInstance() + : fstab_; + } + /** + * + * + *
+   * Mount list (Linux fstab).
+   * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FstabEntryListOrBuilder getFstabOrBuilder() { + return fstab_ == null + ? com.google.cloud.migrationcenter.v1.FstabEntryList.getDefaultInstance() + : fstab_; + } + + public static final int HOSTS_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.HostsEntryList hosts_; + /** + * + * + *
+   * Hosts file (/etc/hosts).
+   * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + * + * @return Whether the hosts field is set. + */ + @java.lang.Override + public boolean hasHosts() { + return hosts_ != null; + } + /** + * + * + *
+   * Hosts file (/etc/hosts).
+   * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + * + * @return The hosts. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntryList getHosts() { + return hosts_ == null + ? com.google.cloud.migrationcenter.v1.HostsEntryList.getDefaultInstance() + : hosts_; + } + /** + * + * + *
+   * Hosts file (/etc/hosts).
+   * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntryListOrBuilder getHostsOrBuilder() { + return hosts_ == null + ? com.google.cloud.migrationcenter.v1.HostsEntryList.getDefaultInstance() + : hosts_; + } + + public static final int NFS_EXPORTS_FIELD_NUMBER = 4; + private com.google.cloud.migrationcenter.v1.NfsExportList nfsExports_; + /** + * + * + *
+   * NFS exports.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + * + * @return Whether the nfsExports field is set. + */ + @java.lang.Override + public boolean hasNfsExports() { + return nfsExports_ != null; + } + /** + * + * + *
+   * NFS exports.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + * + * @return The nfsExports. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExportList getNfsExports() { + return nfsExports_ == null + ? com.google.cloud.migrationcenter.v1.NfsExportList.getDefaultInstance() + : nfsExports_; + } + /** + * + * + *
+   * NFS exports.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExportListOrBuilder getNfsExportsOrBuilder() { + return nfsExports_ == null + ? com.google.cloud.migrationcenter.v1.NfsExportList.getDefaultInstance() + : nfsExports_; + } + + public static final int SELINUX_MODE_FIELD_NUMBER = 5; + private int selinuxMode_ = 0; + /** + * + * + *
+   * Security-Enhanced Linux (SELinux) mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + * + * @return The enum numeric value on the wire for selinuxMode. + */ + @java.lang.Override + public int getSelinuxModeValue() { + return selinuxMode_; + } + /** + * + * + *
+   * Security-Enhanced Linux (SELinux) mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + * + * @return The selinuxMode. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode getSelinuxMode() { + com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode result = + com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode.forNumber(selinuxMode_); + return result == null + ? com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, issue_); + } + if (fstab_ != null) { + output.writeMessage(2, getFstab()); + } + if (hosts_ != null) { + output.writeMessage(3, getHosts()); + } + if (nfsExports_ != null) { + output.writeMessage(4, getNfsExports()); + } + if (selinuxMode_ + != com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode + .SE_LINUX_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, selinuxMode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, issue_); + } + if (fstab_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFstab()); + } + if (hosts_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getHosts()); + } + if (nfsExports_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getNfsExports()); + } + if (selinuxMode_ + != com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode + .SE_LINUX_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, selinuxMode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GuestConfigDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GuestConfigDetails other = + (com.google.cloud.migrationcenter.v1.GuestConfigDetails) obj; + + if (!getIssue().equals(other.getIssue())) return false; + if (hasFstab() != other.hasFstab()) return false; + if (hasFstab()) { + if (!getFstab().equals(other.getFstab())) return false; + } + if (hasHosts() != other.hasHosts()) return false; + if (hasHosts()) { + if (!getHosts().equals(other.getHosts())) return false; + } + if (hasNfsExports() != other.hasNfsExports()) return false; + if (hasNfsExports()) { + if (!getNfsExports().equals(other.getNfsExports())) return false; + } + if (selinuxMode_ != other.selinuxMode_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ISSUE_FIELD_NUMBER; + hash = (53 * hash) + getIssue().hashCode(); + if (hasFstab()) { + hash = (37 * hash) + FSTAB_FIELD_NUMBER; + hash = (53 * hash) + getFstab().hashCode(); + } + if (hasHosts()) { + hash = (37 * hash) + HOSTS_FIELD_NUMBER; + hash = (53 * hash) + getHosts().hashCode(); + } + if (hasNfsExports()) { + hash = (37 * hash) + NFS_EXPORTS_FIELD_NUMBER; + hash = (53 * hash) + getNfsExports().hashCode(); + } + hash = (37 * hash) + SELINUX_MODE_FIELD_NUMBER; + hash = (53 * hash) + selinuxMode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.GuestConfigDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Guest OS config information.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GuestConfigDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GuestConfigDetails) + com.google.cloud.migrationcenter.v1.GuestConfigDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestConfigDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestConfigDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GuestConfigDetails.class, + com.google.cloud.migrationcenter.v1.GuestConfigDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GuestConfigDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + issue_ = ""; + fstab_ = null; + if (fstabBuilder_ != null) { + fstabBuilder_.dispose(); + fstabBuilder_ = null; + } + hosts_ = null; + if (hostsBuilder_ != null) { + hostsBuilder_.dispose(); + hostsBuilder_ = null; + } + nfsExports_ = null; + if (nfsExportsBuilder_ != null) { + nfsExportsBuilder_.dispose(); + nfsExportsBuilder_ = null; + } + selinuxMode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestConfigDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestConfigDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GuestConfigDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestConfigDetails build() { + com.google.cloud.migrationcenter.v1.GuestConfigDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestConfigDetails buildPartial() { + com.google.cloud.migrationcenter.v1.GuestConfigDetails result = + new com.google.cloud.migrationcenter.v1.GuestConfigDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GuestConfigDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.issue_ = issue_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fstab_ = fstabBuilder_ == null ? fstab_ : fstabBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.hosts_ = hostsBuilder_ == null ? hosts_ : hostsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.nfsExports_ = nfsExportsBuilder_ == null ? nfsExports_ : nfsExportsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.selinuxMode_ = selinuxMode_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GuestConfigDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GuestConfigDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GuestConfigDetails other) { + if (other == com.google.cloud.migrationcenter.v1.GuestConfigDetails.getDefaultInstance()) + return this; + if (!other.getIssue().isEmpty()) { + issue_ = other.issue_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasFstab()) { + mergeFstab(other.getFstab()); + } + if (other.hasHosts()) { + mergeHosts(other.getHosts()); + } + if (other.hasNfsExports()) { + mergeNfsExports(other.getNfsExports()); + } + if (other.selinuxMode_ != 0) { + setSelinuxModeValue(other.getSelinuxModeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + issue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getFstabFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getHostsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getNfsExportsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + selinuxMode_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object issue_ = ""; + /** + * + * + *
+     * OS issue (typically /etc/issue in Linux).
+     * 
+ * + * string issue = 1; + * + * @return The issue. + */ + public java.lang.String getIssue() { + java.lang.Object ref = issue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * OS issue (typically /etc/issue in Linux).
+     * 
+ * + * string issue = 1; + * + * @return The bytes for issue. + */ + public com.google.protobuf.ByteString getIssueBytes() { + java.lang.Object ref = issue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + issue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * OS issue (typically /etc/issue in Linux).
+     * 
+ * + * string issue = 1; + * + * @param value The issue to set. + * @return This builder for chaining. + */ + public Builder setIssue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + issue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * OS issue (typically /etc/issue in Linux).
+     * 
+ * + * string issue = 1; + * + * @return This builder for chaining. + */ + public Builder clearIssue() { + issue_ = getDefaultInstance().getIssue(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * OS issue (typically /etc/issue in Linux).
+     * 
+ * + * string issue = 1; + * + * @param value The bytes for issue to set. + * @return This builder for chaining. + */ + public Builder setIssueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + issue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.FstabEntryList fstab_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FstabEntryList, + com.google.cloud.migrationcenter.v1.FstabEntryList.Builder, + com.google.cloud.migrationcenter.v1.FstabEntryListOrBuilder> + fstabBuilder_; + /** + * + * + *
+     * Mount list (Linux fstab).
+     * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + * + * @return Whether the fstab field is set. + */ + public boolean hasFstab() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Mount list (Linux fstab).
+     * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + * + * @return The fstab. + */ + public com.google.cloud.migrationcenter.v1.FstabEntryList getFstab() { + if (fstabBuilder_ == null) { + return fstab_ == null + ? com.google.cloud.migrationcenter.v1.FstabEntryList.getDefaultInstance() + : fstab_; + } else { + return fstabBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mount list (Linux fstab).
+     * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + */ + public Builder setFstab(com.google.cloud.migrationcenter.v1.FstabEntryList value) { + if (fstabBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fstab_ = value; + } else { + fstabBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Mount list (Linux fstab).
+     * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + */ + public Builder setFstab( + com.google.cloud.migrationcenter.v1.FstabEntryList.Builder builderForValue) { + if (fstabBuilder_ == null) { + fstab_ = builderForValue.build(); + } else { + fstabBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Mount list (Linux fstab).
+     * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + */ + public Builder mergeFstab(com.google.cloud.migrationcenter.v1.FstabEntryList value) { + if (fstabBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && fstab_ != null + && fstab_ != com.google.cloud.migrationcenter.v1.FstabEntryList.getDefaultInstance()) { + getFstabBuilder().mergeFrom(value); + } else { + fstab_ = value; + } + } else { + fstabBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Mount list (Linux fstab).
+     * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + */ + public Builder clearFstab() { + bitField0_ = (bitField0_ & ~0x00000002); + fstab_ = null; + if (fstabBuilder_ != null) { + fstabBuilder_.dispose(); + fstabBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Mount list (Linux fstab).
+     * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + */ + public com.google.cloud.migrationcenter.v1.FstabEntryList.Builder getFstabBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFstabFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mount list (Linux fstab).
+     * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + */ + public com.google.cloud.migrationcenter.v1.FstabEntryListOrBuilder getFstabOrBuilder() { + if (fstabBuilder_ != null) { + return fstabBuilder_.getMessageOrBuilder(); + } else { + return fstab_ == null + ? com.google.cloud.migrationcenter.v1.FstabEntryList.getDefaultInstance() + : fstab_; + } + } + /** + * + * + *
+     * Mount list (Linux fstab).
+     * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FstabEntryList, + com.google.cloud.migrationcenter.v1.FstabEntryList.Builder, + com.google.cloud.migrationcenter.v1.FstabEntryListOrBuilder> + getFstabFieldBuilder() { + if (fstabBuilder_ == null) { + fstabBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FstabEntryList, + com.google.cloud.migrationcenter.v1.FstabEntryList.Builder, + com.google.cloud.migrationcenter.v1.FstabEntryListOrBuilder>( + getFstab(), getParentForChildren(), isClean()); + fstab_ = null; + } + return fstabBuilder_; + } + + private com.google.cloud.migrationcenter.v1.HostsEntryList hosts_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.HostsEntryList, + com.google.cloud.migrationcenter.v1.HostsEntryList.Builder, + com.google.cloud.migrationcenter.v1.HostsEntryListOrBuilder> + hostsBuilder_; + /** + * + * + *
+     * Hosts file (/etc/hosts).
+     * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + * + * @return Whether the hosts field is set. + */ + public boolean hasHosts() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Hosts file (/etc/hosts).
+     * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + * + * @return The hosts. + */ + public com.google.cloud.migrationcenter.v1.HostsEntryList getHosts() { + if (hostsBuilder_ == null) { + return hosts_ == null + ? com.google.cloud.migrationcenter.v1.HostsEntryList.getDefaultInstance() + : hosts_; + } else { + return hostsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Hosts file (/etc/hosts).
+     * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + */ + public Builder setHosts(com.google.cloud.migrationcenter.v1.HostsEntryList value) { + if (hostsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hosts_ = value; + } else { + hostsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Hosts file (/etc/hosts).
+     * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + */ + public Builder setHosts( + com.google.cloud.migrationcenter.v1.HostsEntryList.Builder builderForValue) { + if (hostsBuilder_ == null) { + hosts_ = builderForValue.build(); + } else { + hostsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Hosts file (/etc/hosts).
+     * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + */ + public Builder mergeHosts(com.google.cloud.migrationcenter.v1.HostsEntryList value) { + if (hostsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && hosts_ != null + && hosts_ != com.google.cloud.migrationcenter.v1.HostsEntryList.getDefaultInstance()) { + getHostsBuilder().mergeFrom(value); + } else { + hosts_ = value; + } + } else { + hostsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Hosts file (/etc/hosts).
+     * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + */ + public Builder clearHosts() { + bitField0_ = (bitField0_ & ~0x00000004); + hosts_ = null; + if (hostsBuilder_ != null) { + hostsBuilder_.dispose(); + hostsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Hosts file (/etc/hosts).
+     * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + */ + public com.google.cloud.migrationcenter.v1.HostsEntryList.Builder getHostsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getHostsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Hosts file (/etc/hosts).
+     * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + */ + public com.google.cloud.migrationcenter.v1.HostsEntryListOrBuilder getHostsOrBuilder() { + if (hostsBuilder_ != null) { + return hostsBuilder_.getMessageOrBuilder(); + } else { + return hosts_ == null + ? com.google.cloud.migrationcenter.v1.HostsEntryList.getDefaultInstance() + : hosts_; + } + } + /** + * + * + *
+     * Hosts file (/etc/hosts).
+     * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.HostsEntryList, + com.google.cloud.migrationcenter.v1.HostsEntryList.Builder, + com.google.cloud.migrationcenter.v1.HostsEntryListOrBuilder> + getHostsFieldBuilder() { + if (hostsBuilder_ == null) { + hostsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.HostsEntryList, + com.google.cloud.migrationcenter.v1.HostsEntryList.Builder, + com.google.cloud.migrationcenter.v1.HostsEntryListOrBuilder>( + getHosts(), getParentForChildren(), isClean()); + hosts_ = null; + } + return hostsBuilder_; + } + + private com.google.cloud.migrationcenter.v1.NfsExportList nfsExports_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NfsExportList, + com.google.cloud.migrationcenter.v1.NfsExportList.Builder, + com.google.cloud.migrationcenter.v1.NfsExportListOrBuilder> + nfsExportsBuilder_; + /** + * + * + *
+     * NFS exports.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + * + * @return Whether the nfsExports field is set. + */ + public boolean hasNfsExports() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * NFS exports.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + * + * @return The nfsExports. + */ + public com.google.cloud.migrationcenter.v1.NfsExportList getNfsExports() { + if (nfsExportsBuilder_ == null) { + return nfsExports_ == null + ? com.google.cloud.migrationcenter.v1.NfsExportList.getDefaultInstance() + : nfsExports_; + } else { + return nfsExportsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * NFS exports.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + */ + public Builder setNfsExports(com.google.cloud.migrationcenter.v1.NfsExportList value) { + if (nfsExportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nfsExports_ = value; + } else { + nfsExportsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * NFS exports.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + */ + public Builder setNfsExports( + com.google.cloud.migrationcenter.v1.NfsExportList.Builder builderForValue) { + if (nfsExportsBuilder_ == null) { + nfsExports_ = builderForValue.build(); + } else { + nfsExportsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * NFS exports.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + */ + public Builder mergeNfsExports(com.google.cloud.migrationcenter.v1.NfsExportList value) { + if (nfsExportsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && nfsExports_ != null + && nfsExports_ + != com.google.cloud.migrationcenter.v1.NfsExportList.getDefaultInstance()) { + getNfsExportsBuilder().mergeFrom(value); + } else { + nfsExports_ = value; + } + } else { + nfsExportsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * NFS exports.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + */ + public Builder clearNfsExports() { + bitField0_ = (bitField0_ & ~0x00000008); + nfsExports_ = null; + if (nfsExportsBuilder_ != null) { + nfsExportsBuilder_.dispose(); + nfsExportsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * NFS exports.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + */ + public com.google.cloud.migrationcenter.v1.NfsExportList.Builder getNfsExportsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNfsExportsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * NFS exports.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + */ + public com.google.cloud.migrationcenter.v1.NfsExportListOrBuilder getNfsExportsOrBuilder() { + if (nfsExportsBuilder_ != null) { + return nfsExportsBuilder_.getMessageOrBuilder(); + } else { + return nfsExports_ == null + ? com.google.cloud.migrationcenter.v1.NfsExportList.getDefaultInstance() + : nfsExports_; + } + } + /** + * + * + *
+     * NFS exports.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NfsExportList, + com.google.cloud.migrationcenter.v1.NfsExportList.Builder, + com.google.cloud.migrationcenter.v1.NfsExportListOrBuilder> + getNfsExportsFieldBuilder() { + if (nfsExportsBuilder_ == null) { + nfsExportsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NfsExportList, + com.google.cloud.migrationcenter.v1.NfsExportList.Builder, + com.google.cloud.migrationcenter.v1.NfsExportListOrBuilder>( + getNfsExports(), getParentForChildren(), isClean()); + nfsExports_ = null; + } + return nfsExportsBuilder_; + } + + private int selinuxMode_ = 0; + /** + * + * + *
+     * Security-Enhanced Linux (SELinux) mode.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + * + * + * @return The enum numeric value on the wire for selinuxMode. + */ + @java.lang.Override + public int getSelinuxModeValue() { + return selinuxMode_; + } + /** + * + * + *
+     * Security-Enhanced Linux (SELinux) mode.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + * + * + * @param value The enum numeric value on the wire for selinuxMode to set. + * @return This builder for chaining. + */ + public Builder setSelinuxModeValue(int value) { + selinuxMode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Security-Enhanced Linux (SELinux) mode.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + * + * + * @return The selinuxMode. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode getSelinuxMode() { + com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode result = + com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode.forNumber( + selinuxMode_); + return result == null + ? com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Security-Enhanced Linux (SELinux) mode.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + * + * + * @param value The selinuxMode to set. + * @return This builder for chaining. + */ + public Builder setSelinuxMode( + com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + selinuxMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Security-Enhanced Linux (SELinux) mode.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearSelinuxMode() { + bitField0_ = (bitField0_ & ~0x00000010); + selinuxMode_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GuestConfigDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GuestConfigDetails) + private static final com.google.cloud.migrationcenter.v1.GuestConfigDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GuestConfigDetails(); + } + + public static com.google.cloud.migrationcenter.v1.GuestConfigDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestConfigDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestConfigDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestConfigDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestConfigDetailsOrBuilder.java new file mode 100644 index 000000000000..44f841911314 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestConfigDetailsOrBuilder.java @@ -0,0 +1,180 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GuestConfigDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GuestConfigDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * OS issue (typically /etc/issue in Linux).
+   * 
+ * + * string issue = 1; + * + * @return The issue. + */ + java.lang.String getIssue(); + /** + * + * + *
+   * OS issue (typically /etc/issue in Linux).
+   * 
+ * + * string issue = 1; + * + * @return The bytes for issue. + */ + com.google.protobuf.ByteString getIssueBytes(); + + /** + * + * + *
+   * Mount list (Linux fstab).
+   * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + * + * @return Whether the fstab field is set. + */ + boolean hasFstab(); + /** + * + * + *
+   * Mount list (Linux fstab).
+   * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + * + * @return The fstab. + */ + com.google.cloud.migrationcenter.v1.FstabEntryList getFstab(); + /** + * + * + *
+   * Mount list (Linux fstab).
+   * 
+ * + * .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + */ + com.google.cloud.migrationcenter.v1.FstabEntryListOrBuilder getFstabOrBuilder(); + + /** + * + * + *
+   * Hosts file (/etc/hosts).
+   * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + * + * @return Whether the hosts field is set. + */ + boolean hasHosts(); + /** + * + * + *
+   * Hosts file (/etc/hosts).
+   * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + * + * @return The hosts. + */ + com.google.cloud.migrationcenter.v1.HostsEntryList getHosts(); + /** + * + * + *
+   * Hosts file (/etc/hosts).
+   * 
+ * + * .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + */ + com.google.cloud.migrationcenter.v1.HostsEntryListOrBuilder getHostsOrBuilder(); + + /** + * + * + *
+   * NFS exports.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + * + * @return Whether the nfsExports field is set. + */ + boolean hasNfsExports(); + /** + * + * + *
+   * NFS exports.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + * + * @return The nfsExports. + */ + com.google.cloud.migrationcenter.v1.NfsExportList getNfsExports(); + /** + * + * + *
+   * NFS exports.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + */ + com.google.cloud.migrationcenter.v1.NfsExportListOrBuilder getNfsExportsOrBuilder(); + + /** + * + * + *
+   * Security-Enhanced Linux (SELinux) mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + * + * @return The enum numeric value on the wire for selinuxMode. + */ + int getSelinuxModeValue(); + /** + * + * + *
+   * Security-Enhanced Linux (SELinux) mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + * + * @return The selinuxMode. + */ + com.google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode getSelinuxMode(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplication.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplication.java new file mode 100644 index 000000000000..69fc6b4533bf --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplication.java @@ -0,0 +1,1436 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Guest installed application information.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GuestInstalledApplication} + */ +public final class GuestInstalledApplication extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GuestInstalledApplication) + GuestInstalledApplicationOrBuilder { + private static final long serialVersionUID = 0L; + // Use GuestInstalledApplication.newBuilder() to construct. + private GuestInstalledApplication(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GuestInstalledApplication() { + applicationName_ = ""; + vendor_ = ""; + path_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GuestInstalledApplication(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.class, + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.Builder.class); + } + + public static final int APPLICATION_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object applicationName_ = ""; + /** + * + * + *
+   * Installed application name.
+   * 
+ * + * string application_name = 1; + * + * @return The applicationName. + */ + @java.lang.Override + public java.lang.String getApplicationName() { + java.lang.Object ref = applicationName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationName_ = s; + return s; + } + } + /** + * + * + *
+   * Installed application name.
+   * 
+ * + * string application_name = 1; + * + * @return The bytes for applicationName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplicationNameBytes() { + java.lang.Object ref = applicationName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VENDOR_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object vendor_ = ""; + /** + * + * + *
+   * Installed application vendor.
+   * 
+ * + * string vendor = 2; + * + * @return The vendor. + */ + @java.lang.Override + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vendor_ = s; + return s; + } + } + /** + * + * + *
+   * Installed application vendor.
+   * 
+ * + * string vendor = 2; + * + * @return The bytes for vendor. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTALL_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp installTime_; + /** + * + * + *
+   * The time when the application was installed.
+   * 
+ * + * .google.protobuf.Timestamp install_time = 3; + * + * @return Whether the installTime field is set. + */ + @java.lang.Override + public boolean hasInstallTime() { + return installTime_ != null; + } + /** + * + * + *
+   * The time when the application was installed.
+   * 
+ * + * .google.protobuf.Timestamp install_time = 3; + * + * @return The installTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getInstallTime() { + return installTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : installTime_; + } + /** + * + * + *
+   * The time when the application was installed.
+   * 
+ * + * .google.protobuf.Timestamp install_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getInstallTimeOrBuilder() { + return installTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : installTime_; + } + + public static final int PATH_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + * + * + *
+   * Source path.
+   * 
+ * + * string path = 4; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * Source path.
+   * 
+ * + * string path = 4; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * Installed application version.
+   * 
+ * + * string version = 5; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Installed application version.
+   * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, applicationName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vendor_); + } + if (installTime_ != null) { + output.writeMessage(3, getInstallTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, path_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, applicationName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vendor_); + } + if (installTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstallTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, path_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GuestInstalledApplication)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GuestInstalledApplication other = + (com.google.cloud.migrationcenter.v1.GuestInstalledApplication) obj; + + if (!getApplicationName().equals(other.getApplicationName())) return false; + if (!getVendor().equals(other.getVendor())) return false; + if (hasInstallTime() != other.hasInstallTime()) return false; + if (hasInstallTime()) { + if (!getInstallTime().equals(other.getInstallTime())) return false; + } + if (!getPath().equals(other.getPath())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + APPLICATION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getApplicationName().hashCode(); + hash = (37 * hash) + VENDOR_FIELD_NUMBER; + hash = (53 * hash) + getVendor().hashCode(); + if (hasInstallTime()) { + hash = (37 * hash) + INSTALL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getInstallTime().hashCode(); + } + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.GuestInstalledApplication prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Guest installed application information.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GuestInstalledApplication} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GuestInstalledApplication) + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.class, + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GuestInstalledApplication.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + applicationName_ = ""; + vendor_ = ""; + installTime_ = null; + if (installTimeBuilder_ != null) { + installTimeBuilder_.dispose(); + installTimeBuilder_ = null; + } + path_ = ""; + version_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplication_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplication + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GuestInstalledApplication.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplication build() { + com.google.cloud.migrationcenter.v1.GuestInstalledApplication result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplication buildPartial() { + com.google.cloud.migrationcenter.v1.GuestInstalledApplication result = + new com.google.cloud.migrationcenter.v1.GuestInstalledApplication(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.GuestInstalledApplication result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.applicationName_ = applicationName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vendor_ = vendor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.installTime_ = + installTimeBuilder_ == null ? installTime_ : installTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.path_ = path_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.version_ = version_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GuestInstalledApplication) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GuestInstalledApplication) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GuestInstalledApplication other) { + if (other + == com.google.cloud.migrationcenter.v1.GuestInstalledApplication.getDefaultInstance()) + return this; + if (!other.getApplicationName().isEmpty()) { + applicationName_ = other.applicationName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getVendor().isEmpty()) { + vendor_ = other.vendor_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInstallTime()) { + mergeInstallTime(other.getInstallTime()); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + applicationName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + vendor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getInstallTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object applicationName_ = ""; + /** + * + * + *
+     * Installed application name.
+     * 
+ * + * string application_name = 1; + * + * @return The applicationName. + */ + public java.lang.String getApplicationName() { + java.lang.Object ref = applicationName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Installed application name.
+     * 
+ * + * string application_name = 1; + * + * @return The bytes for applicationName. + */ + public com.google.protobuf.ByteString getApplicationNameBytes() { + java.lang.Object ref = applicationName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Installed application name.
+     * 
+ * + * string application_name = 1; + * + * @param value The applicationName to set. + * @return This builder for chaining. + */ + public Builder setApplicationName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + applicationName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Installed application name.
+     * 
+ * + * string application_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearApplicationName() { + applicationName_ = getDefaultInstance().getApplicationName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Installed application name.
+     * 
+ * + * string application_name = 1; + * + * @param value The bytes for applicationName to set. + * @return This builder for chaining. + */ + public Builder setApplicationNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + applicationName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object vendor_ = ""; + /** + * + * + *
+     * Installed application vendor.
+     * 
+ * + * string vendor = 2; + * + * @return The vendor. + */ + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vendor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Installed application vendor.
+     * 
+ * + * string vendor = 2; + * + * @return The bytes for vendor. + */ + public com.google.protobuf.ByteString getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Installed application vendor.
+     * 
+ * + * string vendor = 2; + * + * @param value The vendor to set. + * @return This builder for chaining. + */ + public Builder setVendor(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vendor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Installed application vendor.
+     * 
+ * + * string vendor = 2; + * + * @return This builder for chaining. + */ + public Builder clearVendor() { + vendor_ = getDefaultInstance().getVendor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Installed application vendor.
+     * 
+ * + * string vendor = 2; + * + * @param value The bytes for vendor to set. + * @return This builder for chaining. + */ + public Builder setVendorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vendor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp installTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + installTimeBuilder_; + /** + * + * + *
+     * The time when the application was installed.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 3; + * + * @return Whether the installTime field is set. + */ + public boolean hasInstallTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The time when the application was installed.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 3; + * + * @return The installTime. + */ + public com.google.protobuf.Timestamp getInstallTime() { + if (installTimeBuilder_ == null) { + return installTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : installTime_; + } else { + return installTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time when the application was installed.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 3; + */ + public Builder setInstallTime(com.google.protobuf.Timestamp value) { + if (installTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + installTime_ = value; + } else { + installTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the application was installed.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 3; + */ + public Builder setInstallTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (installTimeBuilder_ == null) { + installTime_ = builderForValue.build(); + } else { + installTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the application was installed.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 3; + */ + public Builder mergeInstallTime(com.google.protobuf.Timestamp value) { + if (installTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && installTime_ != null + && installTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getInstallTimeBuilder().mergeFrom(value); + } else { + installTime_ = value; + } + } else { + installTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the application was installed.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 3; + */ + public Builder clearInstallTime() { + bitField0_ = (bitField0_ & ~0x00000004); + installTime_ = null; + if (installTimeBuilder_ != null) { + installTimeBuilder_.dispose(); + installTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the application was installed.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getInstallTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getInstallTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when the application was installed.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getInstallTimeOrBuilder() { + if (installTimeBuilder_ != null) { + return installTimeBuilder_.getMessageOrBuilder(); + } else { + return installTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : installTime_; + } + } + /** + * + * + *
+     * The time when the application was installed.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getInstallTimeFieldBuilder() { + if (installTimeBuilder_ == null) { + installTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getInstallTime(), getParentForChildren(), isClean()); + installTime_ = null; + } + return installTimeBuilder_; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * Source path.
+     * 
+ * + * string path = 4; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Source path.
+     * 
+ * + * string path = 4; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Source path.
+     * 
+ * + * string path = 4; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + path_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Source path.
+     * 
+ * + * string path = 4; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Source path.
+     * 
+ * + * string path = 4; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Installed application version.
+     * 
+ * + * string version = 5; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Installed application version.
+     * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Installed application version.
+     * 
+ * + * string version = 5; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Installed application version.
+     * 
+ * + * string version = 5; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Installed application version.
+     * 
+ * + * string version = 5; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GuestInstalledApplication) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GuestInstalledApplication) + private static final com.google.cloud.migrationcenter.v1.GuestInstalledApplication + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GuestInstalledApplication(); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplication getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestInstalledApplication parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplication getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationList.java new file mode 100644 index 000000000000..d705f3f7be9b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationList.java @@ -0,0 +1,966 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Guest installed application list.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GuestInstalledApplicationList} + */ +public final class GuestInstalledApplicationList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GuestInstalledApplicationList) + GuestInstalledApplicationListOrBuilder { + private static final long serialVersionUID = 0L; + // Use GuestInstalledApplicationList.newBuilder() to construct. + private GuestInstalledApplicationList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GuestInstalledApplicationList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GuestInstalledApplicationList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplicationList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplicationList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.class, + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * Application entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Application entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.migrationcenter.v1.GuestInstalledApplicationOrBuilder> + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Application entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Application entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplication getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Application entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplicationOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList other = + (com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Guest installed application list.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GuestInstalledApplicationList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GuestInstalledApplicationList) + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplicationList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplicationList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.class, + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.Builder.class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplicationList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList build() { + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList buildPartial() { + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList result = + new com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList other) { + if (other + == com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.GuestInstalledApplication m = + input.readMessage( + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.parser(), + extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList( + entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestInstalledApplication, + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.Builder, + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public java.util.List + getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public com.google.cloud.migrationcenter.v1.GuestInstalledApplication getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.GuestInstalledApplication value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public Builder setEntries( + int index, + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.GuestInstalledApplication value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.GuestInstalledApplication value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public Builder addEntries( + int index, + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable + values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public com.google.cloud.migrationcenter.v1.GuestInstalledApplication.Builder getEntriesBuilder( + int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public com.google.cloud.migrationcenter.v1.GuestInstalledApplicationOrBuilder + getEntriesOrBuilder(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public java.util.List< + ? extends com.google.cloud.migrationcenter.v1.GuestInstalledApplicationOrBuilder> + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public com.google.cloud.migrationcenter.v1.GuestInstalledApplication.Builder + addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder( + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.getDefaultInstance()); + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public com.google.cloud.migrationcenter.v1.GuestInstalledApplication.Builder addEntriesBuilder( + int index) { + return getEntriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.getDefaultInstance()); + } + /** + * + * + *
+     * Application entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestInstalledApplication, + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.Builder, + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestInstalledApplication, + com.google.cloud.migrationcenter.v1.GuestInstalledApplication.Builder, + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GuestInstalledApplicationList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GuestInstalledApplicationList) + private static final com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList(); + } + + public static com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestInstalledApplicationList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationListOrBuilder.java new file mode 100644 index 000000000000..84a6bd070ede --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationListOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GuestInstalledApplicationListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GuestInstalledApplicationList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Application entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Application entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + com.google.cloud.migrationcenter.v1.GuestInstalledApplication getEntries(int index); + /** + * + * + *
+   * Application entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Application entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Application entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationOrBuilder getEntriesOrBuilder( + int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationOrBuilder.java new file mode 100644 index 000000000000..21f1edd2cf3e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestInstalledApplicationOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GuestInstalledApplicationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GuestInstalledApplication) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Installed application name.
+   * 
+ * + * string application_name = 1; + * + * @return The applicationName. + */ + java.lang.String getApplicationName(); + /** + * + * + *
+   * Installed application name.
+   * 
+ * + * string application_name = 1; + * + * @return The bytes for applicationName. + */ + com.google.protobuf.ByteString getApplicationNameBytes(); + + /** + * + * + *
+   * Installed application vendor.
+   * 
+ * + * string vendor = 2; + * + * @return The vendor. + */ + java.lang.String getVendor(); + /** + * + * + *
+   * Installed application vendor.
+   * 
+ * + * string vendor = 2; + * + * @return The bytes for vendor. + */ + com.google.protobuf.ByteString getVendorBytes(); + + /** + * + * + *
+   * The time when the application was installed.
+   * 
+ * + * .google.protobuf.Timestamp install_time = 3; + * + * @return Whether the installTime field is set. + */ + boolean hasInstallTime(); + /** + * + * + *
+   * The time when the application was installed.
+   * 
+ * + * .google.protobuf.Timestamp install_time = 3; + * + * @return The installTime. + */ + com.google.protobuf.Timestamp getInstallTime(); + /** + * + * + *
+   * The time when the application was installed.
+   * 
+ * + * .google.protobuf.Timestamp install_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getInstallTimeOrBuilder(); + + /** + * + * + *
+   * Source path.
+   * 
+ * + * string path = 4; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * Source path.
+   * 
+ * + * string path = 4; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+   * Installed application version.
+   * 
+ * + * string version = 5; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Installed application version.
+   * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestOsDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestOsDetails.java new file mode 100644 index 000000000000..a8b852123025 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestOsDetails.java @@ -0,0 +1,1494 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Information from Guest-level collections.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GuestOsDetails} + */ +public final class GuestOsDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GuestOsDetails) + GuestOsDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GuestOsDetails.newBuilder() to construct. + private GuestOsDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GuestOsDetails() { + osName_ = ""; + family_ = 0; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GuestOsDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestOsDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestOsDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GuestOsDetails.class, + com.google.cloud.migrationcenter.v1.GuestOsDetails.Builder.class); + } + + public static final int OS_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object osName_ = ""; + /** + * + * + *
+   * The name of the operating system.
+   * 
+ * + * string os_name = 1; + * + * @return The osName. + */ + @java.lang.Override + public java.lang.String getOsName() { + java.lang.Object ref = osName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osName_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the operating system.
+   * 
+ * + * string os_name = 1; + * + * @return The bytes for osName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsNameBytes() { + java.lang.Object ref = osName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FAMILY_FIELD_NUMBER = 2; + private int family_ = 0; + /** + * + * + *
+   * What family the OS belong to, if known.
+   * 
+ * + * .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + * + * @return The enum numeric value on the wire for family. + */ + @java.lang.Override + public int getFamilyValue() { + return family_; + } + /** + * + * + *
+   * What family the OS belong to, if known.
+   * 
+ * + * .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + * + * @return The family. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OperatingSystemFamily getFamily() { + com.google.cloud.migrationcenter.v1.OperatingSystemFamily result = + com.google.cloud.migrationcenter.v1.OperatingSystemFamily.forNumber(family_); + return result == null + ? com.google.cloud.migrationcenter.v1.OperatingSystemFamily.UNRECOGNIZED + : result; + } + + public static final int VERSION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * The version of the operating system.
+   * 
+ * + * string version = 3; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * The version of the operating system.
+   * 
+ * + * string version = 3; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.migrationcenter.v1.GuestConfigDetails config_; + /** + * + * + *
+   * OS and app configuration.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return config_ != null; + } + /** + * + * + *
+   * OS and app configuration.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestConfigDetails getConfig() { + return config_ == null + ? com.google.cloud.migrationcenter.v1.GuestConfigDetails.getDefaultInstance() + : config_; + } + /** + * + * + *
+   * OS and app configuration.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestConfigDetailsOrBuilder getConfigOrBuilder() { + return config_ == null + ? com.google.cloud.migrationcenter.v1.GuestConfigDetails.getDefaultInstance() + : config_; + } + + public static final int RUNTIME_FIELD_NUMBER = 5; + private com.google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime_; + /** + * + * + *
+   * Runtime information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + * + * @return Whether the runtime field is set. + */ + @java.lang.Override + public boolean hasRuntime() { + return runtime_ != null; + } + /** + * + * + *
+   * Runtime information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + * + * @return The runtime. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestRuntimeDetails getRuntime() { + return runtime_ == null + ? com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.getDefaultInstance() + : runtime_; + } + /** + * + * + *
+   * Runtime information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestRuntimeDetailsOrBuilder getRuntimeOrBuilder() { + return runtime_ == null + ? com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.getDefaultInstance() + : runtime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, osName_); + } + if (family_ + != com.google.cloud.migrationcenter.v1.OperatingSystemFamily.OS_FAMILY_UNKNOWN + .getNumber()) { + output.writeEnum(2, family_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_); + } + if (config_ != null) { + output.writeMessage(4, getConfig()); + } + if (runtime_ != null) { + output.writeMessage(5, getRuntime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, osName_); + } + if (family_ + != com.google.cloud.migrationcenter.v1.OperatingSystemFamily.OS_FAMILY_UNKNOWN + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, family_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_); + } + if (config_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getConfig()); + } + if (runtime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRuntime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GuestOsDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GuestOsDetails other = + (com.google.cloud.migrationcenter.v1.GuestOsDetails) obj; + + if (!getOsName().equals(other.getOsName())) return false; + if (family_ != other.family_) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (hasRuntime() != other.hasRuntime()) return false; + if (hasRuntime()) { + if (!getRuntime().equals(other.getRuntime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OS_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOsName().hashCode(); + hash = (37 * hash) + FAMILY_FIELD_NUMBER; + hash = (53 * hash) + family_; + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + if (hasRuntime()) { + hash = (37 * hash) + RUNTIME_FIELD_NUMBER; + hash = (53 * hash) + getRuntime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.GuestOsDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Information from Guest-level collections.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GuestOsDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GuestOsDetails) + com.google.cloud.migrationcenter.v1.GuestOsDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestOsDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestOsDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GuestOsDetails.class, + com.google.cloud.migrationcenter.v1.GuestOsDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GuestOsDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + osName_ = ""; + family_ = 0; + version_ = ""; + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + runtime_ = null; + if (runtimeBuilder_ != null) { + runtimeBuilder_.dispose(); + runtimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestOsDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestOsDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GuestOsDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestOsDetails build() { + com.google.cloud.migrationcenter.v1.GuestOsDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestOsDetails buildPartial() { + com.google.cloud.migrationcenter.v1.GuestOsDetails result = + new com.google.cloud.migrationcenter.v1.GuestOsDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GuestOsDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.osName_ = osName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.family_ = family_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.config_ = configBuilder_ == null ? config_ : configBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.runtime_ = runtimeBuilder_ == null ? runtime_ : runtimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GuestOsDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GuestOsDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GuestOsDetails other) { + if (other == com.google.cloud.migrationcenter.v1.GuestOsDetails.getDefaultInstance()) + return this; + if (!other.getOsName().isEmpty()) { + osName_ = other.osName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.family_ != 0) { + setFamilyValue(other.getFamilyValue()); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (other.hasRuntime()) { + mergeRuntime(other.getRuntime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + osName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + family_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getRuntimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object osName_ = ""; + /** + * + * + *
+     * The name of the operating system.
+     * 
+ * + * string os_name = 1; + * + * @return The osName. + */ + public java.lang.String getOsName() { + java.lang.Object ref = osName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the operating system.
+     * 
+ * + * string os_name = 1; + * + * @return The bytes for osName. + */ + public com.google.protobuf.ByteString getOsNameBytes() { + java.lang.Object ref = osName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the operating system.
+     * 
+ * + * string os_name = 1; + * + * @param value The osName to set. + * @return This builder for chaining. + */ + public Builder setOsName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + osName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the operating system.
+     * 
+ * + * string os_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearOsName() { + osName_ = getDefaultInstance().getOsName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the operating system.
+     * 
+ * + * string os_name = 1; + * + * @param value The bytes for osName to set. + * @return This builder for chaining. + */ + public Builder setOsNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + osName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int family_ = 0; + /** + * + * + *
+     * What family the OS belong to, if known.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + * + * @return The enum numeric value on the wire for family. + */ + @java.lang.Override + public int getFamilyValue() { + return family_; + } + /** + * + * + *
+     * What family the OS belong to, if known.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + * + * @param value The enum numeric value on the wire for family to set. + * @return This builder for chaining. + */ + public Builder setFamilyValue(int value) { + family_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * What family the OS belong to, if known.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + * + * @return The family. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OperatingSystemFamily getFamily() { + com.google.cloud.migrationcenter.v1.OperatingSystemFamily result = + com.google.cloud.migrationcenter.v1.OperatingSystemFamily.forNumber(family_); + return result == null + ? com.google.cloud.migrationcenter.v1.OperatingSystemFamily.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * What family the OS belong to, if known.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + * + * @param value The family to set. + * @return This builder for chaining. + */ + public Builder setFamily(com.google.cloud.migrationcenter.v1.OperatingSystemFamily value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + family_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * What family the OS belong to, if known.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + * + * @return This builder for chaining. + */ + public Builder clearFamily() { + bitField0_ = (bitField0_ & ~0x00000002); + family_ = 0; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * The version of the operating system.
+     * 
+ * + * string version = 3; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The version of the operating system.
+     * 
+ * + * string version = 3; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The version of the operating system.
+     * 
+ * + * string version = 3; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The version of the operating system.
+     * 
+ * + * string version = 3; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The version of the operating system.
+     * 
+ * + * string version = 3; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.GuestConfigDetails config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestConfigDetails, + com.google.cloud.migrationcenter.v1.GuestConfigDetails.Builder, + com.google.cloud.migrationcenter.v1.GuestConfigDetailsOrBuilder> + configBuilder_; + /** + * + * + *
+     * OS and app configuration.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * OS and app configuration.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + * + * @return The config. + */ + public com.google.cloud.migrationcenter.v1.GuestConfigDetails getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.cloud.migrationcenter.v1.GuestConfigDetails.getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + * + * + *
+     * OS and app configuration.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + */ + public Builder setConfig(com.google.cloud.migrationcenter.v1.GuestConfigDetails value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + } else { + configBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * OS and app configuration.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + */ + public Builder setConfig( + com.google.cloud.migrationcenter.v1.GuestConfigDetails.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * OS and app configuration.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + */ + public Builder mergeConfig(com.google.cloud.migrationcenter.v1.GuestConfigDetails value) { + if (configBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && config_ != null + && config_ + != com.google.cloud.migrationcenter.v1.GuestConfigDetails.getDefaultInstance()) { + getConfigBuilder().mergeFrom(value); + } else { + config_ = value; + } + } else { + configBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * OS and app configuration.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + */ + public Builder clearConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * OS and app configuration.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + */ + public com.google.cloud.migrationcenter.v1.GuestConfigDetails.Builder getConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * OS and app configuration.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + */ + public com.google.cloud.migrationcenter.v1.GuestConfigDetailsOrBuilder getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.cloud.migrationcenter.v1.GuestConfigDetails.getDefaultInstance() + : config_; + } + } + /** + * + * + *
+     * OS and app configuration.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestConfigDetails, + com.google.cloud.migrationcenter.v1.GuestConfigDetails.Builder, + com.google.cloud.migrationcenter.v1.GuestConfigDetailsOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestConfigDetails, + com.google.cloud.migrationcenter.v1.GuestConfigDetails.Builder, + com.google.cloud.migrationcenter.v1.GuestConfigDetailsOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + private com.google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails, + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.Builder, + com.google.cloud.migrationcenter.v1.GuestRuntimeDetailsOrBuilder> + runtimeBuilder_; + /** + * + * + *
+     * Runtime information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + * + * @return Whether the runtime field is set. + */ + public boolean hasRuntime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Runtime information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + * + * @return The runtime. + */ + public com.google.cloud.migrationcenter.v1.GuestRuntimeDetails getRuntime() { + if (runtimeBuilder_ == null) { + return runtime_ == null + ? com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.getDefaultInstance() + : runtime_; + } else { + return runtimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Runtime information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + */ + public Builder setRuntime(com.google.cloud.migrationcenter.v1.GuestRuntimeDetails value) { + if (runtimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + runtime_ = value; + } else { + runtimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + */ + public Builder setRuntime( + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.Builder builderForValue) { + if (runtimeBuilder_ == null) { + runtime_ = builderForValue.build(); + } else { + runtimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + */ + public Builder mergeRuntime(com.google.cloud.migrationcenter.v1.GuestRuntimeDetails value) { + if (runtimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && runtime_ != null + && runtime_ + != com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.getDefaultInstance()) { + getRuntimeBuilder().mergeFrom(value); + } else { + runtime_ = value; + } + } else { + runtimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + */ + public Builder clearRuntime() { + bitField0_ = (bitField0_ & ~0x00000010); + runtime_ = null; + if (runtimeBuilder_ != null) { + runtimeBuilder_.dispose(); + runtimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + */ + public com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.Builder getRuntimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getRuntimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Runtime information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + */ + public com.google.cloud.migrationcenter.v1.GuestRuntimeDetailsOrBuilder getRuntimeOrBuilder() { + if (runtimeBuilder_ != null) { + return runtimeBuilder_.getMessageOrBuilder(); + } else { + return runtime_ == null + ? com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.getDefaultInstance() + : runtime_; + } + } + /** + * + * + *
+     * Runtime information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails, + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.Builder, + com.google.cloud.migrationcenter.v1.GuestRuntimeDetailsOrBuilder> + getRuntimeFieldBuilder() { + if (runtimeBuilder_ == null) { + runtimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails, + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.Builder, + com.google.cloud.migrationcenter.v1.GuestRuntimeDetailsOrBuilder>( + getRuntime(), getParentForChildren(), isClean()); + runtime_ = null; + } + return runtimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GuestOsDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GuestOsDetails) + private static final com.google.cloud.migrationcenter.v1.GuestOsDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GuestOsDetails(); + } + + public static com.google.cloud.migrationcenter.v1.GuestOsDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestOsDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestOsDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestOsDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestOsDetailsOrBuilder.java new file mode 100644 index 000000000000..8949a6f40095 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestOsDetailsOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GuestOsDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GuestOsDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the operating system.
+   * 
+ * + * string os_name = 1; + * + * @return The osName. + */ + java.lang.String getOsName(); + /** + * + * + *
+   * The name of the operating system.
+   * 
+ * + * string os_name = 1; + * + * @return The bytes for osName. + */ + com.google.protobuf.ByteString getOsNameBytes(); + + /** + * + * + *
+   * What family the OS belong to, if known.
+   * 
+ * + * .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + * + * @return The enum numeric value on the wire for family. + */ + int getFamilyValue(); + /** + * + * + *
+   * What family the OS belong to, if known.
+   * 
+ * + * .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + * + * @return The family. + */ + com.google.cloud.migrationcenter.v1.OperatingSystemFamily getFamily(); + + /** + * + * + *
+   * The version of the operating system.
+   * 
+ * + * string version = 3; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * The version of the operating system.
+   * 
+ * + * string version = 3; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * OS and app configuration.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * OS and app configuration.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + * + * @return The config. + */ + com.google.cloud.migrationcenter.v1.GuestConfigDetails getConfig(); + /** + * + * + *
+   * OS and app configuration.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + */ + com.google.cloud.migrationcenter.v1.GuestConfigDetailsOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * Runtime information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + * + * @return Whether the runtime field is set. + */ + boolean hasRuntime(); + /** + * + * + *
+   * Runtime information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + * + * @return The runtime. + */ + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails getRuntime(); + /** + * + * + *
+   * Runtime information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + */ + com.google.cloud.migrationcenter.v1.GuestRuntimeDetailsOrBuilder getRuntimeOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestRuntimeDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestRuntimeDetails.java new file mode 100644 index 000000000000..843539f48b37 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestRuntimeDetails.java @@ -0,0 +1,2419 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Guest OS runtime information.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GuestRuntimeDetails} + */ +public final class GuestRuntimeDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.GuestRuntimeDetails) + GuestRuntimeDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GuestRuntimeDetails.newBuilder() to construct. + private GuestRuntimeDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GuestRuntimeDetails() { + domain_ = ""; + machineName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GuestRuntimeDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestRuntimeDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestRuntimeDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.class, + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.Builder.class); + } + + public static final int SERVICES_FIELD_NUMBER = 1; + private com.google.cloud.migrationcenter.v1.RunningServiceList services_; + /** + * + * + *
+   * Running background services.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + * + * @return Whether the services field is set. + */ + @java.lang.Override + public boolean hasServices() { + return services_ != null; + } + /** + * + * + *
+   * Running background services.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + * + * @return The services. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningServiceList getServices() { + return services_ == null + ? com.google.cloud.migrationcenter.v1.RunningServiceList.getDefaultInstance() + : services_; + } + /** + * + * + *
+   * Running background services.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningServiceListOrBuilder getServicesOrBuilder() { + return services_ == null + ? com.google.cloud.migrationcenter.v1.RunningServiceList.getDefaultInstance() + : services_; + } + + public static final int PROCESSES_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.RunningProcessList processes_; + /** + * + * + *
+   * Running processes.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + * + * @return Whether the processes field is set. + */ + @java.lang.Override + public boolean hasProcesses() { + return processes_ != null; + } + /** + * + * + *
+   * Running processes.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + * + * @return The processes. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcessList getProcesses() { + return processes_ == null + ? com.google.cloud.migrationcenter.v1.RunningProcessList.getDefaultInstance() + : processes_; + } + /** + * + * + *
+   * Running processes.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcessListOrBuilder getProcessesOrBuilder() { + return processes_ == null + ? com.google.cloud.migrationcenter.v1.RunningProcessList.getDefaultInstance() + : processes_; + } + + public static final int NETWORK_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo network_; + /** + * + * + *
+   * Runtime network information (connections, ports).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return network_ != null; + } + /** + * + * + *
+   * Runtime network information (connections, ports).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + * + * @return The network. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo getNetwork() { + return network_ == null + ? com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.getDefaultInstance() + : network_; + } + /** + * + * + *
+   * Runtime network information (connections, ports).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RuntimeNetworkInfoOrBuilder getNetworkOrBuilder() { + return network_ == null + ? com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.getDefaultInstance() + : network_; + } + + public static final int LAST_BOOT_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp lastBootTime_; + /** + * + * + *
+   * Last time the OS was booted.
+   * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + * + * @return Whether the lastBootTime field is set. + */ + @java.lang.Override + public boolean hasLastBootTime() { + return lastBootTime_ != null; + } + /** + * + * + *
+   * Last time the OS was booted.
+   * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + * + * @return The lastBootTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastBootTime() { + return lastBootTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastBootTime_; + } + /** + * + * + *
+   * Last time the OS was booted.
+   * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastBootTimeOrBuilder() { + return lastBootTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastBootTime_; + } + + public static final int DOMAIN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object domain_ = ""; + /** + * + * + *
+   * Domain, e.g. c.stratozone-development.internal.
+   * 
+ * + * string domain = 5; + * + * @return The domain. + */ + @java.lang.Override + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } + } + /** + * + * + *
+   * Domain, e.g. c.stratozone-development.internal.
+   * 
+ * + * string domain = 5; + * + * @return The bytes for domain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineName_ = ""; + /** + * + * + *
+   * Machine name.
+   * 
+ * + * string machine_name = 6; + * + * @return The machineName. + */ + @java.lang.Override + public java.lang.String getMachineName() { + java.lang.Object ref = machineName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineName_ = s; + return s; + } + } + /** + * + * + *
+   * Machine name.
+   * 
+ * + * string machine_name = 6; + * + * @return The bytes for machineName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineNameBytes() { + java.lang.Object ref = machineName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTALLED_APPS_FIELD_NUMBER = 7; + private com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList installedApps_; + /** + * + * + *
+   * Installed applications information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + * @return Whether the installedApps field is set. + */ + @java.lang.Override + public boolean hasInstalledApps() { + return installedApps_ != null; + } + /** + * + * + *
+   * Installed applications information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + * @return The installedApps. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList getInstalledApps() { + return installedApps_ == null + ? com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.getDefaultInstance() + : installedApps_; + } + /** + * + * + *
+   * Installed applications information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestInstalledApplicationListOrBuilder + getInstalledAppsOrBuilder() { + return installedApps_ == null + ? com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.getDefaultInstance() + : installedApps_; + } + + public static final int OPEN_FILE_LIST_FIELD_NUMBER = 8; + private com.google.cloud.migrationcenter.v1.OpenFileList openFileList_; + /** + * + * + *
+   * Open files information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + * + * @return Whether the openFileList field is set. + */ + @java.lang.Override + public boolean hasOpenFileList() { + return openFileList_ != null; + } + /** + * + * + *
+   * Open files information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + * + * @return The openFileList. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileList getOpenFileList() { + return openFileList_ == null + ? com.google.cloud.migrationcenter.v1.OpenFileList.getDefaultInstance() + : openFileList_; + } + /** + * + * + *
+   * Open files information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileListOrBuilder getOpenFileListOrBuilder() { + return openFileList_ == null + ? com.google.cloud.migrationcenter.v1.OpenFileList.getDefaultInstance() + : openFileList_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (services_ != null) { + output.writeMessage(1, getServices()); + } + if (processes_ != null) { + output.writeMessage(2, getProcesses()); + } + if (network_ != null) { + output.writeMessage(3, getNetwork()); + } + if (lastBootTime_ != null) { + output.writeMessage(4, getLastBootTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(domain_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, domain_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, machineName_); + } + if (installedApps_ != null) { + output.writeMessage(7, getInstalledApps()); + } + if (openFileList_ != null) { + output.writeMessage(8, getOpenFileList()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (services_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getServices()); + } + if (processes_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProcesses()); + } + if (network_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNetwork()); + } + if (lastBootTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getLastBootTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(domain_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, domain_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, machineName_); + } + if (installedApps_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getInstalledApps()); + } + if (openFileList_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getOpenFileList()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.GuestRuntimeDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails other = + (com.google.cloud.migrationcenter.v1.GuestRuntimeDetails) obj; + + if (hasServices() != other.hasServices()) return false; + if (hasServices()) { + if (!getServices().equals(other.getServices())) return false; + } + if (hasProcesses() != other.hasProcesses()) return false; + if (hasProcesses()) { + if (!getProcesses().equals(other.getProcesses())) return false; + } + if (hasNetwork() != other.hasNetwork()) return false; + if (hasNetwork()) { + if (!getNetwork().equals(other.getNetwork())) return false; + } + if (hasLastBootTime() != other.hasLastBootTime()) return false; + if (hasLastBootTime()) { + if (!getLastBootTime().equals(other.getLastBootTime())) return false; + } + if (!getDomain().equals(other.getDomain())) return false; + if (!getMachineName().equals(other.getMachineName())) return false; + if (hasInstalledApps() != other.hasInstalledApps()) return false; + if (hasInstalledApps()) { + if (!getInstalledApps().equals(other.getInstalledApps())) return false; + } + if (hasOpenFileList() != other.hasOpenFileList()) return false; + if (hasOpenFileList()) { + if (!getOpenFileList().equals(other.getOpenFileList())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasServices()) { + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getServices().hashCode(); + } + if (hasProcesses()) { + hash = (37 * hash) + PROCESSES_FIELD_NUMBER; + hash = (53 * hash) + getProcesses().hashCode(); + } + if (hasNetwork()) { + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + } + if (hasLastBootTime()) { + hash = (37 * hash) + LAST_BOOT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastBootTime().hashCode(); + } + hash = (37 * hash) + DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getDomain().hashCode(); + hash = (37 * hash) + MACHINE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMachineName().hashCode(); + if (hasInstalledApps()) { + hash = (37 * hash) + INSTALLED_APPS_FIELD_NUMBER; + hash = (53 * hash) + getInstalledApps().hashCode(); + } + if (hasOpenFileList()) { + hash = (37 * hash) + OPEN_FILE_LIST_FIELD_NUMBER; + hash = (53 * hash) + getOpenFileList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Guest OS runtime information.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.GuestRuntimeDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.GuestRuntimeDetails) + com.google.cloud.migrationcenter.v1.GuestRuntimeDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestRuntimeDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestRuntimeDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.class, + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + services_ = null; + if (servicesBuilder_ != null) { + servicesBuilder_.dispose(); + servicesBuilder_ = null; + } + processes_ = null; + if (processesBuilder_ != null) { + processesBuilder_.dispose(); + processesBuilder_ = null; + } + network_ = null; + if (networkBuilder_ != null) { + networkBuilder_.dispose(); + networkBuilder_ = null; + } + lastBootTime_ = null; + if (lastBootTimeBuilder_ != null) { + lastBootTimeBuilder_.dispose(); + lastBootTimeBuilder_ = null; + } + domain_ = ""; + machineName_ = ""; + installedApps_ = null; + if (installedAppsBuilder_ != null) { + installedAppsBuilder_.dispose(); + installedAppsBuilder_ = null; + } + openFileList_ = null; + if (openFileListBuilder_ != null) { + openFileListBuilder_.dispose(); + openFileListBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_GuestRuntimeDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestRuntimeDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestRuntimeDetails build() { + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestRuntimeDetails buildPartial() { + com.google.cloud.migrationcenter.v1.GuestRuntimeDetails result = + new com.google.cloud.migrationcenter.v1.GuestRuntimeDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.GuestRuntimeDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.services_ = servicesBuilder_ == null ? services_ : servicesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.processes_ = processesBuilder_ == null ? processes_ : processesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.network_ = networkBuilder_ == null ? network_ : networkBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.lastBootTime_ = + lastBootTimeBuilder_ == null ? lastBootTime_ : lastBootTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.domain_ = domain_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.machineName_ = machineName_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.installedApps_ = + installedAppsBuilder_ == null ? installedApps_ : installedAppsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.openFileList_ = + openFileListBuilder_ == null ? openFileList_ : openFileListBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.GuestRuntimeDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.GuestRuntimeDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.GuestRuntimeDetails other) { + if (other == com.google.cloud.migrationcenter.v1.GuestRuntimeDetails.getDefaultInstance()) + return this; + if (other.hasServices()) { + mergeServices(other.getServices()); + } + if (other.hasProcesses()) { + mergeProcesses(other.getProcesses()); + } + if (other.hasNetwork()) { + mergeNetwork(other.getNetwork()); + } + if (other.hasLastBootTime()) { + mergeLastBootTime(other.getLastBootTime()); + } + if (!other.getDomain().isEmpty()) { + domain_ = other.domain_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getMachineName().isEmpty()) { + machineName_ = other.machineName_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasInstalledApps()) { + mergeInstalledApps(other.getInstalledApps()); + } + if (other.hasOpenFileList()) { + mergeOpenFileList(other.getOpenFileList()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getServicesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getProcessesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getNetworkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getLastBootTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + domain_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + machineName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getInstalledAppsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getOpenFileListFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.migrationcenter.v1.RunningServiceList services_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningServiceList, + com.google.cloud.migrationcenter.v1.RunningServiceList.Builder, + com.google.cloud.migrationcenter.v1.RunningServiceListOrBuilder> + servicesBuilder_; + /** + * + * + *
+     * Running background services.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + * + * @return Whether the services field is set. + */ + public boolean hasServices() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Running background services.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + * + * @return The services. + */ + public com.google.cloud.migrationcenter.v1.RunningServiceList getServices() { + if (servicesBuilder_ == null) { + return services_ == null + ? com.google.cloud.migrationcenter.v1.RunningServiceList.getDefaultInstance() + : services_; + } else { + return servicesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Running background services.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + */ + public Builder setServices(com.google.cloud.migrationcenter.v1.RunningServiceList value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + services_ = value; + } else { + servicesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Running background services.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + */ + public Builder setServices( + com.google.cloud.migrationcenter.v1.RunningServiceList.Builder builderForValue) { + if (servicesBuilder_ == null) { + services_ = builderForValue.build(); + } else { + servicesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Running background services.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + */ + public Builder mergeServices(com.google.cloud.migrationcenter.v1.RunningServiceList value) { + if (servicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && services_ != null + && services_ + != com.google.cloud.migrationcenter.v1.RunningServiceList.getDefaultInstance()) { + getServicesBuilder().mergeFrom(value); + } else { + services_ = value; + } + } else { + servicesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Running background services.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + */ + public Builder clearServices() { + bitField0_ = (bitField0_ & ~0x00000001); + services_ = null; + if (servicesBuilder_ != null) { + servicesBuilder_.dispose(); + servicesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Running background services.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningServiceList.Builder getServicesBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getServicesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Running background services.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningServiceListOrBuilder getServicesOrBuilder() { + if (servicesBuilder_ != null) { + return servicesBuilder_.getMessageOrBuilder(); + } else { + return services_ == null + ? com.google.cloud.migrationcenter.v1.RunningServiceList.getDefaultInstance() + : services_; + } + } + /** + * + * + *
+     * Running background services.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningServiceList, + com.google.cloud.migrationcenter.v1.RunningServiceList.Builder, + com.google.cloud.migrationcenter.v1.RunningServiceListOrBuilder> + getServicesFieldBuilder() { + if (servicesBuilder_ == null) { + servicesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningServiceList, + com.google.cloud.migrationcenter.v1.RunningServiceList.Builder, + com.google.cloud.migrationcenter.v1.RunningServiceListOrBuilder>( + getServices(), getParentForChildren(), isClean()); + services_ = null; + } + return servicesBuilder_; + } + + private com.google.cloud.migrationcenter.v1.RunningProcessList processes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningProcessList, + com.google.cloud.migrationcenter.v1.RunningProcessList.Builder, + com.google.cloud.migrationcenter.v1.RunningProcessListOrBuilder> + processesBuilder_; + /** + * + * + *
+     * Running processes.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + * + * @return Whether the processes field is set. + */ + public boolean hasProcesses() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Running processes.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + * + * @return The processes. + */ + public com.google.cloud.migrationcenter.v1.RunningProcessList getProcesses() { + if (processesBuilder_ == null) { + return processes_ == null + ? com.google.cloud.migrationcenter.v1.RunningProcessList.getDefaultInstance() + : processes_; + } else { + return processesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Running processes.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + */ + public Builder setProcesses(com.google.cloud.migrationcenter.v1.RunningProcessList value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processes_ = value; + } else { + processesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Running processes.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + */ + public Builder setProcesses( + com.google.cloud.migrationcenter.v1.RunningProcessList.Builder builderForValue) { + if (processesBuilder_ == null) { + processes_ = builderForValue.build(); + } else { + processesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Running processes.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + */ + public Builder mergeProcesses(com.google.cloud.migrationcenter.v1.RunningProcessList value) { + if (processesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && processes_ != null + && processes_ + != com.google.cloud.migrationcenter.v1.RunningProcessList.getDefaultInstance()) { + getProcessesBuilder().mergeFrom(value); + } else { + processes_ = value; + } + } else { + processesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Running processes.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + */ + public Builder clearProcesses() { + bitField0_ = (bitField0_ & ~0x00000002); + processes_ = null; + if (processesBuilder_ != null) { + processesBuilder_.dispose(); + processesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Running processes.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + */ + public com.google.cloud.migrationcenter.v1.RunningProcessList.Builder getProcessesBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getProcessesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Running processes.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + */ + public com.google.cloud.migrationcenter.v1.RunningProcessListOrBuilder getProcessesOrBuilder() { + if (processesBuilder_ != null) { + return processesBuilder_.getMessageOrBuilder(); + } else { + return processes_ == null + ? com.google.cloud.migrationcenter.v1.RunningProcessList.getDefaultInstance() + : processes_; + } + } + /** + * + * + *
+     * Running processes.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningProcessList, + com.google.cloud.migrationcenter.v1.RunningProcessList.Builder, + com.google.cloud.migrationcenter.v1.RunningProcessListOrBuilder> + getProcessesFieldBuilder() { + if (processesBuilder_ == null) { + processesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningProcessList, + com.google.cloud.migrationcenter.v1.RunningProcessList.Builder, + com.google.cloud.migrationcenter.v1.RunningProcessListOrBuilder>( + getProcesses(), getParentForChildren(), isClean()); + processes_ = null; + } + return processesBuilder_; + } + + private com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo network_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo, + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.Builder, + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfoOrBuilder> + networkBuilder_; + /** + * + * + *
+     * Runtime network information (connections, ports).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + * + * @return Whether the network field is set. + */ + public boolean hasNetwork() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Runtime network information (connections, ports).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + * + * @return The network. + */ + public com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo getNetwork() { + if (networkBuilder_ == null) { + return network_ == null + ? com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.getDefaultInstance() + : network_; + } else { + return networkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Runtime network information (connections, ports).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + */ + public Builder setNetwork(com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo value) { + if (networkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + } else { + networkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime network information (connections, ports).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + */ + public Builder setNetwork( + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.Builder builderForValue) { + if (networkBuilder_ == null) { + network_ = builderForValue.build(); + } else { + networkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime network information (connections, ports).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + */ + public Builder mergeNetwork(com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo value) { + if (networkBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && network_ != null + && network_ + != com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.getDefaultInstance()) { + getNetworkBuilder().mergeFrom(value); + } else { + network_ = value; + } + } else { + networkBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime network information (connections, ports).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + */ + public Builder clearNetwork() { + bitField0_ = (bitField0_ & ~0x00000004); + network_ = null; + if (networkBuilder_ != null) { + networkBuilder_.dispose(); + networkBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime network information (connections, ports).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + */ + public com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.Builder getNetworkBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Runtime network information (connections, ports).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + */ + public com.google.cloud.migrationcenter.v1.RuntimeNetworkInfoOrBuilder getNetworkOrBuilder() { + if (networkBuilder_ != null) { + return networkBuilder_.getMessageOrBuilder(); + } else { + return network_ == null + ? com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.getDefaultInstance() + : network_; + } + } + /** + * + * + *
+     * Runtime network information (connections, ports).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo, + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.Builder, + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfoOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + networkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo, + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.Builder, + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfoOrBuilder>( + getNetwork(), getParentForChildren(), isClean()); + network_ = null; + } + return networkBuilder_; + } + + private com.google.protobuf.Timestamp lastBootTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastBootTimeBuilder_; + /** + * + * + *
+     * Last time the OS was booted.
+     * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + * + * @return Whether the lastBootTime field is set. + */ + public boolean hasLastBootTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Last time the OS was booted.
+     * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + * + * @return The lastBootTime. + */ + public com.google.protobuf.Timestamp getLastBootTime() { + if (lastBootTimeBuilder_ == null) { + return lastBootTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastBootTime_; + } else { + return lastBootTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Last time the OS was booted.
+     * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + */ + public Builder setLastBootTime(com.google.protobuf.Timestamp value) { + if (lastBootTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastBootTime_ = value; + } else { + lastBootTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Last time the OS was booted.
+     * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + */ + public Builder setLastBootTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastBootTimeBuilder_ == null) { + lastBootTime_ = builderForValue.build(); + } else { + lastBootTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Last time the OS was booted.
+     * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + */ + public Builder mergeLastBootTime(com.google.protobuf.Timestamp value) { + if (lastBootTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && lastBootTime_ != null + && lastBootTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastBootTimeBuilder().mergeFrom(value); + } else { + lastBootTime_ = value; + } + } else { + lastBootTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Last time the OS was booted.
+     * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + */ + public Builder clearLastBootTime() { + bitField0_ = (bitField0_ & ~0x00000008); + lastBootTime_ = null; + if (lastBootTimeBuilder_ != null) { + lastBootTimeBuilder_.dispose(); + lastBootTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Last time the OS was booted.
+     * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getLastBootTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getLastBootTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Last time the OS was booted.
+     * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getLastBootTimeOrBuilder() { + if (lastBootTimeBuilder_ != null) { + return lastBootTimeBuilder_.getMessageOrBuilder(); + } else { + return lastBootTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastBootTime_; + } + } + /** + * + * + *
+     * Last time the OS was booted.
+     * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastBootTimeFieldBuilder() { + if (lastBootTimeBuilder_ == null) { + lastBootTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastBootTime(), getParentForChildren(), isClean()); + lastBootTime_ = null; + } + return lastBootTimeBuilder_; + } + + private java.lang.Object domain_ = ""; + /** + * + * + *
+     * Domain, e.g. c.stratozone-development.internal.
+     * 
+ * + * string domain = 5; + * + * @return The domain. + */ + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Domain, e.g. c.stratozone-development.internal.
+     * 
+ * + * string domain = 5; + * + * @return The bytes for domain. + */ + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Domain, e.g. c.stratozone-development.internal.
+     * 
+ * + * string domain = 5; + * + * @param value The domain to set. + * @return This builder for chaining. + */ + public Builder setDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + domain_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Domain, e.g. c.stratozone-development.internal.
+     * 
+ * + * string domain = 5; + * + * @return This builder for chaining. + */ + public Builder clearDomain() { + domain_ = getDefaultInstance().getDomain(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Domain, e.g. c.stratozone-development.internal.
+     * 
+ * + * string domain = 5; + * + * @param value The bytes for domain to set. + * @return This builder for chaining. + */ + public Builder setDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + domain_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object machineName_ = ""; + /** + * + * + *
+     * Machine name.
+     * 
+ * + * string machine_name = 6; + * + * @return The machineName. + */ + public java.lang.String getMachineName() { + java.lang.Object ref = machineName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Machine name.
+     * 
+ * + * string machine_name = 6; + * + * @return The bytes for machineName. + */ + public com.google.protobuf.ByteString getMachineNameBytes() { + java.lang.Object ref = machineName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Machine name.
+     * 
+ * + * string machine_name = 6; + * + * @param value The machineName to set. + * @return This builder for chaining. + */ + public Builder setMachineName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Machine name.
+     * 
+ * + * string machine_name = 6; + * + * @return This builder for chaining. + */ + public Builder clearMachineName() { + machineName_ = getDefaultInstance().getMachineName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Machine name.
+     * 
+ * + * string machine_name = 6; + * + * @param value The bytes for machineName to set. + * @return This builder for chaining. + */ + public Builder setMachineNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList installedApps_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList, + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.Builder, + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationListOrBuilder> + installedAppsBuilder_; + /** + * + * + *
+     * Installed applications information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + * + * @return Whether the installedApps field is set. + */ + public boolean hasInstalledApps() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Installed applications information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + * + * @return The installedApps. + */ + public com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList getInstalledApps() { + if (installedAppsBuilder_ == null) { + return installedApps_ == null + ? com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.getDefaultInstance() + : installedApps_; + } else { + return installedAppsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Installed applications information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + */ + public Builder setInstalledApps( + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList value) { + if (installedAppsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + installedApps_ = value; + } else { + installedAppsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Installed applications information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + */ + public Builder setInstalledApps( + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.Builder builderForValue) { + if (installedAppsBuilder_ == null) { + installedApps_ = builderForValue.build(); + } else { + installedAppsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Installed applications information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + */ + public Builder mergeInstalledApps( + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList value) { + if (installedAppsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && installedApps_ != null + && installedApps_ + != com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList + .getDefaultInstance()) { + getInstalledAppsBuilder().mergeFrom(value); + } else { + installedApps_ = value; + } + } else { + installedAppsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Installed applications information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + */ + public Builder clearInstalledApps() { + bitField0_ = (bitField0_ & ~0x00000040); + installedApps_ = null; + if (installedAppsBuilder_ != null) { + installedAppsBuilder_.dispose(); + installedAppsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Installed applications information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + */ + public com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.Builder + getInstalledAppsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getInstalledAppsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Installed applications information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + */ + public com.google.cloud.migrationcenter.v1.GuestInstalledApplicationListOrBuilder + getInstalledAppsOrBuilder() { + if (installedAppsBuilder_ != null) { + return installedAppsBuilder_.getMessageOrBuilder(); + } else { + return installedApps_ == null + ? com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.getDefaultInstance() + : installedApps_; + } + } + /** + * + * + *
+     * Installed applications information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList, + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.Builder, + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationListOrBuilder> + getInstalledAppsFieldBuilder() { + if (installedAppsBuilder_ == null) { + installedAppsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList, + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList.Builder, + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationListOrBuilder>( + getInstalledApps(), getParentForChildren(), isClean()); + installedApps_ = null; + } + return installedAppsBuilder_; + } + + private com.google.cloud.migrationcenter.v1.OpenFileList openFileList_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.OpenFileList, + com.google.cloud.migrationcenter.v1.OpenFileList.Builder, + com.google.cloud.migrationcenter.v1.OpenFileListOrBuilder> + openFileListBuilder_; + /** + * + * + *
+     * Open files information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + * + * @return Whether the openFileList field is set. + */ + public boolean hasOpenFileList() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Open files information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + * + * @return The openFileList. + */ + public com.google.cloud.migrationcenter.v1.OpenFileList getOpenFileList() { + if (openFileListBuilder_ == null) { + return openFileList_ == null + ? com.google.cloud.migrationcenter.v1.OpenFileList.getDefaultInstance() + : openFileList_; + } else { + return openFileListBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Open files information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + */ + public Builder setOpenFileList(com.google.cloud.migrationcenter.v1.OpenFileList value) { + if (openFileListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + openFileList_ = value; + } else { + openFileListBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Open files information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + */ + public Builder setOpenFileList( + com.google.cloud.migrationcenter.v1.OpenFileList.Builder builderForValue) { + if (openFileListBuilder_ == null) { + openFileList_ = builderForValue.build(); + } else { + openFileListBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Open files information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + */ + public Builder mergeOpenFileList(com.google.cloud.migrationcenter.v1.OpenFileList value) { + if (openFileListBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && openFileList_ != null + && openFileList_ + != com.google.cloud.migrationcenter.v1.OpenFileList.getDefaultInstance()) { + getOpenFileListBuilder().mergeFrom(value); + } else { + openFileList_ = value; + } + } else { + openFileListBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Open files information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + */ + public Builder clearOpenFileList() { + bitField0_ = (bitField0_ & ~0x00000080); + openFileList_ = null; + if (openFileListBuilder_ != null) { + openFileListBuilder_.dispose(); + openFileListBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Open files information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + */ + public com.google.cloud.migrationcenter.v1.OpenFileList.Builder getOpenFileListBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getOpenFileListFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Open files information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + */ + public com.google.cloud.migrationcenter.v1.OpenFileListOrBuilder getOpenFileListOrBuilder() { + if (openFileListBuilder_ != null) { + return openFileListBuilder_.getMessageOrBuilder(); + } else { + return openFileList_ == null + ? com.google.cloud.migrationcenter.v1.OpenFileList.getDefaultInstance() + : openFileList_; + } + } + /** + * + * + *
+     * Open files information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.OpenFileList, + com.google.cloud.migrationcenter.v1.OpenFileList.Builder, + com.google.cloud.migrationcenter.v1.OpenFileListOrBuilder> + getOpenFileListFieldBuilder() { + if (openFileListBuilder_ == null) { + openFileListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.OpenFileList, + com.google.cloud.migrationcenter.v1.OpenFileList.Builder, + com.google.cloud.migrationcenter.v1.OpenFileListOrBuilder>( + getOpenFileList(), getParentForChildren(), isClean()); + openFileList_ = null; + } + return openFileListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.GuestRuntimeDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.GuestRuntimeDetails) + private static final com.google.cloud.migrationcenter.v1.GuestRuntimeDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.GuestRuntimeDetails(); + } + + public static com.google.cloud.migrationcenter.v1.GuestRuntimeDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestRuntimeDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestRuntimeDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestRuntimeDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestRuntimeDetailsOrBuilder.java new file mode 100644 index 000000000000..ec4e88549f9a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/GuestRuntimeDetailsOrBuilder.java @@ -0,0 +1,286 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface GuestRuntimeDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.GuestRuntimeDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Running background services.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + * + * @return Whether the services field is set. + */ + boolean hasServices(); + /** + * + * + *
+   * Running background services.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + * + * @return The services. + */ + com.google.cloud.migrationcenter.v1.RunningServiceList getServices(); + /** + * + * + *
+   * Running background services.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + */ + com.google.cloud.migrationcenter.v1.RunningServiceListOrBuilder getServicesOrBuilder(); + + /** + * + * + *
+   * Running processes.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + * + * @return Whether the processes field is set. + */ + boolean hasProcesses(); + /** + * + * + *
+   * Running processes.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + * + * @return The processes. + */ + com.google.cloud.migrationcenter.v1.RunningProcessList getProcesses(); + /** + * + * + *
+   * Running processes.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + */ + com.google.cloud.migrationcenter.v1.RunningProcessListOrBuilder getProcessesOrBuilder(); + + /** + * + * + *
+   * Runtime network information (connections, ports).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * Runtime network information (connections, ports).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + * + * @return The network. + */ + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo getNetwork(); + /** + * + * + *
+   * Runtime network information (connections, ports).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + */ + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfoOrBuilder getNetworkOrBuilder(); + + /** + * + * + *
+   * Last time the OS was booted.
+   * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + * + * @return Whether the lastBootTime field is set. + */ + boolean hasLastBootTime(); + /** + * + * + *
+   * Last time the OS was booted.
+   * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + * + * @return The lastBootTime. + */ + com.google.protobuf.Timestamp getLastBootTime(); + /** + * + * + *
+   * Last time the OS was booted.
+   * 
+ * + * .google.protobuf.Timestamp last_boot_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getLastBootTimeOrBuilder(); + + /** + * + * + *
+   * Domain, e.g. c.stratozone-development.internal.
+   * 
+ * + * string domain = 5; + * + * @return The domain. + */ + java.lang.String getDomain(); + /** + * + * + *
+   * Domain, e.g. c.stratozone-development.internal.
+   * 
+ * + * string domain = 5; + * + * @return The bytes for domain. + */ + com.google.protobuf.ByteString getDomainBytes(); + + /** + * + * + *
+   * Machine name.
+   * 
+ * + * string machine_name = 6; + * + * @return The machineName. + */ + java.lang.String getMachineName(); + /** + * + * + *
+   * Machine name.
+   * 
+ * + * string machine_name = 6; + * + * @return The bytes for machineName. + */ + com.google.protobuf.ByteString getMachineNameBytes(); + + /** + * + * + *
+   * Installed applications information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + * @return Whether the installedApps field is set. + */ + boolean hasInstalledApps(); + /** + * + * + *
+   * Installed applications information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * + * @return The installedApps. + */ + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationList getInstalledApps(); + /** + * + * + *
+   * Installed applications information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + */ + com.google.cloud.migrationcenter.v1.GuestInstalledApplicationListOrBuilder + getInstalledAppsOrBuilder(); + + /** + * + * + *
+   * Open files information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + * + * @return Whether the openFileList field is set. + */ + boolean hasOpenFileList(); + /** + * + * + *
+   * Open files information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + * + * @return The openFileList. + */ + com.google.cloud.migrationcenter.v1.OpenFileList getOpenFileList(); + /** + * + * + *
+   * Open files information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + */ + com.google.cloud.migrationcenter.v1.OpenFileListOrBuilder getOpenFileListOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntry.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntry.java new file mode 100644 index 000000000000..42ebbf679d6f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntry.java @@ -0,0 +1,900 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Single /etc/hosts entry.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.HostsEntry} + */ +public final class HostsEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.HostsEntry) + HostsEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use HostsEntry.newBuilder() to construct. + private HostsEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HostsEntry() { + ip_ = ""; + hostNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HostsEntry(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_HostsEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_HostsEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.HostsEntry.class, + com.google.cloud.migrationcenter.v1.HostsEntry.Builder.class); + } + + public static final int IP_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ip_ = ""; + /** + * + * + *
+   * IP (raw, IPv4/6 agnostic).
+   * 
+ * + * string ip = 1; + * + * @return The ip. + */ + @java.lang.Override + public java.lang.String getIp() { + java.lang.Object ref = ip_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ip_ = s; + return s; + } + } + /** + * + * + *
+   * IP (raw, IPv4/6 agnostic).
+   * 
+ * + * string ip = 1; + * + * @return The bytes for ip. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpBytes() { + java.lang.Object ref = ip_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOST_NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList hostNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * List of host names / aliases.
+   * 
+ * + * repeated string host_names = 2; + * + * @return A list containing the hostNames. + */ + public com.google.protobuf.ProtocolStringList getHostNamesList() { + return hostNames_; + } + /** + * + * + *
+   * List of host names / aliases.
+   * 
+ * + * repeated string host_names = 2; + * + * @return The count of hostNames. + */ + public int getHostNamesCount() { + return hostNames_.size(); + } + /** + * + * + *
+   * List of host names / aliases.
+   * 
+ * + * repeated string host_names = 2; + * + * @param index The index of the element to return. + * @return The hostNames at the given index. + */ + public java.lang.String getHostNames(int index) { + return hostNames_.get(index); + } + /** + * + * + *
+   * List of host names / aliases.
+   * 
+ * + * repeated string host_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the hostNames at the given index. + */ + public com.google.protobuf.ByteString getHostNamesBytes(int index) { + return hostNames_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ip_); + } + for (int i = 0; i < hostNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hostNames_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ip_); + } + { + int dataSize = 0; + for (int i = 0; i < hostNames_.size(); i++) { + dataSize += computeStringSizeNoTag(hostNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getHostNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.HostsEntry)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.HostsEntry other = + (com.google.cloud.migrationcenter.v1.HostsEntry) obj; + + if (!getIp().equals(other.getIp())) return false; + if (!getHostNamesList().equals(other.getHostNamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IP_FIELD_NUMBER; + hash = (53 * hash) + getIp().hashCode(); + if (getHostNamesCount() > 0) { + hash = (37 * hash) + HOST_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getHostNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.HostsEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Single /etc/hosts entry.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.HostsEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.HostsEntry) + com.google.cloud.migrationcenter.v1.HostsEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_HostsEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_HostsEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.HostsEntry.class, + com.google.cloud.migrationcenter.v1.HostsEntry.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.HostsEntry.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ip_ = ""; + hostNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_HostsEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntry getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.HostsEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntry build() { + com.google.cloud.migrationcenter.v1.HostsEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntry buildPartial() { + com.google.cloud.migrationcenter.v1.HostsEntry result = + new com.google.cloud.migrationcenter.v1.HostsEntry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.HostsEntry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ip_ = ip_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + hostNames_.makeImmutable(); + result.hostNames_ = hostNames_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.HostsEntry) { + return mergeFrom((com.google.cloud.migrationcenter.v1.HostsEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.HostsEntry other) { + if (other == com.google.cloud.migrationcenter.v1.HostsEntry.getDefaultInstance()) return this; + if (!other.getIp().isEmpty()) { + ip_ = other.ip_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.hostNames_.isEmpty()) { + if (hostNames_.isEmpty()) { + hostNames_ = other.hostNames_; + bitField0_ |= 0x00000002; + } else { + ensureHostNamesIsMutable(); + hostNames_.addAll(other.hostNames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + ip_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureHostNamesIsMutable(); + hostNames_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object ip_ = ""; + /** + * + * + *
+     * IP (raw, IPv4/6 agnostic).
+     * 
+ * + * string ip = 1; + * + * @return The ip. + */ + public java.lang.String getIp() { + java.lang.Object ref = ip_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ip_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * IP (raw, IPv4/6 agnostic).
+     * 
+ * + * string ip = 1; + * + * @return The bytes for ip. + */ + public com.google.protobuf.ByteString getIpBytes() { + java.lang.Object ref = ip_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * IP (raw, IPv4/6 agnostic).
+     * 
+ * + * string ip = 1; + * + * @param value The ip to set. + * @return This builder for chaining. + */ + public Builder setIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ip_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * IP (raw, IPv4/6 agnostic).
+     * 
+ * + * string ip = 1; + * + * @return This builder for chaining. + */ + public Builder clearIp() { + ip_ = getDefaultInstance().getIp(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * IP (raw, IPv4/6 agnostic).
+     * 
+ * + * string ip = 1; + * + * @param value The bytes for ip to set. + * @return This builder for chaining. + */ + public Builder setIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ip_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList hostNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureHostNamesIsMutable() { + if (!hostNames_.isModifiable()) { + hostNames_ = new com.google.protobuf.LazyStringArrayList(hostNames_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * List of host names / aliases.
+     * 
+ * + * repeated string host_names = 2; + * + * @return A list containing the hostNames. + */ + public com.google.protobuf.ProtocolStringList getHostNamesList() { + hostNames_.makeImmutable(); + return hostNames_; + } + /** + * + * + *
+     * List of host names / aliases.
+     * 
+ * + * repeated string host_names = 2; + * + * @return The count of hostNames. + */ + public int getHostNamesCount() { + return hostNames_.size(); + } + /** + * + * + *
+     * List of host names / aliases.
+     * 
+ * + * repeated string host_names = 2; + * + * @param index The index of the element to return. + * @return The hostNames at the given index. + */ + public java.lang.String getHostNames(int index) { + return hostNames_.get(index); + } + /** + * + * + *
+     * List of host names / aliases.
+     * 
+ * + * repeated string host_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the hostNames at the given index. + */ + public com.google.protobuf.ByteString getHostNamesBytes(int index) { + return hostNames_.getByteString(index); + } + /** + * + * + *
+     * List of host names / aliases.
+     * 
+ * + * repeated string host_names = 2; + * + * @param index The index to set the value at. + * @param value The hostNames to set. + * @return This builder for chaining. + */ + public Builder setHostNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHostNamesIsMutable(); + hostNames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * List of host names / aliases.
+     * 
+ * + * repeated string host_names = 2; + * + * @param value The hostNames to add. + * @return This builder for chaining. + */ + public Builder addHostNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHostNamesIsMutable(); + hostNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * List of host names / aliases.
+     * 
+ * + * repeated string host_names = 2; + * + * @param values The hostNames to add. + * @return This builder for chaining. + */ + public Builder addAllHostNames(java.lang.Iterable values) { + ensureHostNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, hostNames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * List of host names / aliases.
+     * 
+ * + * repeated string host_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearHostNames() { + hostNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * List of host names / aliases.
+     * 
+ * + * repeated string host_names = 2; + * + * @param value The bytes of the hostNames to add. + * @return This builder for chaining. + */ + public Builder addHostNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHostNamesIsMutable(); + hostNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.HostsEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.HostsEntry) + private static final com.google.cloud.migrationcenter.v1.HostsEntry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.HostsEntry(); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HostsEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryList.java new file mode 100644 index 000000000000..26247411f3ff --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryList.java @@ -0,0 +1,937 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Hosts content.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.HostsEntryList} + */ +public final class HostsEntryList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.HostsEntryList) + HostsEntryListOrBuilder { + private static final long serialVersionUID = 0L; + // Use HostsEntryList.newBuilder() to construct. + private HostsEntryList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HostsEntryList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HostsEntryList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_HostsEntryList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_HostsEntryList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.HostsEntryList.class, + com.google.cloud.migrationcenter.v1.HostsEntryList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * Hosts entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Hosts entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Hosts entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Hosts entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntry getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Hosts entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntryOrBuilder getEntriesOrBuilder(int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.HostsEntryList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.HostsEntryList other = + (com.google.cloud.migrationcenter.v1.HostsEntryList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.HostsEntryList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Hosts content.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.HostsEntryList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.HostsEntryList) + com.google.cloud.migrationcenter.v1.HostsEntryListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_HostsEntryList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_HostsEntryList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.HostsEntryList.class, + com.google.cloud.migrationcenter.v1.HostsEntryList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.HostsEntryList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_HostsEntryList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntryList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.HostsEntryList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntryList build() { + com.google.cloud.migrationcenter.v1.HostsEntryList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntryList buildPartial() { + com.google.cloud.migrationcenter.v1.HostsEntryList result = + new com.google.cloud.migrationcenter.v1.HostsEntryList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.HostsEntryList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.HostsEntryList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.HostsEntryList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.HostsEntryList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.HostsEntryList other) { + if (other == com.google.cloud.migrationcenter.v1.HostsEntryList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.HostsEntry m = + input.readMessage( + com.google.cloud.migrationcenter.v1.HostsEntry.parser(), extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.HostsEntry, + com.google.cloud.migrationcenter.v1.HostsEntry.Builder, + com.google.cloud.migrationcenter.v1.HostsEntryOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.HostsEntry getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public Builder setEntries(int index, com.google.cloud.migrationcenter.v1.HostsEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.HostsEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.HostsEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public Builder addEntries(int index, com.google.cloud.migrationcenter.v1.HostsEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.HostsEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.HostsEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.HostsEntry.Builder getEntriesBuilder(int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.HostsEntryOrBuilder getEntriesOrBuilder(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.HostsEntry.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.HostsEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public com.google.cloud.migrationcenter.v1.HostsEntry.Builder addEntriesBuilder(int index) { + return getEntriesFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.HostsEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Hosts entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.HostsEntry, + com.google.cloud.migrationcenter.v1.HostsEntry.Builder, + com.google.cloud.migrationcenter.v1.HostsEntryOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.HostsEntry, + com.google.cloud.migrationcenter.v1.HostsEntry.Builder, + com.google.cloud.migrationcenter.v1.HostsEntryOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.HostsEntryList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.HostsEntryList) + private static final com.google.cloud.migrationcenter.v1.HostsEntryList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.HostsEntryList(); + } + + public static com.google.cloud.migrationcenter.v1.HostsEntryList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HostsEntryList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.HostsEntryList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryListOrBuilder.java new file mode 100644 index 000000000000..44f70e37c758 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface HostsEntryListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.HostsEntryList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Hosts entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Hosts entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + com.google.cloud.migrationcenter.v1.HostsEntry getEntries(int index); + /** + * + * + *
+   * Hosts entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Hosts entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Hosts entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + com.google.cloud.migrationcenter.v1.HostsEntryOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryOrBuilder.java new file mode 100644 index 000000000000..1b3daa90662e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/HostsEntryOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface HostsEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.HostsEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * IP (raw, IPv4/6 agnostic).
+   * 
+ * + * string ip = 1; + * + * @return The ip. + */ + java.lang.String getIp(); + /** + * + * + *
+   * IP (raw, IPv4/6 agnostic).
+   * 
+ * + * string ip = 1; + * + * @return The bytes for ip. + */ + com.google.protobuf.ByteString getIpBytes(); + + /** + * + * + *
+   * List of host names / aliases.
+   * 
+ * + * repeated string host_names = 2; + * + * @return A list containing the hostNames. + */ + java.util.List getHostNamesList(); + /** + * + * + *
+   * List of host names / aliases.
+   * 
+ * + * repeated string host_names = 2; + * + * @return The count of hostNames. + */ + int getHostNamesCount(); + /** + * + * + *
+   * List of host names / aliases.
+   * 
+ * + * repeated string host_names = 2; + * + * @param index The index of the element to return. + * @return The hostNames at the given index. + */ + java.lang.String getHostNames(int index); + /** + * + * + *
+   * List of host names / aliases.
+   * 
+ * + * repeated string host_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the hostNames at the given index. + */ + com.google.protobuf.ByteString getHostNamesBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFile.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFile.java new file mode 100644 index 000000000000..72477ae86960 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFile.java @@ -0,0 +1,1961 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A resource that represents a payload file in an import job.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ImportDataFile} + */ +public final class ImportDataFile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ImportDataFile) + ImportDataFileOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDataFile.newBuilder() to construct. + private ImportDataFile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDataFile() { + name_ = ""; + displayName_ = ""; + format_ = 0; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportDataFile(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportDataFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportDataFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ImportDataFile.class, + com.google.cloud.migrationcenter.v1.ImportDataFile.Builder.class); + } + + /** + * + * + *
+   * Enumerates possible states of an import data file.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.ImportDataFile.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The data file is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The data file completed initialization.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The data file is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * The data file completed initialization.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return ACTIVE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.ImportDataFile.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.ImportDataFile.State) + } + + private int fileInfoCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object fileInfo_; + + public enum FileInfoCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + UPLOAD_FILE_INFO(5), + FILEINFO_NOT_SET(0); + private final int value; + + private FileInfoCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FileInfoCase valueOf(int value) { + return forNumber(value); + } + + public static FileInfoCase forNumber(int value) { + switch (value) { + case 5: + return UPLOAD_FILE_INFO; + case 0: + return FILEINFO_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public FileInfoCase getFileInfoCase() { + return FileInfoCase.forNumber(fileInfoCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The name of the file.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the file.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 6; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 6; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORMAT_FIELD_NUMBER = 2; + private int format_ = 0; + /** + * + * + *
+   * Required. The payload format.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for format. + */ + @java.lang.Override + public int getFormatValue() { + return format_; + } + /** + * + * + *
+   * Required. The payload format.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The format. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJobFormat getFormat() { + com.google.cloud.migrationcenter.v1.ImportJobFormat result = + com.google.cloud.migrationcenter.v1.ImportJobFormat.forNumber(format_); + return result == null + ? com.google.cloud.migrationcenter.v1.ImportJobFormat.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp when the file was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the file was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the file was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + * + * + *
+   * Output only. The state of the import data file.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The state of the import data file.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportDataFile.State getState() { + com.google.cloud.migrationcenter.v1.ImportDataFile.State result = + com.google.cloud.migrationcenter.v1.ImportDataFile.State.forNumber(state_); + return result == null + ? com.google.cloud.migrationcenter.v1.ImportDataFile.State.UNRECOGNIZED + : result; + } + + public static final int UPLOAD_FILE_INFO_FIELD_NUMBER = 5; + /** + * + * + *
+   * Information about a file that is uploaded to a storage service.
+   * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + * + * @return Whether the uploadFileInfo field is set. + */ + @java.lang.Override + public boolean hasUploadFileInfo() { + return fileInfoCase_ == 5; + } + /** + * + * + *
+   * Information about a file that is uploaded to a storage service.
+   * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + * + * @return The uploadFileInfo. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UploadFileInfo getUploadFileInfo() { + if (fileInfoCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.UploadFileInfo) fileInfo_; + } + return com.google.cloud.migrationcenter.v1.UploadFileInfo.getDefaultInstance(); + } + /** + * + * + *
+   * Information about a file that is uploaded to a storage service.
+   * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UploadFileInfoOrBuilder getUploadFileInfoOrBuilder() { + if (fileInfoCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.UploadFileInfo) fileInfo_; + } + return com.google.cloud.migrationcenter.v1.UploadFileInfo.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (format_ + != com.google.cloud.migrationcenter.v1.ImportJobFormat.IMPORT_JOB_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, format_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (state_ + != com.google.cloud.migrationcenter.v1.ImportDataFile.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (fileInfoCase_ == 5) { + output.writeMessage(5, (com.google.cloud.migrationcenter.v1.UploadFileInfo) fileInfo_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, displayName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (format_ + != com.google.cloud.migrationcenter.v1.ImportJobFormat.IMPORT_JOB_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, format_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (state_ + != com.google.cloud.migrationcenter.v1.ImportDataFile.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (fileInfoCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.migrationcenter.v1.UploadFileInfo) fileInfo_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, displayName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ImportDataFile)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ImportDataFile other = + (com.google.cloud.migrationcenter.v1.ImportDataFile) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (format_ != other.format_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (state_ != other.state_) return false; + if (!getFileInfoCase().equals(other.getFileInfoCase())) return false; + switch (fileInfoCase_) { + case 5: + if (!getUploadFileInfo().equals(other.getUploadFileInfo())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + format_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + switch (fileInfoCase_) { + case 5: + hash = (37 * hash) + UPLOAD_FILE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getUploadFileInfo().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.ImportDataFile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that represents a payload file in an import job.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ImportDataFile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ImportDataFile) + com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportDataFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportDataFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ImportDataFile.class, + com.google.cloud.migrationcenter.v1.ImportDataFile.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ImportDataFile.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + format_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + state_ = 0; + if (uploadFileInfoBuilder_ != null) { + uploadFileInfoBuilder_.clear(); + } + fileInfoCase_ = 0; + fileInfo_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportDataFile_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportDataFile getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ImportDataFile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportDataFile build() { + com.google.cloud.migrationcenter.v1.ImportDataFile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportDataFile buildPartial() { + com.google.cloud.migrationcenter.v1.ImportDataFile result = + new com.google.cloud.migrationcenter.v1.ImportDataFile(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ImportDataFile result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.format_ = format_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + } + + private void buildPartialOneofs(com.google.cloud.migrationcenter.v1.ImportDataFile result) { + result.fileInfoCase_ = fileInfoCase_; + result.fileInfo_ = this.fileInfo_; + if (fileInfoCase_ == 5 && uploadFileInfoBuilder_ != null) { + result.fileInfo_ = uploadFileInfoBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ImportDataFile) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ImportDataFile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ImportDataFile other) { + if (other == com.google.cloud.migrationcenter.v1.ImportDataFile.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.format_ != 0) { + setFormatValue(other.getFormatValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + switch (other.getFileInfoCase()) { + case UPLOAD_FILE_INFO: + { + mergeUploadFileInfo(other.getUploadFileInfo()); + break; + } + case FILEINFO_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + format_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 16 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 42: + { + input.readMessage(getUploadFileInfoFieldBuilder().getBuilder(), extensionRegistry); + fileInfoCase_ = 5; + break; + } // case 42 + case 50: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int fileInfoCase_ = 0; + private java.lang.Object fileInfo_; + + public FileInfoCase getFileInfoCase() { + return FileInfoCase.forNumber(fileInfoCase_); + } + + public Builder clearFileInfo() { + fileInfoCase_ = 0; + fileInfo_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The name of the file.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the file.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the file.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the file.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the file.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 6; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 6; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 6; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 6; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 6; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int format_ = 0; + /** + * + * + *
+     * Required. The payload format.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for format. + */ + @java.lang.Override + public int getFormatValue() { + return format_; + } + /** + * + * + *
+     * Required. The payload format.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for format to set. + * @return This builder for chaining. + */ + public Builder setFormatValue(int value) { + format_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The payload format.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The format. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJobFormat getFormat() { + com.google.cloud.migrationcenter.v1.ImportJobFormat result = + com.google.cloud.migrationcenter.v1.ImportJobFormat.forNumber(format_); + return result == null + ? com.google.cloud.migrationcenter.v1.ImportJobFormat.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The payload format.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The format to set. + * @return This builder for chaining. + */ + public Builder setFormat(com.google.cloud.migrationcenter.v1.ImportJobFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + format_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The payload format.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearFormat() { + bitField0_ = (bitField0_ & ~0x00000004); + format_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the file was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the file was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the file was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the file was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the file was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the file was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the file was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the file was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the file was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The state of the import data file.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The state of the import data file.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of the import data file.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportDataFile.State getState() { + com.google.cloud.migrationcenter.v1.ImportDataFile.State result = + com.google.cloud.migrationcenter.v1.ImportDataFile.State.forNumber(state_); + return result == null + ? com.google.cloud.migrationcenter.v1.ImportDataFile.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The state of the import data file.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.migrationcenter.v1.ImportDataFile.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of the import data file.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000010); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.UploadFileInfo, + com.google.cloud.migrationcenter.v1.UploadFileInfo.Builder, + com.google.cloud.migrationcenter.v1.UploadFileInfoOrBuilder> + uploadFileInfoBuilder_; + /** + * + * + *
+     * Information about a file that is uploaded to a storage service.
+     * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + * + * @return Whether the uploadFileInfo field is set. + */ + @java.lang.Override + public boolean hasUploadFileInfo() { + return fileInfoCase_ == 5; + } + /** + * + * + *
+     * Information about a file that is uploaded to a storage service.
+     * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + * + * @return The uploadFileInfo. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UploadFileInfo getUploadFileInfo() { + if (uploadFileInfoBuilder_ == null) { + if (fileInfoCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.UploadFileInfo) fileInfo_; + } + return com.google.cloud.migrationcenter.v1.UploadFileInfo.getDefaultInstance(); + } else { + if (fileInfoCase_ == 5) { + return uploadFileInfoBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.UploadFileInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Information about a file that is uploaded to a storage service.
+     * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + */ + public Builder setUploadFileInfo(com.google.cloud.migrationcenter.v1.UploadFileInfo value) { + if (uploadFileInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fileInfo_ = value; + onChanged(); + } else { + uploadFileInfoBuilder_.setMessage(value); + } + fileInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Information about a file that is uploaded to a storage service.
+     * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + */ + public Builder setUploadFileInfo( + com.google.cloud.migrationcenter.v1.UploadFileInfo.Builder builderForValue) { + if (uploadFileInfoBuilder_ == null) { + fileInfo_ = builderForValue.build(); + onChanged(); + } else { + uploadFileInfoBuilder_.setMessage(builderForValue.build()); + } + fileInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Information about a file that is uploaded to a storage service.
+     * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + */ + public Builder mergeUploadFileInfo(com.google.cloud.migrationcenter.v1.UploadFileInfo value) { + if (uploadFileInfoBuilder_ == null) { + if (fileInfoCase_ == 5 + && fileInfo_ + != com.google.cloud.migrationcenter.v1.UploadFileInfo.getDefaultInstance()) { + fileInfo_ = + com.google.cloud.migrationcenter.v1.UploadFileInfo.newBuilder( + (com.google.cloud.migrationcenter.v1.UploadFileInfo) fileInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + fileInfo_ = value; + } + onChanged(); + } else { + if (fileInfoCase_ == 5) { + uploadFileInfoBuilder_.mergeFrom(value); + } else { + uploadFileInfoBuilder_.setMessage(value); + } + } + fileInfoCase_ = 5; + return this; + } + /** + * + * + *
+     * Information about a file that is uploaded to a storage service.
+     * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + */ + public Builder clearUploadFileInfo() { + if (uploadFileInfoBuilder_ == null) { + if (fileInfoCase_ == 5) { + fileInfoCase_ = 0; + fileInfo_ = null; + onChanged(); + } + } else { + if (fileInfoCase_ == 5) { + fileInfoCase_ = 0; + fileInfo_ = null; + } + uploadFileInfoBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Information about a file that is uploaded to a storage service.
+     * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + */ + public com.google.cloud.migrationcenter.v1.UploadFileInfo.Builder getUploadFileInfoBuilder() { + return getUploadFileInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Information about a file that is uploaded to a storage service.
+     * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UploadFileInfoOrBuilder + getUploadFileInfoOrBuilder() { + if ((fileInfoCase_ == 5) && (uploadFileInfoBuilder_ != null)) { + return uploadFileInfoBuilder_.getMessageOrBuilder(); + } else { + if (fileInfoCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.UploadFileInfo) fileInfo_; + } + return com.google.cloud.migrationcenter.v1.UploadFileInfo.getDefaultInstance(); + } + } + /** + * + * + *
+     * Information about a file that is uploaded to a storage service.
+     * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.UploadFileInfo, + com.google.cloud.migrationcenter.v1.UploadFileInfo.Builder, + com.google.cloud.migrationcenter.v1.UploadFileInfoOrBuilder> + getUploadFileInfoFieldBuilder() { + if (uploadFileInfoBuilder_ == null) { + if (!(fileInfoCase_ == 5)) { + fileInfo_ = com.google.cloud.migrationcenter.v1.UploadFileInfo.getDefaultInstance(); + } + uploadFileInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.UploadFileInfo, + com.google.cloud.migrationcenter.v1.UploadFileInfo.Builder, + com.google.cloud.migrationcenter.v1.UploadFileInfoOrBuilder>( + (com.google.cloud.migrationcenter.v1.UploadFileInfo) fileInfo_, + getParentForChildren(), + isClean()); + fileInfo_ = null; + } + fileInfoCase_ = 5; + onChanged(); + return uploadFileInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ImportDataFile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ImportDataFile) + private static final com.google.cloud.migrationcenter.v1.ImportDataFile DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ImportDataFile(); + } + + public static com.google.cloud.migrationcenter.v1.ImportDataFile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDataFile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportDataFile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFileName.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFileName.java new file mode 100644 index 000000000000..a0e1f7fb0304 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFileName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ImportDataFileName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_IMPORT_JOB_IMPORT_DATA_FILE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/importJobs/{import_job}/importDataFiles/{import_data_file}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String importJob; + private final String importDataFile; + + @Deprecated + protected ImportDataFileName() { + project = null; + location = null; + importJob = null; + importDataFile = null; + } + + private ImportDataFileName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + importJob = Preconditions.checkNotNull(builder.getImportJob()); + importDataFile = Preconditions.checkNotNull(builder.getImportDataFile()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getImportJob() { + return importJob; + } + + public String getImportDataFile() { + return importDataFile; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ImportDataFileName of( + String project, String location, String importJob, String importDataFile) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setImportJob(importJob) + .setImportDataFile(importDataFile) + .build(); + } + + public static String format( + String project, String location, String importJob, String importDataFile) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setImportJob(importJob) + .setImportDataFile(importDataFile) + .build() + .toString(); + } + + public static ImportDataFileName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_IMPORT_JOB_IMPORT_DATA_FILE.validatedMatch( + formattedString, "ImportDataFileName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("import_job"), + matchMap.get("import_data_file")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ImportDataFileName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_IMPORT_JOB_IMPORT_DATA_FILE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (importJob != null) { + fieldMapBuilder.put("import_job", importJob); + } + if (importDataFile != null) { + fieldMapBuilder.put("import_data_file", importDataFile); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_IMPORT_JOB_IMPORT_DATA_FILE.instantiate( + "project", + project, + "location", + location, + "import_job", + importJob, + "import_data_file", + importDataFile); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ImportDataFileName that = ((ImportDataFileName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.importJob, that.importJob) + && Objects.equals(this.importDataFile, that.importDataFile); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(importJob); + h *= 1000003; + h ^= Objects.hashCode(importDataFile); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/importJobs/{import_job}/importDataFiles/{import_data_file}. + */ + public static class Builder { + private String project; + private String location; + private String importJob; + private String importDataFile; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getImportJob() { + return importJob; + } + + public String getImportDataFile() { + return importDataFile; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setImportJob(String importJob) { + this.importJob = importJob; + return this; + } + + public Builder setImportDataFile(String importDataFile) { + this.importDataFile = importDataFile; + return this; + } + + private Builder(ImportDataFileName importDataFileName) { + this.project = importDataFileName.project; + this.location = importDataFileName.location; + this.importJob = importDataFileName.importJob; + this.importDataFile = importDataFileName.importDataFile; + } + + public ImportDataFileName build() { + return new ImportDataFileName(this); + } + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFileOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFileOrBuilder.java new file mode 100644 index 000000000000..1460aafc6c5c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportDataFileOrBuilder.java @@ -0,0 +1,208 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ImportDataFileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ImportDataFile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of the file.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The name of the file.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 6; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 6; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. The payload format.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for format. + */ + int getFormatValue(); + /** + * + * + *
+   * Required. The payload format.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The format. + */ + com.google.cloud.migrationcenter.v1.ImportJobFormat getFormat(); + + /** + * + * + *
+   * Output only. The timestamp when the file was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the file was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the file was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The state of the import data file.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The state of the import data file.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.migrationcenter.v1.ImportDataFile.State getState(); + + /** + * + * + *
+   * Information about a file that is uploaded to a storage service.
+   * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + * + * @return Whether the uploadFileInfo field is set. + */ + boolean hasUploadFileInfo(); + /** + * + * + *
+   * Information about a file that is uploaded to a storage service.
+   * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + * + * @return The uploadFileInfo. + */ + com.google.cloud.migrationcenter.v1.UploadFileInfo getUploadFileInfo(); + /** + * + * + *
+   * Information about a file that is uploaded to a storage service.
+   * 
+ * + * .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + */ + com.google.cloud.migrationcenter.v1.UploadFileInfoOrBuilder getUploadFileInfoOrBuilder(); + + com.google.cloud.migrationcenter.v1.ImportDataFile.FileInfoCase getFileInfoCase(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportError.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportError.java new file mode 100644 index 000000000000..cd9485ed2e4e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportError.java @@ -0,0 +1,897 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A resource that reports the errors encountered while processing an
+ * import job.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ImportError} + */ +public final class ImportError extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ImportError) + ImportErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportError.newBuilder() to construct. + private ImportError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportError() { + errorDetails_ = ""; + severity_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ImportError.class, + com.google.cloud.migrationcenter.v1.ImportError.Builder.class); + } + + /** + * + * + *
+   * Enumerate possible error severity.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.ImportError.Severity} + */ + public enum Severity implements com.google.protobuf.ProtocolMessageEnum { + /** SEVERITY_UNSPECIFIED = 0; */ + SEVERITY_UNSPECIFIED(0), + /** ERROR = 1; */ + ERROR(1), + /** WARNING = 2; */ + WARNING(2), + /** INFO = 3; */ + INFO(3), + UNRECOGNIZED(-1), + ; + + /** SEVERITY_UNSPECIFIED = 0; */ + public static final int SEVERITY_UNSPECIFIED_VALUE = 0; + /** ERROR = 1; */ + public static final int ERROR_VALUE = 1; + /** WARNING = 2; */ + public static final int WARNING_VALUE = 2; + /** INFO = 3; */ + public static final int INFO_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Severity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Severity forNumber(int value) { + switch (value) { + case 0: + return SEVERITY_UNSPECIFIED; + case 1: + return ERROR; + case 2: + return WARNING; + case 3: + return INFO; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Severity findValueByNumber(int number) { + return Severity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.ImportError.getDescriptor().getEnumTypes().get(0); + } + + private static final Severity[] VALUES = values(); + + public static Severity valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Severity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.ImportError.Severity) + } + + public static final int ERROR_DETAILS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object errorDetails_ = ""; + /** + * + * + *
+   * The error information.
+   * 
+ * + * string error_details = 1; + * + * @return The errorDetails. + */ + @java.lang.Override + public java.lang.String getErrorDetails() { + java.lang.Object ref = errorDetails_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorDetails_ = s; + return s; + } + } + /** + * + * + *
+   * The error information.
+   * 
+ * + * string error_details = 1; + * + * @return The bytes for errorDetails. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorDetailsBytes() { + java.lang.Object ref = errorDetails_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorDetails_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEVERITY_FIELD_NUMBER = 2; + private int severity_ = 0; + /** + * + * + *
+   * The severity of the error.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + /** + * + * + *
+   * The severity of the error.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportError.Severity getSeverity() { + com.google.cloud.migrationcenter.v1.ImportError.Severity result = + com.google.cloud.migrationcenter.v1.ImportError.Severity.forNumber(severity_); + return result == null + ? com.google.cloud.migrationcenter.v1.ImportError.Severity.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorDetails_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, errorDetails_); + } + if (severity_ + != com.google.cloud.migrationcenter.v1.ImportError.Severity.SEVERITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, severity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorDetails_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, errorDetails_); + } + if (severity_ + != com.google.cloud.migrationcenter.v1.ImportError.Severity.SEVERITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, severity_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ImportError)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ImportError other = + (com.google.cloud.migrationcenter.v1.ImportError) obj; + + if (!getErrorDetails().equals(other.getErrorDetails())) return false; + if (severity_ != other.severity_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ERROR_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getErrorDetails().hashCode(); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.ImportError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that reports the errors encountered while processing an
+   * import job.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ImportError} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ImportError) + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ImportError.class, + com.google.cloud.migrationcenter.v1.ImportError.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ImportError.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + errorDetails_ = ""; + severity_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportError_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportError getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ImportError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportError build() { + com.google.cloud.migrationcenter.v1.ImportError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportError buildPartial() { + com.google.cloud.migrationcenter.v1.ImportError result = + new com.google.cloud.migrationcenter.v1.ImportError(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ImportError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.errorDetails_ = errorDetails_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.severity_ = severity_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ImportError) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ImportError) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ImportError other) { + if (other == com.google.cloud.migrationcenter.v1.ImportError.getDefaultInstance()) + return this; + if (!other.getErrorDetails().isEmpty()) { + errorDetails_ = other.errorDetails_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + errorDetails_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + severity_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object errorDetails_ = ""; + /** + * + * + *
+     * The error information.
+     * 
+ * + * string error_details = 1; + * + * @return The errorDetails. + */ + public java.lang.String getErrorDetails() { + java.lang.Object ref = errorDetails_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorDetails_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The error information.
+     * 
+ * + * string error_details = 1; + * + * @return The bytes for errorDetails. + */ + public com.google.protobuf.ByteString getErrorDetailsBytes() { + java.lang.Object ref = errorDetails_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorDetails_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The error information.
+     * 
+ * + * string error_details = 1; + * + * @param value The errorDetails to set. + * @return This builder for chaining. + */ + public Builder setErrorDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + errorDetails_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The error information.
+     * 
+ * + * string error_details = 1; + * + * @return This builder for chaining. + */ + public Builder clearErrorDetails() { + errorDetails_ = getDefaultInstance().getErrorDetails(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The error information.
+     * 
+ * + * string error_details = 1; + * + * @param value The bytes for errorDetails to set. + * @return This builder for chaining. + */ + public Builder setErrorDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + errorDetails_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int severity_ = 0; + /** + * + * + *
+     * The severity of the error.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + /** + * + * + *
+     * The severity of the error.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + * + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + severity_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The severity of the error.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportError.Severity getSeverity() { + com.google.cloud.migrationcenter.v1.ImportError.Severity result = + com.google.cloud.migrationcenter.v1.ImportError.Severity.forNumber(severity_); + return result == null + ? com.google.cloud.migrationcenter.v1.ImportError.Severity.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The severity of the error.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + * + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(com.google.cloud.migrationcenter.v1.ImportError.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + severity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The severity of the error.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + * + * @return This builder for chaining. + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000002); + severity_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ImportError) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ImportError) + private static final com.google.cloud.migrationcenter.v1.ImportError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ImportError(); + } + + public static com.google.cloud.migrationcenter.v1.ImportError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportErrorOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportErrorOrBuilder.java new file mode 100644 index 000000000000..1b4f8684c3ef --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportErrorOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ImportErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ImportError) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The error information.
+   * 
+ * + * string error_details = 1; + * + * @return The errorDetails. + */ + java.lang.String getErrorDetails(); + /** + * + * + *
+   * The error information.
+   * 
+ * + * string error_details = 1; + * + * @return The bytes for errorDetails. + */ + com.google.protobuf.ByteString getErrorDetailsBytes(); + + /** + * + * + *
+   * The severity of the error.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + * + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + /** + * + * + *
+   * The severity of the error.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + * + * @return The severity. + */ + com.google.cloud.migrationcenter.v1.ImportError.Severity getSeverity(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJob.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJob.java new file mode 100644 index 000000000000..c35145484441 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJob.java @@ -0,0 +1,3348 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A resource that represents the background job that imports asset frames.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ImportJob} + */ +public final class ImportJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ImportJob) + ImportJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportJob.newBuilder() to construct. + private ImportJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportJob() { + name_ = ""; + displayName_ = ""; + state_ = 0; + assetSource_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportJob(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ImportJob.class, + com.google.cloud.migrationcenter.v1.ImportJob.Builder.class); + } + + /** + * + * + *
+   * Enumerates possible states of an import job.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.ImportJob.ImportJobState} + */ + public enum ImportJobState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * IMPORT_JOB_STATE_UNSPECIFIED = 0; + */ + IMPORT_JOB_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The import job is pending.
+     * 
+ * + * IMPORT_JOB_STATE_PENDING = 1; + */ + IMPORT_JOB_STATE_PENDING(1), + /** + * + * + *
+     * The processing of the import job is ongoing.
+     * 
+ * + * IMPORT_JOB_STATE_RUNNING = 2; + */ + IMPORT_JOB_STATE_RUNNING(2), + /** + * + * + *
+     * The import job processing has completed.
+     * 
+ * + * IMPORT_JOB_STATE_COMPLETED = 3; + */ + IMPORT_JOB_STATE_COMPLETED(3), + /** + * + * + *
+     * The import job failed to be processed.
+     * 
+ * + * IMPORT_JOB_STATE_FAILED = 4; + */ + IMPORT_JOB_STATE_FAILED(4), + /** + * + * + *
+     * The import job is being validated.
+     * 
+ * + * IMPORT_JOB_STATE_VALIDATING = 5; + */ + IMPORT_JOB_STATE_VALIDATING(5), + /** + * + * + *
+     * The import job contains blocking errors.
+     * 
+ * + * IMPORT_JOB_STATE_FAILED_VALIDATION = 6; + */ + IMPORT_JOB_STATE_FAILED_VALIDATION(6), + /** + * + * + *
+     * The validation of the job completed with no blocking errors.
+     * 
+ * + * IMPORT_JOB_STATE_READY = 7; + */ + IMPORT_JOB_STATE_READY(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.
+     * 
+ * + * IMPORT_JOB_STATE_UNSPECIFIED = 0; + */ + public static final int IMPORT_JOB_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The import job is pending.
+     * 
+ * + * IMPORT_JOB_STATE_PENDING = 1; + */ + public static final int IMPORT_JOB_STATE_PENDING_VALUE = 1; + /** + * + * + *
+     * The processing of the import job is ongoing.
+     * 
+ * + * IMPORT_JOB_STATE_RUNNING = 2; + */ + public static final int IMPORT_JOB_STATE_RUNNING_VALUE = 2; + /** + * + * + *
+     * The import job processing has completed.
+     * 
+ * + * IMPORT_JOB_STATE_COMPLETED = 3; + */ + public static final int IMPORT_JOB_STATE_COMPLETED_VALUE = 3; + /** + * + * + *
+     * The import job failed to be processed.
+     * 
+ * + * IMPORT_JOB_STATE_FAILED = 4; + */ + public static final int IMPORT_JOB_STATE_FAILED_VALUE = 4; + /** + * + * + *
+     * The import job is being validated.
+     * 
+ * + * IMPORT_JOB_STATE_VALIDATING = 5; + */ + public static final int IMPORT_JOB_STATE_VALIDATING_VALUE = 5; + /** + * + * + *
+     * The import job contains blocking errors.
+     * 
+ * + * IMPORT_JOB_STATE_FAILED_VALIDATION = 6; + */ + public static final int IMPORT_JOB_STATE_FAILED_VALIDATION_VALUE = 6; + /** + * + * + *
+     * The validation of the job completed with no blocking errors.
+     * 
+ * + * IMPORT_JOB_STATE_READY = 7; + */ + public static final int IMPORT_JOB_STATE_READY_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ImportJobState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ImportJobState forNumber(int value) { + switch (value) { + case 0: + return IMPORT_JOB_STATE_UNSPECIFIED; + case 1: + return IMPORT_JOB_STATE_PENDING; + case 2: + return IMPORT_JOB_STATE_RUNNING; + case 3: + return IMPORT_JOB_STATE_COMPLETED; + case 4: + return IMPORT_JOB_STATE_FAILED; + case 5: + return IMPORT_JOB_STATE_VALIDATING; + case 6: + return IMPORT_JOB_STATE_FAILED_VALIDATION; + case 7: + return IMPORT_JOB_STATE_READY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ImportJobState findValueByNumber(int number) { + return ImportJobState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.ImportJob.getDescriptor().getEnumTypes().get(0); + } + + private static final ImportJobState[] VALUES = values(); + + public static ImportJobState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ImportJobState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.ImportJob.ImportJobState) + } + + private int reportCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object report_; + + public enum ReportCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VALIDATION_REPORT(10), + EXECUTION_REPORT(11), + REPORT_NOT_SET(0); + private final int value; + + private ReportCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ReportCase valueOf(int value) { + return forNumber(value); + } + + public static ReportCase forNumber(int value) { + switch (value) { + case 10: + return VALIDATION_REPORT; + case 11: + return EXECUTION_REPORT; + case 0: + return REPORT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ReportCase getReportCase() { + return ReportCase.forNumber(reportCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The full name of the import job.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The full name of the import job.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp when the import job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the import job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the import job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The timestamp when the import job was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the import job was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the import job was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int COMPLETE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp completeTime_; + /** + * + * + *
+   * Output only. The timestamp when the import job was completed.
+   * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the completeTime field is set. + */ + @java.lang.Override + public boolean hasCompleteTime() { + return completeTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the import job was completed.
+   * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The completeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCompleteTime() { + return completeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : completeTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the import job was completed.
+   * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder() { + return completeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : completeTime_; + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_ = 0; + /** + * + * + *
+   * Output only. The state of the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The state of the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState getState() { + com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState result = + com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState.forNumber(state_); + return result == null + ? com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState.UNRECOGNIZED + : result; + } + + public static final int LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportJob_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ASSET_SOURCE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object assetSource_ = ""; + /** + * + * + *
+   * Required. Reference to a source.
+   * 
+ * + * + * string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The assetSource. + */ + @java.lang.Override + public java.lang.String getAssetSource() { + java.lang.Object ref = assetSource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetSource_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Reference to a source.
+   * 
+ * + * + * string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for assetSource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssetSourceBytes() { + java.lang.Object ref = assetSource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assetSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATION_REPORT_FIELD_NUMBER = 10; + /** + * + * + *
+   * Output only. The report with the validation results of the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the validationReport field is set. + */ + @java.lang.Override + public boolean hasValidationReport() { + return reportCase_ == 10; + } + /** + * + * + *
+   * Output only. The report with the validation results of the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The validationReport. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidationReport getValidationReport() { + if (reportCase_ == 10) { + return (com.google.cloud.migrationcenter.v1.ValidationReport) report_; + } + return com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. The report with the validation results of the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder + getValidationReportOrBuilder() { + if (reportCase_ == 10) { + return (com.google.cloud.migrationcenter.v1.ValidationReport) report_; + } + return com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance(); + } + + public static final int EXECUTION_REPORT_FIELD_NUMBER = 11; + /** + * + * + *
+   * Output only. The report with the results of running the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the executionReport field is set. + */ + @java.lang.Override + public boolean hasExecutionReport() { + return reportCase_ == 11; + } + /** + * + * + *
+   * Output only. The report with the results of running the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The executionReport. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ExecutionReport getExecutionReport() { + if (reportCase_ == 11) { + return (com.google.cloud.migrationcenter.v1.ExecutionReport) report_; + } + return com.google.cloud.migrationcenter.v1.ExecutionReport.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. The report with the results of running the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ExecutionReportOrBuilder + getExecutionReportOrBuilder() { + if (reportCase_ == 11) { + return (com.google.cloud.migrationcenter.v1.ExecutionReport) report_; + } + return com.google.cloud.migrationcenter.v1.ExecutionReport.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (completeTime_ != null) { + output.writeMessage(5, getCompleteTime()); + } + if (state_ + != com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState.IMPORT_JOB_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, state_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetSource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, assetSource_); + } + if (reportCase_ == 10) { + output.writeMessage(10, (com.google.cloud.migrationcenter.v1.ValidationReport) report_); + } + if (reportCase_ == 11) { + output.writeMessage(11, (com.google.cloud.migrationcenter.v1.ExecutionReport) report_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (completeTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCompleteTime()); + } + if (state_ + != com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState.IMPORT_JOB_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetSource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, assetSource_); + } + if (reportCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.migrationcenter.v1.ValidationReport) report_); + } + if (reportCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.migrationcenter.v1.ExecutionReport) report_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ImportJob)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ImportJob other = + (com.google.cloud.migrationcenter.v1.ImportJob) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasCompleteTime() != other.hasCompleteTime()) return false; + if (hasCompleteTime()) { + if (!getCompleteTime().equals(other.getCompleteTime())) return false; + } + if (state_ != other.state_) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getAssetSource().equals(other.getAssetSource())) return false; + if (!getReportCase().equals(other.getReportCase())) return false; + switch (reportCase_) { + case 10: + if (!getValidationReport().equals(other.getValidationReport())) return false; + break; + case 11: + if (!getExecutionReport().equals(other.getExecutionReport())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasCompleteTime()) { + hash = (37 * hash) + COMPLETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCompleteTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + ASSET_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getAssetSource().hashCode(); + switch (reportCase_) { + case 10: + hash = (37 * hash) + VALIDATION_REPORT_FIELD_NUMBER; + hash = (53 * hash) + getValidationReport().hashCode(); + break; + case 11: + hash = (37 * hash) + EXECUTION_REPORT_FIELD_NUMBER; + hash = (53 * hash) + getExecutionReport().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.ImportJob prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that represents the background job that imports asset frames.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ImportJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ImportJob) + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 7: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ImportJob.class, + com.google.cloud.migrationcenter.v1.ImportJob.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ImportJob.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + completeTime_ = null; + if (completeTimeBuilder_ != null) { + completeTimeBuilder_.dispose(); + completeTimeBuilder_ = null; + } + state_ = 0; + internalGetMutableLabels().clear(); + assetSource_ = ""; + if (validationReportBuilder_ != null) { + validationReportBuilder_.clear(); + } + if (executionReportBuilder_ != null) { + executionReportBuilder_.clear(); + } + reportCase_ = 0; + report_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJob getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJob build() { + com.google.cloud.migrationcenter.v1.ImportJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJob buildPartial() { + com.google.cloud.migrationcenter.v1.ImportJob result = + new com.google.cloud.migrationcenter.v1.ImportJob(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ImportJob result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.completeTime_ = + completeTimeBuilder_ == null ? completeTime_ : completeTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.assetSource_ = assetSource_; + } + } + + private void buildPartialOneofs(com.google.cloud.migrationcenter.v1.ImportJob result) { + result.reportCase_ = reportCase_; + result.report_ = this.report_; + if (reportCase_ == 10 && validationReportBuilder_ != null) { + result.report_ = validationReportBuilder_.build(); + } + if (reportCase_ == 11 && executionReportBuilder_ != null) { + result.report_ = executionReportBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ImportJob) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ImportJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ImportJob other) { + if (other == com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasCompleteTime()) { + mergeCompleteTime(other.getCompleteTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + if (!other.getAssetSource().isEmpty()) { + assetSource_ = other.assetSource_; + bitField0_ |= 0x00000080; + onChanged(); + } + switch (other.getReportCase()) { + case VALIDATION_REPORT: + { + mergeValidationReport(other.getValidationReport()); + break; + } + case EXECUTION_REPORT: + { + mergeExecutionReport(other.getExecutionReport()); + break; + } + case REPORT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getCompleteTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + assetSource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 82: + { + input.readMessage( + getValidationReportFieldBuilder().getBuilder(), extensionRegistry); + reportCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage(getExecutionReportFieldBuilder().getBuilder(), extensionRegistry); + reportCase_ = 11; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int reportCase_ = 0; + private java.lang.Object report_; + + public ReportCase getReportCase() { + return ReportCase.forNumber(reportCase_); + } + + public Builder clearReport() { + reportCase_ = 0; + report_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The full name of the import job.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The full name of the import job.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The full name of the import job.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The full name of the import job.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The full name of the import job.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the import job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the import job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the import job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the import job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the import job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the import job was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the import job was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the import job was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the import job was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the import job was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp completeTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + completeTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the import job was completed.
+     * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the completeTime field is set. + */ + public boolean hasCompleteTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the import job was completed.
+     * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The completeTime. + */ + public com.google.protobuf.Timestamp getCompleteTime() { + if (completeTimeBuilder_ == null) { + return completeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : completeTime_; + } else { + return completeTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the import job was completed.
+     * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCompleteTime(com.google.protobuf.Timestamp value) { + if (completeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + completeTime_ = value; + } else { + completeTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was completed.
+     * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCompleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (completeTimeBuilder_ == null) { + completeTime_ = builderForValue.build(); + } else { + completeTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was completed.
+     * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCompleteTime(com.google.protobuf.Timestamp value) { + if (completeTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && completeTime_ != null + && completeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCompleteTimeBuilder().mergeFrom(value); + } else { + completeTime_ = value; + } + } else { + completeTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was completed.
+     * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCompleteTime() { + bitField0_ = (bitField0_ & ~0x00000010); + completeTime_ = null; + if (completeTimeBuilder_ != null) { + completeTimeBuilder_.dispose(); + completeTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the import job was completed.
+     * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCompleteTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCompleteTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the import job was completed.
+     * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder() { + if (completeTimeBuilder_ != null) { + return completeTimeBuilder_.getMessageOrBuilder(); + } else { + return completeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : completeTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the import job was completed.
+     * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCompleteTimeFieldBuilder() { + if (completeTimeBuilder_ == null) { + completeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCompleteTime(), getParentForChildren(), isClean()); + completeTime_ = null; + } + return completeTimeBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The state of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The state of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState getState() { + com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState result = + com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState.forNumber(state_); + return result == null + ? com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The state of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private java.lang.Object assetSource_ = ""; + /** + * + * + *
+     * Required. Reference to a source.
+     * 
+ * + * + * string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The assetSource. + */ + public java.lang.String getAssetSource() { + java.lang.Object ref = assetSource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetSource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Reference to a source.
+     * 
+ * + * + * string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for assetSource. + */ + public com.google.protobuf.ByteString getAssetSourceBytes() { + java.lang.Object ref = assetSource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assetSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Reference to a source.
+     * 
+ * + * + * string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The assetSource to set. + * @return This builder for chaining. + */ + public Builder setAssetSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + assetSource_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Reference to a source.
+     * 
+ * + * + * string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAssetSource() { + assetSource_ = getDefaultInstance().getAssetSource(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Reference to a source.
+     * 
+ * + * + * string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for assetSource to set. + * @return This builder for chaining. + */ + public Builder setAssetSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + assetSource_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ValidationReport, + com.google.cloud.migrationcenter.v1.ValidationReport.Builder, + com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder> + validationReportBuilder_; + /** + * + * + *
+     * Output only. The report with the validation results of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the validationReport field is set. + */ + @java.lang.Override + public boolean hasValidationReport() { + return reportCase_ == 10; + } + /** + * + * + *
+     * Output only. The report with the validation results of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The validationReport. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidationReport getValidationReport() { + if (validationReportBuilder_ == null) { + if (reportCase_ == 10) { + return (com.google.cloud.migrationcenter.v1.ValidationReport) report_; + } + return com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance(); + } else { + if (reportCase_ == 10) { + return validationReportBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. The report with the validation results of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setValidationReport(com.google.cloud.migrationcenter.v1.ValidationReport value) { + if (validationReportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + report_ = value; + onChanged(); + } else { + validationReportBuilder_.setMessage(value); + } + reportCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. The report with the validation results of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setValidationReport( + com.google.cloud.migrationcenter.v1.ValidationReport.Builder builderForValue) { + if (validationReportBuilder_ == null) { + report_ = builderForValue.build(); + onChanged(); + } else { + validationReportBuilder_.setMessage(builderForValue.build()); + } + reportCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. The report with the validation results of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeValidationReport( + com.google.cloud.migrationcenter.v1.ValidationReport value) { + if (validationReportBuilder_ == null) { + if (reportCase_ == 10 + && report_ + != com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance()) { + report_ = + com.google.cloud.migrationcenter.v1.ValidationReport.newBuilder( + (com.google.cloud.migrationcenter.v1.ValidationReport) report_) + .mergeFrom(value) + .buildPartial(); + } else { + report_ = value; + } + onChanged(); + } else { + if (reportCase_ == 10) { + validationReportBuilder_.mergeFrom(value); + } else { + validationReportBuilder_.setMessage(value); + } + } + reportCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. The report with the validation results of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearValidationReport() { + if (validationReportBuilder_ == null) { + if (reportCase_ == 10) { + reportCase_ = 0; + report_ = null; + onChanged(); + } + } else { + if (reportCase_ == 10) { + reportCase_ = 0; + report_ = null; + } + validationReportBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The report with the validation results of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.ValidationReport.Builder + getValidationReportBuilder() { + return getValidationReportFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The report with the validation results of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder + getValidationReportOrBuilder() { + if ((reportCase_ == 10) && (validationReportBuilder_ != null)) { + return validationReportBuilder_.getMessageOrBuilder(); + } else { + if (reportCase_ == 10) { + return (com.google.cloud.migrationcenter.v1.ValidationReport) report_; + } + return com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. The report with the validation results of the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ValidationReport, + com.google.cloud.migrationcenter.v1.ValidationReport.Builder, + com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder> + getValidationReportFieldBuilder() { + if (validationReportBuilder_ == null) { + if (!(reportCase_ == 10)) { + report_ = com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance(); + } + validationReportBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ValidationReport, + com.google.cloud.migrationcenter.v1.ValidationReport.Builder, + com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder>( + (com.google.cloud.migrationcenter.v1.ValidationReport) report_, + getParentForChildren(), + isClean()); + report_ = null; + } + reportCase_ = 10; + onChanged(); + return validationReportBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ExecutionReport, + com.google.cloud.migrationcenter.v1.ExecutionReport.Builder, + com.google.cloud.migrationcenter.v1.ExecutionReportOrBuilder> + executionReportBuilder_; + /** + * + * + *
+     * Output only. The report with the results of running the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the executionReport field is set. + */ + @java.lang.Override + public boolean hasExecutionReport() { + return reportCase_ == 11; + } + /** + * + * + *
+     * Output only. The report with the results of running the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The executionReport. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ExecutionReport getExecutionReport() { + if (executionReportBuilder_ == null) { + if (reportCase_ == 11) { + return (com.google.cloud.migrationcenter.v1.ExecutionReport) report_; + } + return com.google.cloud.migrationcenter.v1.ExecutionReport.getDefaultInstance(); + } else { + if (reportCase_ == 11) { + return executionReportBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.ExecutionReport.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. The report with the results of running the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExecutionReport(com.google.cloud.migrationcenter.v1.ExecutionReport value) { + if (executionReportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + report_ = value; + onChanged(); + } else { + executionReportBuilder_.setMessage(value); + } + reportCase_ = 11; + return this; + } + /** + * + * + *
+     * Output only. The report with the results of running the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExecutionReport( + com.google.cloud.migrationcenter.v1.ExecutionReport.Builder builderForValue) { + if (executionReportBuilder_ == null) { + report_ = builderForValue.build(); + onChanged(); + } else { + executionReportBuilder_.setMessage(builderForValue.build()); + } + reportCase_ = 11; + return this; + } + /** + * + * + *
+     * Output only. The report with the results of running the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExecutionReport(com.google.cloud.migrationcenter.v1.ExecutionReport value) { + if (executionReportBuilder_ == null) { + if (reportCase_ == 11 + && report_ + != com.google.cloud.migrationcenter.v1.ExecutionReport.getDefaultInstance()) { + report_ = + com.google.cloud.migrationcenter.v1.ExecutionReport.newBuilder( + (com.google.cloud.migrationcenter.v1.ExecutionReport) report_) + .mergeFrom(value) + .buildPartial(); + } else { + report_ = value; + } + onChanged(); + } else { + if (reportCase_ == 11) { + executionReportBuilder_.mergeFrom(value); + } else { + executionReportBuilder_.setMessage(value); + } + } + reportCase_ = 11; + return this; + } + /** + * + * + *
+     * Output only. The report with the results of running the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExecutionReport() { + if (executionReportBuilder_ == null) { + if (reportCase_ == 11) { + reportCase_ = 0; + report_ = null; + onChanged(); + } + } else { + if (reportCase_ == 11) { + reportCase_ = 0; + report_ = null; + } + executionReportBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The report with the results of running the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.ExecutionReport.Builder getExecutionReportBuilder() { + return getExecutionReportFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The report with the results of running the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ExecutionReportOrBuilder + getExecutionReportOrBuilder() { + if ((reportCase_ == 11) && (executionReportBuilder_ != null)) { + return executionReportBuilder_.getMessageOrBuilder(); + } else { + if (reportCase_ == 11) { + return (com.google.cloud.migrationcenter.v1.ExecutionReport) report_; + } + return com.google.cloud.migrationcenter.v1.ExecutionReport.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. The report with the results of running the import job.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ExecutionReport, + com.google.cloud.migrationcenter.v1.ExecutionReport.Builder, + com.google.cloud.migrationcenter.v1.ExecutionReportOrBuilder> + getExecutionReportFieldBuilder() { + if (executionReportBuilder_ == null) { + if (!(reportCase_ == 11)) { + report_ = com.google.cloud.migrationcenter.v1.ExecutionReport.getDefaultInstance(); + } + executionReportBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ExecutionReport, + com.google.cloud.migrationcenter.v1.ExecutionReport.Builder, + com.google.cloud.migrationcenter.v1.ExecutionReportOrBuilder>( + (com.google.cloud.migrationcenter.v1.ExecutionReport) report_, + getParentForChildren(), + isClean()); + report_ = null; + } + reportCase_ = 11; + onChanged(); + return executionReportBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ImportJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ImportJob) + private static final com.google.cloud.migrationcenter.v1.ImportJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ImportJob(); + } + + public static com.google.cloud.migrationcenter.v1.ImportJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobFormat.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobFormat.java new file mode 100644 index 000000000000..9c20cbbae40d --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobFormat.java @@ -0,0 +1,256 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Specifies the data formats supported by Migration Center.
+ * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.ImportJobFormat} + */ +public enum ImportJobFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value.
+   * 
+ * + * IMPORT_JOB_FORMAT_UNSPECIFIED = 0; + */ + IMPORT_JOB_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+   * RVTools format (XLSX).
+   * 
+ * + * IMPORT_JOB_FORMAT_RVTOOLS_XLSX = 1; + */ + IMPORT_JOB_FORMAT_RVTOOLS_XLSX(1), + /** + * + * + *
+   * RVTools format (CSV).
+   * 
+ * + * IMPORT_JOB_FORMAT_RVTOOLS_CSV = 2; + */ + IMPORT_JOB_FORMAT_RVTOOLS_CSV(2), + /** + * + * + *
+   * CSV format exported from AWS using the
+   * [AWS collection
+   * script][https://github.com/GoogleCloudPlatform/aws-to-stratozone-export].
+   * 
+ * + * IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV = 4; + */ + IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV(4), + /** + * + * + *
+   * CSV format exported from Azure using the
+   * [Azure collection
+   * script][https://github.com/GoogleCloudPlatform/azure-to-stratozone-export].
+   * 
+ * + * IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV = 5; + */ + IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV(5), + /** + * + * + *
+   * CSV format created manually and following the StratoZone format. For more
+   * information, see [Manually create and upload data
+   * tables][https://cloud.google.com/migrate/stratozone/docs/import-data-portal].
+   * 
+ * + * IMPORT_JOB_FORMAT_STRATOZONE_CSV = 6; + */ + IMPORT_JOB_FORMAT_STRATOZONE_CSV(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default value.
+   * 
+ * + * IMPORT_JOB_FORMAT_UNSPECIFIED = 0; + */ + public static final int IMPORT_JOB_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * RVTools format (XLSX).
+   * 
+ * + * IMPORT_JOB_FORMAT_RVTOOLS_XLSX = 1; + */ + public static final int IMPORT_JOB_FORMAT_RVTOOLS_XLSX_VALUE = 1; + /** + * + * + *
+   * RVTools format (CSV).
+   * 
+ * + * IMPORT_JOB_FORMAT_RVTOOLS_CSV = 2; + */ + public static final int IMPORT_JOB_FORMAT_RVTOOLS_CSV_VALUE = 2; + /** + * + * + *
+   * CSV format exported from AWS using the
+   * [AWS collection
+   * script][https://github.com/GoogleCloudPlatform/aws-to-stratozone-export].
+   * 
+ * + * IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV = 4; + */ + public static final int IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV_VALUE = 4; + /** + * + * + *
+   * CSV format exported from Azure using the
+   * [Azure collection
+   * script][https://github.com/GoogleCloudPlatform/azure-to-stratozone-export].
+   * 
+ * + * IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV = 5; + */ + public static final int IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV_VALUE = 5; + /** + * + * + *
+   * CSV format created manually and following the StratoZone format. For more
+   * information, see [Manually create and upload data
+   * tables][https://cloud.google.com/migrate/stratozone/docs/import-data-portal].
+   * 
+ * + * IMPORT_JOB_FORMAT_STRATOZONE_CSV = 6; + */ + public static final int IMPORT_JOB_FORMAT_STRATOZONE_CSV_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ImportJobFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ImportJobFormat forNumber(int value) { + switch (value) { + case 0: + return IMPORT_JOB_FORMAT_UNSPECIFIED; + case 1: + return IMPORT_JOB_FORMAT_RVTOOLS_XLSX; + case 2: + return IMPORT_JOB_FORMAT_RVTOOLS_CSV; + case 4: + return IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV; + case 5: + return IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV; + case 6: + return IMPORT_JOB_FORMAT_STRATOZONE_CSV; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ImportJobFormat findValueByNumber(int number) { + return ImportJobFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final ImportJobFormat[] VALUES = values(); + + public static ImportJobFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ImportJobFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.ImportJobFormat) +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobName.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobName.java new file mode 100644 index 000000000000..10163f7c0499 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ImportJobName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_IMPORT_JOB = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/importJobs/{import_job}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String importJob; + + @Deprecated + protected ImportJobName() { + project = null; + location = null; + importJob = null; + } + + private ImportJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + importJob = Preconditions.checkNotNull(builder.getImportJob()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getImportJob() { + return importJob; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ImportJobName of(String project, String location, String importJob) { + return newBuilder().setProject(project).setLocation(location).setImportJob(importJob).build(); + } + + public static String format(String project, String location, String importJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setImportJob(importJob) + .build() + .toString(); + } + + public static ImportJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_IMPORT_JOB.validatedMatch( + formattedString, "ImportJobName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("import_job")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ImportJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_IMPORT_JOB.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (importJob != null) { + fieldMapBuilder.put("import_job", importJob); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_IMPORT_JOB.instantiate( + "project", project, "location", location, "import_job", importJob); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ImportJobName that = ((ImportJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.importJob, that.importJob); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(importJob); + return h; + } + + /** Builder for projects/{project}/locations/{location}/importJobs/{import_job}. */ + public static class Builder { + private String project; + private String location; + private String importJob; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getImportJob() { + return importJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setImportJob(String importJob) { + this.importJob = importJob; + return this; + } + + private Builder(ImportJobName importJobName) { + this.project = importJobName.project; + this.location = importJobName.location; + this.importJob = importJobName.importJob; + } + + public ImportJobName build() { + return new ImportJobName(this); + } + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobOrBuilder.java new file mode 100644 index 000000000000..35b8d7a04bd6 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobOrBuilder.java @@ -0,0 +1,392 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ImportJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ImportJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The full name of the import job.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The full name of the import job.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the import job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the import job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the import job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the import job was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the import job was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the import job was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the import job was completed.
+   * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the completeTime field is set. + */ + boolean hasCompleteTime(); + /** + * + * + *
+   * Output only. The timestamp when the import job was completed.
+   * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The completeTime. + */ + com.google.protobuf.Timestamp getCompleteTime(); + /** + * + * + *
+   * Output only. The timestamp when the import job was completed.
+   * 
+ * + * + * .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The state of the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The state of the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.migrationcenter.v1.ImportJob.ImportJobState getState(); + + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 7; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 7; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 7; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. Reference to a source.
+   * 
+ * + * + * string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The assetSource. + */ + java.lang.String getAssetSource(); + /** + * + * + *
+   * Required. Reference to a source.
+   * 
+ * + * + * string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for assetSource. + */ + com.google.protobuf.ByteString getAssetSourceBytes(); + + /** + * + * + *
+   * Output only. The report with the validation results of the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the validationReport field is set. + */ + boolean hasValidationReport(); + /** + * + * + *
+   * Output only. The report with the validation results of the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The validationReport. + */ + com.google.cloud.migrationcenter.v1.ValidationReport getValidationReport(); + /** + * + * + *
+   * Output only. The report with the validation results of the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder getValidationReportOrBuilder(); + + /** + * + * + *
+   * Output only. The report with the results of running the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the executionReport field is set. + */ + boolean hasExecutionReport(); + /** + * + * + *
+   * Output only. The report with the results of running the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The executionReport. + */ + com.google.cloud.migrationcenter.v1.ExecutionReport getExecutionReport(); + /** + * + * + *
+   * Output only. The report with the results of running the import job.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.ExecutionReportOrBuilder getExecutionReportOrBuilder(); + + com.google.cloud.migrationcenter.v1.ImportJob.ReportCase getReportCase(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobView.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobView.java new file mode 100644 index 000000000000..47da2706f80b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportJobView.java @@ -0,0 +1,183 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Specifies the types of import job views that provide complete or partial
+ * details of an import job.
+ * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.ImportJobView} + */ +public enum ImportJobView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The import job view is not specified. The API displays the basic view by
+   * default.
+   * 
+ * + * IMPORT_JOB_VIEW_UNSPECIFIED = 0; + */ + IMPORT_JOB_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * The import job view includes basic metadata of an import job.
+   * This view does not include payload information.
+   * 
+ * + * IMPORT_JOB_VIEW_BASIC = 1; + */ + IMPORT_JOB_VIEW_BASIC(1), + /** + * + * + *
+   * The import job view includes all metadata of an import job.
+   * 
+ * + * IMPORT_JOB_VIEW_FULL = 2; + */ + IMPORT_JOB_VIEW_FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The import job view is not specified. The API displays the basic view by
+   * default.
+   * 
+ * + * IMPORT_JOB_VIEW_UNSPECIFIED = 0; + */ + public static final int IMPORT_JOB_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The import job view includes basic metadata of an import job.
+   * This view does not include payload information.
+   * 
+ * + * IMPORT_JOB_VIEW_BASIC = 1; + */ + public static final int IMPORT_JOB_VIEW_BASIC_VALUE = 1; + /** + * + * + *
+   * The import job view includes all metadata of an import job.
+   * 
+ * + * IMPORT_JOB_VIEW_FULL = 2; + */ + public static final int IMPORT_JOB_VIEW_FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ImportJobView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ImportJobView forNumber(int value) { + switch (value) { + case 0: + return IMPORT_JOB_VIEW_UNSPECIFIED; + case 1: + return IMPORT_JOB_VIEW_BASIC; + case 2: + return IMPORT_JOB_VIEW_FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ImportJobView findValueByNumber(int number) { + return ImportJobView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto.getDescriptor() + .getEnumTypes() + .get(3); + } + + private static final ImportJobView[] VALUES = values(); + + public static ImportJobView valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ImportJobView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.ImportJobView) +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportRowError.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportRowError.java new file mode 100644 index 000000000000..5472fba5e81b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportRowError.java @@ -0,0 +1,1406 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A resource that reports the import job errors at row level.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ImportRowError} + */ +public final class ImportRowError extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ImportRowError) + ImportRowErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportRowError.newBuilder() to construct. + private ImportRowError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportRowError() { + vmName_ = ""; + vmUuid_ = ""; + errors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportRowError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportRowError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportRowError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ImportRowError.class, + com.google.cloud.migrationcenter.v1.ImportRowError.Builder.class); + } + + public static final int ROW_NUMBER_FIELD_NUMBER = 1; + private int rowNumber_ = 0; + /** + * + * + *
+   * The row number where the error was detected.
+   * 
+ * + * int32 row_number = 1 [deprecated = true]; + * + * @deprecated google.cloud.migrationcenter.v1.ImportRowError.row_number is deprecated. See + * google/cloud/migrationcenter/v1/migrationcenter.proto;l=3535 + * @return The rowNumber. + */ + @java.lang.Override + @java.lang.Deprecated + public int getRowNumber() { + return rowNumber_; + } + + public static final int VM_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object vmName_ = ""; + /** + * + * + *
+   * The name of the VM in the row.
+   * 
+ * + * string vm_name = 2; + * + * @return The vmName. + */ + @java.lang.Override + public java.lang.String getVmName() { + java.lang.Object ref = vmName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmName_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the VM in the row.
+   * 
+ * + * string vm_name = 2; + * + * @return The bytes for vmName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmNameBytes() { + java.lang.Object ref = vmName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_UUID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object vmUuid_ = ""; + /** + * + * + *
+   * The VM UUID.
+   * 
+ * + * string vm_uuid = 3; + * + * @return The vmUuid. + */ + @java.lang.Override + public java.lang.String getVmUuid() { + java.lang.Object ref = vmUuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmUuid_ = s; + return s; + } + } + /** + * + * + *
+   * The VM UUID.
+   * 
+ * + * string vm_uuid = 3; + * + * @return The bytes for vmUuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmUuidBytes() { + java.lang.Object ref = vmUuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERRORS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List errors_; + /** + * + * + *
+   * The list of errors detected in the row.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + @java.lang.Override + public java.util.List getErrorsList() { + return errors_; + } + /** + * + * + *
+   * The list of errors detected in the row.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + @java.lang.Override + public java.util.List + getErrorsOrBuilderList() { + return errors_; + } + /** + * + * + *
+   * The list of errors detected in the row.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + @java.lang.Override + public int getErrorsCount() { + return errors_.size(); + } + /** + * + * + *
+   * The list of errors detected in the row.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportError getErrors(int index) { + return errors_.get(index); + } + /** + * + * + *
+   * The list of errors detected in the row.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder getErrorsOrBuilder(int index) { + return errors_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (rowNumber_ != 0) { + output.writeInt32(1, rowNumber_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vmName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmUuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, vmUuid_); + } + for (int i = 0; i < errors_.size(); i++) { + output.writeMessage(4, errors_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rowNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, rowNumber_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vmName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmUuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, vmUuid_); + } + for (int i = 0; i < errors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, errors_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ImportRowError)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ImportRowError other = + (com.google.cloud.migrationcenter.v1.ImportRowError) obj; + + if (getRowNumber() != other.getRowNumber()) return false; + if (!getVmName().equals(other.getVmName())) return false; + if (!getVmUuid().equals(other.getVmUuid())) return false; + if (!getErrorsList().equals(other.getErrorsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ROW_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getRowNumber(); + hash = (37 * hash) + VM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getVmName().hashCode(); + hash = (37 * hash) + VM_UUID_FIELD_NUMBER; + hash = (53 * hash) + getVmUuid().hashCode(); + if (getErrorsCount() > 0) { + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrorsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.ImportRowError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that reports the import job errors at row level.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ImportRowError} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ImportRowError) + com.google.cloud.migrationcenter.v1.ImportRowErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportRowError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportRowError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ImportRowError.class, + com.google.cloud.migrationcenter.v1.ImportRowError.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ImportRowError.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rowNumber_ = 0; + vmName_ = ""; + vmUuid_ = ""; + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + } else { + errors_ = null; + errorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ImportRowError_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportRowError getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ImportRowError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportRowError build() { + com.google.cloud.migrationcenter.v1.ImportRowError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportRowError buildPartial() { + com.google.cloud.migrationcenter.v1.ImportRowError result = + new com.google.cloud.migrationcenter.v1.ImportRowError(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ImportRowError result) { + if (errorsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.errors_ = errors_; + } else { + result.errors_ = errorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ImportRowError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rowNumber_ = rowNumber_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vmName_ = vmName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vmUuid_ = vmUuid_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ImportRowError) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ImportRowError) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ImportRowError other) { + if (other == com.google.cloud.migrationcenter.v1.ImportRowError.getDefaultInstance()) + return this; + if (other.getRowNumber() != 0) { + setRowNumber(other.getRowNumber()); + } + if (!other.getVmName().isEmpty()) { + vmName_ = other.vmName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getVmUuid().isEmpty()) { + vmUuid_ = other.vmUuid_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (errorsBuilder_ == null) { + if (!other.errors_.isEmpty()) { + if (errors_.isEmpty()) { + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureErrorsIsMutable(); + errors_.addAll(other.errors_); + } + onChanged(); + } + } else { + if (!other.errors_.isEmpty()) { + if (errorsBuilder_.isEmpty()) { + errorsBuilder_.dispose(); + errorsBuilder_ = null; + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000008); + errorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorsFieldBuilder() + : null; + } else { + errorsBuilder_.addAllMessages(other.errors_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + rowNumber_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + vmName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + vmUuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.migrationcenter.v1.ImportError m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ImportError.parser(), + extensionRegistry); + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(m); + } else { + errorsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int rowNumber_; + /** + * + * + *
+     * The row number where the error was detected.
+     * 
+ * + * int32 row_number = 1 [deprecated = true]; + * + * @deprecated google.cloud.migrationcenter.v1.ImportRowError.row_number is deprecated. See + * google/cloud/migrationcenter/v1/migrationcenter.proto;l=3535 + * @return The rowNumber. + */ + @java.lang.Override + @java.lang.Deprecated + public int getRowNumber() { + return rowNumber_; + } + /** + * + * + *
+     * The row number where the error was detected.
+     * 
+ * + * int32 row_number = 1 [deprecated = true]; + * + * @deprecated google.cloud.migrationcenter.v1.ImportRowError.row_number is deprecated. See + * google/cloud/migrationcenter/v1/migrationcenter.proto;l=3535 + * @param value The rowNumber to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setRowNumber(int value) { + + rowNumber_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The row number where the error was detected.
+     * 
+ * + * int32 row_number = 1 [deprecated = true]; + * + * @deprecated google.cloud.migrationcenter.v1.ImportRowError.row_number is deprecated. See + * google/cloud/migrationcenter/v1/migrationcenter.proto;l=3535 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearRowNumber() { + bitField0_ = (bitField0_ & ~0x00000001); + rowNumber_ = 0; + onChanged(); + return this; + } + + private java.lang.Object vmName_ = ""; + /** + * + * + *
+     * The name of the VM in the row.
+     * 
+ * + * string vm_name = 2; + * + * @return The vmName. + */ + public java.lang.String getVmName() { + java.lang.Object ref = vmName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the VM in the row.
+     * 
+ * + * string vm_name = 2; + * + * @return The bytes for vmName. + */ + public com.google.protobuf.ByteString getVmNameBytes() { + java.lang.Object ref = vmName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the VM in the row.
+     * 
+ * + * string vm_name = 2; + * + * @param value The vmName to set. + * @return This builder for chaining. + */ + public Builder setVmName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vmName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the VM in the row.
+     * 
+ * + * string vm_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearVmName() { + vmName_ = getDefaultInstance().getVmName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the VM in the row.
+     * 
+ * + * string vm_name = 2; + * + * @param value The bytes for vmName to set. + * @return This builder for chaining. + */ + public Builder setVmNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vmName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object vmUuid_ = ""; + /** + * + * + *
+     * The VM UUID.
+     * 
+ * + * string vm_uuid = 3; + * + * @return The vmUuid. + */ + public java.lang.String getVmUuid() { + java.lang.Object ref = vmUuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmUuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The VM UUID.
+     * 
+ * + * string vm_uuid = 3; + * + * @return The bytes for vmUuid. + */ + public com.google.protobuf.ByteString getVmUuidBytes() { + java.lang.Object ref = vmUuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The VM UUID.
+     * 
+ * + * string vm_uuid = 3; + * + * @param value The vmUuid to set. + * @return This builder for chaining. + */ + public Builder setVmUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vmUuid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The VM UUID.
+     * 
+ * + * string vm_uuid = 3; + * + * @return This builder for chaining. + */ + public Builder clearVmUuid() { + vmUuid_ = getDefaultInstance().getVmUuid(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The VM UUID.
+     * 
+ * + * string vm_uuid = 3; + * + * @param value The bytes for vmUuid to set. + * @return This builder for chaining. + */ + public Builder setVmUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vmUuid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List errors_ = + java.util.Collections.emptyList(); + + private void ensureErrorsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + errors_ = new java.util.ArrayList(errors_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportError, + com.google.cloud.migrationcenter.v1.ImportError.Builder, + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder> + errorsBuilder_; + + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public java.util.List getErrorsList() { + if (errorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errors_); + } else { + return errorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public int getErrorsCount() { + if (errorsBuilder_ == null) { + return errors_.size(); + } else { + return errorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public com.google.cloud.migrationcenter.v1.ImportError getErrors(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public Builder setErrors(int index, com.google.cloud.migrationcenter.v1.ImportError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.set(index, value); + onChanged(); + } else { + errorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public Builder setErrors( + int index, com.google.cloud.migrationcenter.v1.ImportError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.set(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public Builder addErrors(com.google.cloud.migrationcenter.v1.ImportError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(value); + onChanged(); + } else { + errorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public Builder addErrors(int index, com.google.cloud.migrationcenter.v1.ImportError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(index, value); + onChanged(); + } else { + errorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public Builder addErrors( + com.google.cloud.migrationcenter.v1.ImportError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public Builder addErrors( + int index, com.google.cloud.migrationcenter.v1.ImportError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public Builder addAllErrors( + java.lang.Iterable values) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errors_); + onChanged(); + } else { + errorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public Builder clearErrors() { + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + errorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public Builder removeErrors(int index) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.remove(index); + onChanged(); + } else { + errorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public com.google.cloud.migrationcenter.v1.ImportError.Builder getErrorsBuilder(int index) { + return getErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder getErrorsOrBuilder(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public java.util.List + getErrorsOrBuilderList() { + if (errorsBuilder_ != null) { + return errorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errors_); + } + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public com.google.cloud.migrationcenter.v1.ImportError.Builder addErrorsBuilder() { + return getErrorsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.ImportError.getDefaultInstance()); + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public com.google.cloud.migrationcenter.v1.ImportError.Builder addErrorsBuilder(int index) { + return getErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.ImportError.getDefaultInstance()); + } + /** + * + * + *
+     * The list of errors detected in the row.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + public java.util.List + getErrorsBuilderList() { + return getErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportError, + com.google.cloud.migrationcenter.v1.ImportError.Builder, + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder> + getErrorsFieldBuilder() { + if (errorsBuilder_ == null) { + errorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportError, + com.google.cloud.migrationcenter.v1.ImportError.Builder, + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder>( + errors_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + errors_ = null; + } + return errorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ImportRowError) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ImportRowError) + private static final com.google.cloud.migrationcenter.v1.ImportRowError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ImportRowError(); + } + + public static com.google.cloud.migrationcenter.v1.ImportRowError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportRowError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportRowError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportRowErrorOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportRowErrorOrBuilder.java new file mode 100644 index 000000000000..80bcdeed2142 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ImportRowErrorOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ImportRowErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ImportRowError) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The row number where the error was detected.
+   * 
+ * + * int32 row_number = 1 [deprecated = true]; + * + * @deprecated google.cloud.migrationcenter.v1.ImportRowError.row_number is deprecated. See + * google/cloud/migrationcenter/v1/migrationcenter.proto;l=3535 + * @return The rowNumber. + */ + @java.lang.Deprecated + int getRowNumber(); + + /** + * + * + *
+   * The name of the VM in the row.
+   * 
+ * + * string vm_name = 2; + * + * @return The vmName. + */ + java.lang.String getVmName(); + /** + * + * + *
+   * The name of the VM in the row.
+   * 
+ * + * string vm_name = 2; + * + * @return The bytes for vmName. + */ + com.google.protobuf.ByteString getVmNameBytes(); + + /** + * + * + *
+   * The VM UUID.
+   * 
+ * + * string vm_uuid = 3; + * + * @return The vmUuid. + */ + java.lang.String getVmUuid(); + /** + * + * + *
+   * The VM UUID.
+   * 
+ * + * string vm_uuid = 3; + * + * @return The bytes for vmUuid. + */ + com.google.protobuf.ByteString getVmUuidBytes(); + + /** + * + * + *
+   * The list of errors detected in the row.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + java.util.List getErrorsList(); + /** + * + * + *
+   * The list of errors detected in the row.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + com.google.cloud.migrationcenter.v1.ImportError getErrors(int index); + /** + * + * + *
+   * The list of errors detected in the row.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + int getErrorsCount(); + /** + * + * + *
+   * The list of errors detected in the row.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + java.util.List + getErrorsOrBuilderList(); + /** + * + * + *
+   * The list of errors detected in the row.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder getErrorsOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Insight.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Insight.java new file mode 100644 index 000000000000..403f5f413fb8 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Insight.java @@ -0,0 +1,845 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * An insight about an asset.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Insight} + */ +public final class Insight extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Insight) + InsightOrBuilder { + private static final long serialVersionUID = 0L; + // Use Insight.newBuilder() to construct. + private Insight(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Insight() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Insight(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Insight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Insight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Insight.class, + com.google.cloud.migrationcenter.v1.Insight.Builder.class); + } + + private int insightCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object insight_; + + public enum InsightCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MIGRATION_INSIGHT(1), + INSIGHT_NOT_SET(0); + private final int value; + + private InsightCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InsightCase valueOf(int value) { + return forNumber(value); + } + + public static InsightCase forNumber(int value) { + switch (value) { + case 1: + return MIGRATION_INSIGHT; + case 0: + return INSIGHT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InsightCase getInsightCase() { + return InsightCase.forNumber(insightCase_); + } + + public static final int MIGRATION_INSIGHT_FIELD_NUMBER = 1; + /** + * + * + *
+   * Output only. An insight about potential migrations for an asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the migrationInsight field is set. + */ + @java.lang.Override + public boolean hasMigrationInsight() { + return insightCase_ == 1; + } + /** + * + * + *
+   * Output only. An insight about potential migrations for an asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The migrationInsight. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MigrationInsight getMigrationInsight() { + if (insightCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.MigrationInsight) insight_; + } + return com.google.cloud.migrationcenter.v1.MigrationInsight.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. An insight about potential migrations for an asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MigrationInsightOrBuilder + getMigrationInsightOrBuilder() { + if (insightCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.MigrationInsight) insight_; + } + return com.google.cloud.migrationcenter.v1.MigrationInsight.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (insightCase_ == 1) { + output.writeMessage(1, (com.google.cloud.migrationcenter.v1.MigrationInsight) insight_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (insightCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.migrationcenter.v1.MigrationInsight) insight_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Insight)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Insight other = + (com.google.cloud.migrationcenter.v1.Insight) obj; + + if (!getInsightCase().equals(other.getInsightCase())) return false; + switch (insightCase_) { + case 1: + if (!getMigrationInsight().equals(other.getMigrationInsight())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (insightCase_) { + case 1: + hash = (37 * hash) + MIGRATION_INSIGHT_FIELD_NUMBER; + hash = (53 * hash) + getMigrationInsight().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Insight parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Insight parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Insight parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Insight parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Insight parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Insight parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Insight parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Insight parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Insight parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Insight parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Insight parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Insight parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.Insight prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An insight about an asset.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Insight} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Insight) + com.google.cloud.migrationcenter.v1.InsightOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Insight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Insight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Insight.class, + com.google.cloud.migrationcenter.v1.Insight.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Insight.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (migrationInsightBuilder_ != null) { + migrationInsightBuilder_.clear(); + } + insightCase_ = 0; + insight_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Insight_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Insight getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Insight.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Insight build() { + com.google.cloud.migrationcenter.v1.Insight result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Insight buildPartial() { + com.google.cloud.migrationcenter.v1.Insight result = + new com.google.cloud.migrationcenter.v1.Insight(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.Insight result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.migrationcenter.v1.Insight result) { + result.insightCase_ = insightCase_; + result.insight_ = this.insight_; + if (insightCase_ == 1 && migrationInsightBuilder_ != null) { + result.insight_ = migrationInsightBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Insight) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Insight) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Insight other) { + if (other == com.google.cloud.migrationcenter.v1.Insight.getDefaultInstance()) return this; + switch (other.getInsightCase()) { + case MIGRATION_INSIGHT: + { + mergeMigrationInsight(other.getMigrationInsight()); + break; + } + case INSIGHT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getMigrationInsightFieldBuilder().getBuilder(), extensionRegistry); + insightCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int insightCase_ = 0; + private java.lang.Object insight_; + + public InsightCase getInsightCase() { + return InsightCase.forNumber(insightCase_); + } + + public Builder clearInsight() { + insightCase_ = 0; + insight_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MigrationInsight, + com.google.cloud.migrationcenter.v1.MigrationInsight.Builder, + com.google.cloud.migrationcenter.v1.MigrationInsightOrBuilder> + migrationInsightBuilder_; + /** + * + * + *
+     * Output only. An insight about potential migrations for an asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the migrationInsight field is set. + */ + @java.lang.Override + public boolean hasMigrationInsight() { + return insightCase_ == 1; + } + /** + * + * + *
+     * Output only. An insight about potential migrations for an asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The migrationInsight. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MigrationInsight getMigrationInsight() { + if (migrationInsightBuilder_ == null) { + if (insightCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.MigrationInsight) insight_; + } + return com.google.cloud.migrationcenter.v1.MigrationInsight.getDefaultInstance(); + } else { + if (insightCase_ == 1) { + return migrationInsightBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.MigrationInsight.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. An insight about potential migrations for an asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMigrationInsight(com.google.cloud.migrationcenter.v1.MigrationInsight value) { + if (migrationInsightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + insight_ = value; + onChanged(); + } else { + migrationInsightBuilder_.setMessage(value); + } + insightCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. An insight about potential migrations for an asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMigrationInsight( + com.google.cloud.migrationcenter.v1.MigrationInsight.Builder builderForValue) { + if (migrationInsightBuilder_ == null) { + insight_ = builderForValue.build(); + onChanged(); + } else { + migrationInsightBuilder_.setMessage(builderForValue.build()); + } + insightCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. An insight about potential migrations for an asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMigrationInsight( + com.google.cloud.migrationcenter.v1.MigrationInsight value) { + if (migrationInsightBuilder_ == null) { + if (insightCase_ == 1 + && insight_ + != com.google.cloud.migrationcenter.v1.MigrationInsight.getDefaultInstance()) { + insight_ = + com.google.cloud.migrationcenter.v1.MigrationInsight.newBuilder( + (com.google.cloud.migrationcenter.v1.MigrationInsight) insight_) + .mergeFrom(value) + .buildPartial(); + } else { + insight_ = value; + } + onChanged(); + } else { + if (insightCase_ == 1) { + migrationInsightBuilder_.mergeFrom(value); + } else { + migrationInsightBuilder_.setMessage(value); + } + } + insightCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. An insight about potential migrations for an asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMigrationInsight() { + if (migrationInsightBuilder_ == null) { + if (insightCase_ == 1) { + insightCase_ = 0; + insight_ = null; + onChanged(); + } + } else { + if (insightCase_ == 1) { + insightCase_ = 0; + insight_ = null; + } + migrationInsightBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. An insight about potential migrations for an asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.MigrationInsight.Builder + getMigrationInsightBuilder() { + return getMigrationInsightFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. An insight about potential migrations for an asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MigrationInsightOrBuilder + getMigrationInsightOrBuilder() { + if ((insightCase_ == 1) && (migrationInsightBuilder_ != null)) { + return migrationInsightBuilder_.getMessageOrBuilder(); + } else { + if (insightCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.MigrationInsight) insight_; + } + return com.google.cloud.migrationcenter.v1.MigrationInsight.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. An insight about potential migrations for an asset.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MigrationInsight, + com.google.cloud.migrationcenter.v1.MigrationInsight.Builder, + com.google.cloud.migrationcenter.v1.MigrationInsightOrBuilder> + getMigrationInsightFieldBuilder() { + if (migrationInsightBuilder_ == null) { + if (!(insightCase_ == 1)) { + insight_ = com.google.cloud.migrationcenter.v1.MigrationInsight.getDefaultInstance(); + } + migrationInsightBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MigrationInsight, + com.google.cloud.migrationcenter.v1.MigrationInsight.Builder, + com.google.cloud.migrationcenter.v1.MigrationInsightOrBuilder>( + (com.google.cloud.migrationcenter.v1.MigrationInsight) insight_, + getParentForChildren(), + isClean()); + insight_ = null; + } + insightCase_ = 1; + onChanged(); + return migrationInsightBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Insight) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Insight) + private static final com.google.cloud.migrationcenter.v1.Insight DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Insight(); + } + + public static com.google.cloud.migrationcenter.v1.Insight getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Insight parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Insight getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightList.java new file mode 100644 index 000000000000..8ebdb621423a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightList.java @@ -0,0 +1,1263 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Message containing insights list.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.InsightList} + */ +public final class InsightList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.InsightList) + InsightListOrBuilder { + private static final long serialVersionUID = 0L; + // Use InsightList.newBuilder() to construct. + private InsightList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InsightList() { + insights_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InsightList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_InsightList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_InsightList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.InsightList.class, + com.google.cloud.migrationcenter.v1.InsightList.Builder.class); + } + + public static final int INSIGHTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List insights_; + /** + * + * + *
+   * Output only. Insights of the list.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getInsightsList() { + return insights_; + } + /** + * + * + *
+   * Output only. Insights of the list.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getInsightsOrBuilderList() { + return insights_; + } + /** + * + * + *
+   * Output only. Insights of the list.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getInsightsCount() { + return insights_.size(); + } + /** + * + * + *
+   * Output only. Insights of the list.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Insight getInsights(int index) { + return insights_.get(index); + } + /** + * + * + *
+   * Output only. Insights of the list.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.InsightOrBuilder getInsightsOrBuilder(int index) { + return insights_.get(index); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < insights_.size(); i++) { + output.writeMessage(1, insights_.get(i)); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < insights_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, insights_.get(i)); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.InsightList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.InsightList other = + (com.google.cloud.migrationcenter.v1.InsightList) obj; + + if (!getInsightsList().equals(other.getInsightsList())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInsightsCount() > 0) { + hash = (37 * hash) + INSIGHTS_FIELD_NUMBER; + hash = (53 * hash) + getInsightsList().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.InsightList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.InsightList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message containing insights list.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.InsightList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.InsightList) + com.google.cloud.migrationcenter.v1.InsightListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_InsightList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_InsightList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.InsightList.class, + com.google.cloud.migrationcenter.v1.InsightList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.InsightList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (insightsBuilder_ == null) { + insights_ = java.util.Collections.emptyList(); + } else { + insights_ = null; + insightsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_InsightList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.InsightList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.InsightList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.InsightList build() { + com.google.cloud.migrationcenter.v1.InsightList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.InsightList buildPartial() { + com.google.cloud.migrationcenter.v1.InsightList result = + new com.google.cloud.migrationcenter.v1.InsightList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.InsightList result) { + if (insightsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + insights_ = java.util.Collections.unmodifiableList(insights_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.insights_ = insights_; + } else { + result.insights_ = insightsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.InsightList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.InsightList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.InsightList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.InsightList other) { + if (other == com.google.cloud.migrationcenter.v1.InsightList.getDefaultInstance()) + return this; + if (insightsBuilder_ == null) { + if (!other.insights_.isEmpty()) { + if (insights_.isEmpty()) { + insights_ = other.insights_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInsightsIsMutable(); + insights_.addAll(other.insights_); + } + onChanged(); + } + } else { + if (!other.insights_.isEmpty()) { + if (insightsBuilder_.isEmpty()) { + insightsBuilder_.dispose(); + insightsBuilder_ = null; + insights_ = other.insights_; + bitField0_ = (bitField0_ & ~0x00000001); + insightsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInsightsFieldBuilder() + : null; + } else { + insightsBuilder_.addAllMessages(other.insights_); + } + } + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.Insight m = + input.readMessage( + com.google.cloud.migrationcenter.v1.Insight.parser(), extensionRegistry); + if (insightsBuilder_ == null) { + ensureInsightsIsMutable(); + insights_.add(m); + } else { + insightsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List insights_ = + java.util.Collections.emptyList(); + + private void ensureInsightsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + insights_ = new java.util.ArrayList(insights_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Insight, + com.google.cloud.migrationcenter.v1.Insight.Builder, + com.google.cloud.migrationcenter.v1.InsightOrBuilder> + insightsBuilder_; + + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getInsightsList() { + if (insightsBuilder_ == null) { + return java.util.Collections.unmodifiableList(insights_); + } else { + return insightsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getInsightsCount() { + if (insightsBuilder_ == null) { + return insights_.size(); + } else { + return insightsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.Insight getInsights(int index) { + if (insightsBuilder_ == null) { + return insights_.get(index); + } else { + return insightsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInsights(int index, com.google.cloud.migrationcenter.v1.Insight value) { + if (insightsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInsightsIsMutable(); + insights_.set(index, value); + onChanged(); + } else { + insightsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInsights( + int index, com.google.cloud.migrationcenter.v1.Insight.Builder builderForValue) { + if (insightsBuilder_ == null) { + ensureInsightsIsMutable(); + insights_.set(index, builderForValue.build()); + onChanged(); + } else { + insightsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInsights(com.google.cloud.migrationcenter.v1.Insight value) { + if (insightsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInsightsIsMutable(); + insights_.add(value); + onChanged(); + } else { + insightsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInsights(int index, com.google.cloud.migrationcenter.v1.Insight value) { + if (insightsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInsightsIsMutable(); + insights_.add(index, value); + onChanged(); + } else { + insightsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInsights( + com.google.cloud.migrationcenter.v1.Insight.Builder builderForValue) { + if (insightsBuilder_ == null) { + ensureInsightsIsMutable(); + insights_.add(builderForValue.build()); + onChanged(); + } else { + insightsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInsights( + int index, com.google.cloud.migrationcenter.v1.Insight.Builder builderForValue) { + if (insightsBuilder_ == null) { + ensureInsightsIsMutable(); + insights_.add(index, builderForValue.build()); + onChanged(); + } else { + insightsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllInsights( + java.lang.Iterable values) { + if (insightsBuilder_ == null) { + ensureInsightsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, insights_); + onChanged(); + } else { + insightsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearInsights() { + if (insightsBuilder_ == null) { + insights_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + insightsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeInsights(int index) { + if (insightsBuilder_ == null) { + ensureInsightsIsMutable(); + insights_.remove(index); + onChanged(); + } else { + insightsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.Insight.Builder getInsightsBuilder(int index) { + return getInsightsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.InsightOrBuilder getInsightsOrBuilder(int index) { + if (insightsBuilder_ == null) { + return insights_.get(index); + } else { + return insightsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getInsightsOrBuilderList() { + if (insightsBuilder_ != null) { + return insightsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(insights_); + } + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.Insight.Builder addInsightsBuilder() { + return getInsightsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.Insight.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.Insight.Builder addInsightsBuilder(int index) { + return getInsightsFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.Insight.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Insights of the list.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getInsightsBuilderList() { + return getInsightsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Insight, + com.google.cloud.migrationcenter.v1.Insight.Builder, + com.google.cloud.migrationcenter.v1.InsightOrBuilder> + getInsightsFieldBuilder() { + if (insightsBuilder_ == null) { + insightsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Insight, + com.google.cloud.migrationcenter.v1.Insight.Builder, + com.google.cloud.migrationcenter.v1.InsightOrBuilder>( + insights_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + insights_ = null; + } + return insightsBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.InsightList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.InsightList) + private static final com.google.cloud.migrationcenter.v1.InsightList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.InsightList(); + } + + public static com.google.cloud.migrationcenter.v1.InsightList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InsightList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.InsightList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightListOrBuilder.java new file mode 100644 index 000000000000..8ed82755b6a6 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightListOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface InsightListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.InsightList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Insights of the list.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getInsightsList(); + /** + * + * + *
+   * Output only. Insights of the list.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.Insight getInsights(int index); + /** + * + * + *
+   * Output only. Insights of the list.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getInsightsCount(); + /** + * + * + *
+   * Output only. Insights of the list.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getInsightsOrBuilderList(); + /** + * + * + *
+   * Output only. Insights of the list.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.InsightOrBuilder getInsightsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightOrBuilder.java new file mode 100644 index 000000000000..f9283fea1778 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/InsightOrBuilder.java @@ -0,0 +1,68 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface InsightOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Insight) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. An insight about potential migrations for an asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the migrationInsight field is set. + */ + boolean hasMigrationInsight(); + /** + * + * + *
+   * Output only. An insight about potential migrations for an asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The migrationInsight. + */ + com.google.cloud.migrationcenter.v1.MigrationInsight getMigrationInsight(); + /** + * + * + *
+   * Output only. An insight about potential migrations for an asset.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.MigrationInsightOrBuilder getMigrationInsightOrBuilder(); + + com.google.cloud.migrationcenter.v1.Insight.InsightCase getInsightCase(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/LicenseType.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/LicenseType.java new file mode 100644 index 000000000000..c6cd72454529 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/LicenseType.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * The License type for premium images (RHEL, RHEL for SAP, SLES, SLES for SAP,
+ * Windows Server).
+ * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.LicenseType} + */ +public enum LicenseType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified (default value).
+   * 
+ * + * LICENSE_TYPE_UNSPECIFIED = 0; + */ + LICENSE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Default Google Cloud licensing plan. Licensing is charged per usage.
+   * This a good value to start with.
+   * 
+ * + * LICENSE_TYPE_DEFAULT = 1; + */ + LICENSE_TYPE_DEFAULT(1), + /** + * + * + *
+   * Bring-your-own-license (BYOL) plan. User provides the OS license.
+   * 
+ * + * LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2; + */ + LICENSE_TYPE_BRING_YOUR_OWN_LICENSE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified (default value).
+   * 
+ * + * LICENSE_TYPE_UNSPECIFIED = 0; + */ + public static final int LICENSE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Default Google Cloud licensing plan. Licensing is charged per usage.
+   * This a good value to start with.
+   * 
+ * + * LICENSE_TYPE_DEFAULT = 1; + */ + public static final int LICENSE_TYPE_DEFAULT_VALUE = 1; + /** + * + * + *
+   * Bring-your-own-license (BYOL) plan. User provides the OS license.
+   * 
+ * + * LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2; + */ + public static final int LICENSE_TYPE_BRING_YOUR_OWN_LICENSE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LicenseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LicenseType forNumber(int value) { + switch (value) { + case 0: + return LICENSE_TYPE_UNSPECIFIED; + case 1: + return LICENSE_TYPE_DEFAULT; + case 2: + return LICENSE_TYPE_BRING_YOUR_OWN_LICENSE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LicenseType findValueByNumber(int number) { + return LicenseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto.getDescriptor() + .getEnumTypes() + .get(6); + } + + private static final LicenseType[] VALUES = values(); + + public static LicenseType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LicenseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.LicenseType) +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsRequest.java new file mode 100644 index 000000000000..2ad0a6489c4a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsRequest.java @@ -0,0 +1,1430 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Message for requesting a list of assets.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListAssetsRequest} + */ +public final class ListAssetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListAssetsRequest) + ListAssetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAssetsRequest.newBuilder() to construct. + private ListAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAssetsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAssetsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListAssetsRequest.class, + com.google.cloud.migrationcenter.v1.ListAssetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for `ListAssetsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for `ListAssetsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 6; + private int view_ = 0; + /** + * + * + *
+   * View of the assets. Defaults to BASIC.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 6; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * View of the assets. Defaults to BASIC.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 6; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetView getView() { + com.google.cloud.migrationcenter.v1.AssetView result = + com.google.cloud.migrationcenter.v1.AssetView.forNumber(view_); + return result == null ? com.google.cloud.migrationcenter.v1.AssetView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + if (view_ != com.google.cloud.migrationcenter.v1.AssetView.ASSET_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(6, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + if (view_ != com.google.cloud.migrationcenter.v1.AssetView.ASSET_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListAssetsRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListAssetsRequest other = + (com.google.cloud.migrationcenter.v1.ListAssetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListAssetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message for requesting a list of assets.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListAssetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListAssetsRequest) + com.google.cloud.migrationcenter.v1.ListAssetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListAssetsRequest.class, + com.google.cloud.migrationcenter.v1.ListAssetsRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListAssetsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListAssetsRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListAssetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListAssetsRequest build() { + com.google.cloud.migrationcenter.v1.ListAssetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListAssetsRequest buildPartial() { + com.google.cloud.migrationcenter.v1.ListAssetsRequest result = + new com.google.cloud.migrationcenter.v1.ListAssetsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListAssetsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListAssetsRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListAssetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListAssetsRequest other) { + if (other == com.google.cloud.migrationcenter.v1.ListAssetsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for `ListAssetsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListAssetsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListAssetsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListAssetsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListAssetsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * View of the assets. Defaults to BASIC.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 6; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * View of the assets. Defaults to BASIC.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 6; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * View of the assets. Defaults to BASIC.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 6; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetView getView() { + com.google.cloud.migrationcenter.v1.AssetView result = + com.google.cloud.migrationcenter.v1.AssetView.forNumber(view_); + return result == null ? com.google.cloud.migrationcenter.v1.AssetView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * View of the assets. Defaults to BASIC.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 6; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.migrationcenter.v1.AssetView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * View of the assets. Defaults to BASIC.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 6; + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000020); + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListAssetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListAssetsRequest) + private static final com.google.cloud.migrationcenter.v1.ListAssetsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListAssetsRequest(); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListAssetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsRequestOrBuilder.java new file mode 100644 index 000000000000..5584d235097b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListAssetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListAssetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for `ListAssetsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for `ListAssetsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * View of the assets. Defaults to BASIC.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 6; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * View of the assets. Defaults to BASIC.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AssetView view = 6; + * + * @return The view. + */ + com.google.cloud.migrationcenter.v1.AssetView getView(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsResponse.java new file mode 100644 index 000000000000..5c456fd38314 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsResponse.java @@ -0,0 +1,1395 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Response message for listing assets.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListAssetsResponse} + */ +public final class ListAssetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListAssetsResponse) + ListAssetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAssetsResponse.newBuilder() to construct. + private ListAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAssetsResponse() { + assets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAssetsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListAssetsResponse.class, + com.google.cloud.migrationcenter.v1.ListAssetsResponse.Builder.class); + } + + public static final int ASSETS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List assets_; + /** + * + * + *
+   * A list of assets.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + @java.lang.Override + public java.util.List getAssetsList() { + return assets_; + } + /** + * + * + *
+   * A list of assets.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + @java.lang.Override + public java.util.List + getAssetsOrBuilderList() { + return assets_; + } + /** + * + * + *
+   * A list of assets.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + @java.lang.Override + public int getAssetsCount() { + return assets_.size(); + } + /** + * + * + *
+   * A list of assets.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Asset getAssets(int index) { + return assets_.get(index); + } + /** + * + * + *
+   * A list of assets.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetOrBuilder getAssetsOrBuilder(int index) { + return assets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < assets_.size(); i++) { + output.writeMessage(1, assets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < assets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, assets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListAssetsResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListAssetsResponse other = + (com.google.cloud.migrationcenter.v1.ListAssetsResponse) obj; + + if (!getAssetsList().equals(other.getAssetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAssetsCount() > 0) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListAssetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for listing assets.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListAssetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListAssetsResponse) + com.google.cloud.migrationcenter.v1.ListAssetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListAssetsResponse.class, + com.google.cloud.migrationcenter.v1.ListAssetsResponse.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListAssetsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + } else { + assets_ = null; + assetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListAssetsResponse getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListAssetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListAssetsResponse build() { + com.google.cloud.migrationcenter.v1.ListAssetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListAssetsResponse buildPartial() { + com.google.cloud.migrationcenter.v1.ListAssetsResponse result = + new com.google.cloud.migrationcenter.v1.ListAssetsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ListAssetsResponse result) { + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assets_ = assets_; + } else { + result.assets_ = assetsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListAssetsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListAssetsResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListAssetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListAssetsResponse other) { + if (other == com.google.cloud.migrationcenter.v1.ListAssetsResponse.getDefaultInstance()) + return this; + if (assetsBuilder_ == null) { + if (!other.assets_.isEmpty()) { + if (assets_.isEmpty()) { + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetsIsMutable(); + assets_.addAll(other.assets_); + } + onChanged(); + } + } else { + if (!other.assets_.isEmpty()) { + if (assetsBuilder_.isEmpty()) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + assetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAssetsFieldBuilder() + : null; + } else { + assetsBuilder_.addAllMessages(other.assets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.Asset m = + input.readMessage( + com.google.cloud.migrationcenter.v1.Asset.parser(), extensionRegistry); + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(m); + } else { + assetsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List assets_ = + java.util.Collections.emptyList(); + + private void ensureAssetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(assets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Asset, + com.google.cloud.migrationcenter.v1.Asset.Builder, + com.google.cloud.migrationcenter.v1.AssetOrBuilder> + assetsBuilder_; + + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public java.util.List getAssetsList() { + if (assetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(assets_); + } else { + return assetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public int getAssetsCount() { + if (assetsBuilder_ == null) { + return assets_.size(); + } else { + return assetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public com.google.cloud.migrationcenter.v1.Asset getAssets(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder setAssets(int index, com.google.cloud.migrationcenter.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.set(index, value); + onChanged(); + } else { + assetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder setAssets( + int index, com.google.cloud.migrationcenter.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.set(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder addAssets(com.google.cloud.migrationcenter.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(value); + onChanged(); + } else { + assetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder addAssets(int index, com.google.cloud.migrationcenter.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(index, value); + onChanged(); + } else { + assetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder addAssets(com.google.cloud.migrationcenter.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder addAssets( + int index, com.google.cloud.migrationcenter.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder addAllAssets( + java.lang.Iterable values) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assets_); + onChanged(); + } else { + assetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder clearAssets() { + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + assetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public Builder removeAssets(int index) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.remove(index); + onChanged(); + } else { + assetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public com.google.cloud.migrationcenter.v1.Asset.Builder getAssetsBuilder(int index) { + return getAssetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public com.google.cloud.migrationcenter.v1.AssetOrBuilder getAssetsOrBuilder(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public java.util.List + getAssetsOrBuilderList() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assets_); + } + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public com.google.cloud.migrationcenter.v1.Asset.Builder addAssetsBuilder() { + return getAssetsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance()); + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public com.google.cloud.migrationcenter.v1.Asset.Builder addAssetsBuilder(int index) { + return getAssetsFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance()); + } + /** + * + * + *
+     * A list of assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + public java.util.List + getAssetsBuilderList() { + return getAssetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Asset, + com.google.cloud.migrationcenter.v1.Asset.Builder, + com.google.cloud.migrationcenter.v1.AssetOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Asset, + com.google.cloud.migrationcenter.v1.Asset.Builder, + com.google.cloud.migrationcenter.v1.AssetOrBuilder>( + assets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + assets_ = null; + } + return assetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListAssetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListAssetsResponse) + private static final com.google.cloud.migrationcenter.v1.ListAssetsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListAssetsResponse(); + } + + public static com.google.cloud.migrationcenter.v1.ListAssetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListAssetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsResponseOrBuilder.java new file mode 100644 index 000000000000..74908a8f0e34 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListAssetsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListAssetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListAssetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of assets.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + java.util.List getAssetsList(); + /** + * + * + *
+   * A list of assets.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + com.google.cloud.migrationcenter.v1.Asset getAssets(int index); + /** + * + * + *
+   * A list of assets.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + int getAssetsCount(); + /** + * + * + *
+   * A list of assets.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + java.util.List + getAssetsOrBuilderList(); + /** + * + * + *
+   * A list of assets.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + com.google.cloud.migrationcenter.v1.AssetOrBuilder getAssetsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesRequest.java new file mode 100644 index 000000000000..57d2a76037d6 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesRequest.java @@ -0,0 +1,1095 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to list error frames for a source.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListErrorFramesRequest} + */ +public final class ListErrorFramesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListErrorFramesRequest) + ListErrorFramesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListErrorFramesRequest.newBuilder() to construct. + private ListErrorFramesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListErrorFramesRequest() { + parent_ = ""; + pageToken_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListErrorFramesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListErrorFramesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListErrorFramesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest.class, + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value (the source) for `ListErrorFramesRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value (the source) for `ListErrorFramesRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 4; + private int view_ = 0; + /** + * + * + *
+   * Optional. An optional view mode to control the level of details of each
+   * error frame. The default is a BASIC frame view.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Optional. An optional view mode to control the level of details of each
+   * error frame. The default is a BASIC frame view.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ErrorFrameView getView() { + com.google.cloud.migrationcenter.v1.ErrorFrameView result = + com.google.cloud.migrationcenter.v1.ErrorFrameView.forNumber(view_); + return result == null + ? com.google.cloud.migrationcenter.v1.ErrorFrameView.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ErrorFrameView.ERROR_FRAME_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ErrorFrameView.ERROR_FRAME_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListErrorFramesRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest other = + (com.google.cloud.migrationcenter.v1.ListErrorFramesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list error frames for a source.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListErrorFramesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListErrorFramesRequest) + com.google.cloud.migrationcenter.v1.ListErrorFramesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListErrorFramesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListErrorFramesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest.class, + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListErrorFramesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListErrorFramesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListErrorFramesRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListErrorFramesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListErrorFramesRequest build() { + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListErrorFramesRequest buildPartial() { + com.google.cloud.migrationcenter.v1.ListErrorFramesRequest result = + new com.google.cloud.migrationcenter.v1.ListErrorFramesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListErrorFramesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListErrorFramesRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListErrorFramesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListErrorFramesRequest other) { + if (other == com.google.cloud.migrationcenter.v1.ListErrorFramesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value (the source) for `ListErrorFramesRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value (the source) for `ListErrorFramesRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value (the source) for `ListErrorFramesRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value (the source) for `ListErrorFramesRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value (the source) for `ListErrorFramesRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Optional. An optional view mode to control the level of details of each
+     * error frame. The default is a BASIC frame view.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Optional. An optional view mode to control the level of details of each
+     * error frame. The default is a BASIC frame view.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional view mode to control the level of details of each
+     * error frame. The default is a BASIC frame view.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ErrorFrameView getView() { + com.google.cloud.migrationcenter.v1.ErrorFrameView result = + com.google.cloud.migrationcenter.v1.ErrorFrameView.forNumber(view_); + return result == null + ? com.google.cloud.migrationcenter.v1.ErrorFrameView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. An optional view mode to control the level of details of each
+     * error frame. The default is a BASIC frame view.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.migrationcenter.v1.ErrorFrameView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional view mode to control the level of details of each
+     * error frame. The default is a BASIC frame view.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000008); + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListErrorFramesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListErrorFramesRequest) + private static final com.google.cloud.migrationcenter.v1.ListErrorFramesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListErrorFramesRequest(); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListErrorFramesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListErrorFramesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesRequestOrBuilder.java new file mode 100644 index 000000000000..db9aef5777c6 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesRequestOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListErrorFramesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListErrorFramesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value (the source) for `ListErrorFramesRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value (the source) for `ListErrorFramesRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. An optional view mode to control the level of details of each
+   * error frame. The default is a BASIC frame view.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Optional. An optional view mode to control the level of details of each
+   * error frame. The default is a BASIC frame view.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.migrationcenter.v1.ErrorFrameView getView(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesResponse.java new file mode 100644 index 000000000000..5f0a498974d0 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesResponse.java @@ -0,0 +1,1399 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A response for listing error frames.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListErrorFramesResponse} + */ +public final class ListErrorFramesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListErrorFramesResponse) + ListErrorFramesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListErrorFramesResponse.newBuilder() to construct. + private ListErrorFramesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListErrorFramesResponse() { + errorFrames_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListErrorFramesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListErrorFramesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListErrorFramesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse.class, + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse.Builder.class); + } + + public static final int ERROR_FRAMES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List errorFrames_; + /** + * + * + *
+   * The list of error frames.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + @java.lang.Override + public java.util.List getErrorFramesList() { + return errorFrames_; + } + /** + * + * + *
+   * The list of error frames.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + @java.lang.Override + public java.util.List + getErrorFramesOrBuilderList() { + return errorFrames_; + } + /** + * + * + *
+   * The list of error frames.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + @java.lang.Override + public int getErrorFramesCount() { + return errorFrames_.size(); + } + /** + * + * + *
+   * The list of error frames.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ErrorFrame getErrorFrames(int index) { + return errorFrames_.get(index); + } + /** + * + * + *
+   * The list of error frames.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ErrorFrameOrBuilder getErrorFramesOrBuilder( + int index) { + return errorFrames_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < errorFrames_.size(); i++) { + output.writeMessage(1, errorFrames_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < errorFrames_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errorFrames_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListErrorFramesResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse other = + (com.google.cloud.migrationcenter.v1.ListErrorFramesResponse) obj; + + if (!getErrorFramesList().equals(other.getErrorFramesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getErrorFramesCount() > 0) { + hash = (37 * hash) + ERROR_FRAMES_FIELD_NUMBER; + hash = (53 * hash) + getErrorFramesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A response for listing error frames.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListErrorFramesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListErrorFramesResponse) + com.google.cloud.migrationcenter.v1.ListErrorFramesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListErrorFramesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListErrorFramesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse.class, + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListErrorFramesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (errorFramesBuilder_ == null) { + errorFrames_ = java.util.Collections.emptyList(); + } else { + errorFrames_ = null; + errorFramesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListErrorFramesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListErrorFramesResponse getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListErrorFramesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListErrorFramesResponse build() { + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListErrorFramesResponse buildPartial() { + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse result = + new com.google.cloud.migrationcenter.v1.ListErrorFramesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ListErrorFramesResponse result) { + if (errorFramesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errorFrames_ = java.util.Collections.unmodifiableList(errorFrames_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errorFrames_ = errorFrames_; + } else { + result.errorFrames_ = errorFramesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListErrorFramesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListErrorFramesResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListErrorFramesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListErrorFramesResponse other) { + if (other == com.google.cloud.migrationcenter.v1.ListErrorFramesResponse.getDefaultInstance()) + return this; + if (errorFramesBuilder_ == null) { + if (!other.errorFrames_.isEmpty()) { + if (errorFrames_.isEmpty()) { + errorFrames_ = other.errorFrames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorFramesIsMutable(); + errorFrames_.addAll(other.errorFrames_); + } + onChanged(); + } + } else { + if (!other.errorFrames_.isEmpty()) { + if (errorFramesBuilder_.isEmpty()) { + errorFramesBuilder_.dispose(); + errorFramesBuilder_ = null; + errorFrames_ = other.errorFrames_; + bitField0_ = (bitField0_ & ~0x00000001); + errorFramesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorFramesFieldBuilder() + : null; + } else { + errorFramesBuilder_.addAllMessages(other.errorFrames_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.ErrorFrame m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ErrorFrame.parser(), extensionRegistry); + if (errorFramesBuilder_ == null) { + ensureErrorFramesIsMutable(); + errorFrames_.add(m); + } else { + errorFramesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List errorFrames_ = + java.util.Collections.emptyList(); + + private void ensureErrorFramesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errorFrames_ = + new java.util.ArrayList(errorFrames_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ErrorFrame, + com.google.cloud.migrationcenter.v1.ErrorFrame.Builder, + com.google.cloud.migrationcenter.v1.ErrorFrameOrBuilder> + errorFramesBuilder_; + + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public java.util.List getErrorFramesList() { + if (errorFramesBuilder_ == null) { + return java.util.Collections.unmodifiableList(errorFrames_); + } else { + return errorFramesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public int getErrorFramesCount() { + if (errorFramesBuilder_ == null) { + return errorFrames_.size(); + } else { + return errorFramesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public com.google.cloud.migrationcenter.v1.ErrorFrame getErrorFrames(int index) { + if (errorFramesBuilder_ == null) { + return errorFrames_.get(index); + } else { + return errorFramesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public Builder setErrorFrames(int index, com.google.cloud.migrationcenter.v1.ErrorFrame value) { + if (errorFramesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorFramesIsMutable(); + errorFrames_.set(index, value); + onChanged(); + } else { + errorFramesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public Builder setErrorFrames( + int index, com.google.cloud.migrationcenter.v1.ErrorFrame.Builder builderForValue) { + if (errorFramesBuilder_ == null) { + ensureErrorFramesIsMutable(); + errorFrames_.set(index, builderForValue.build()); + onChanged(); + } else { + errorFramesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public Builder addErrorFrames(com.google.cloud.migrationcenter.v1.ErrorFrame value) { + if (errorFramesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorFramesIsMutable(); + errorFrames_.add(value); + onChanged(); + } else { + errorFramesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public Builder addErrorFrames(int index, com.google.cloud.migrationcenter.v1.ErrorFrame value) { + if (errorFramesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorFramesIsMutable(); + errorFrames_.add(index, value); + onChanged(); + } else { + errorFramesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public Builder addErrorFrames( + com.google.cloud.migrationcenter.v1.ErrorFrame.Builder builderForValue) { + if (errorFramesBuilder_ == null) { + ensureErrorFramesIsMutable(); + errorFrames_.add(builderForValue.build()); + onChanged(); + } else { + errorFramesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public Builder addErrorFrames( + int index, com.google.cloud.migrationcenter.v1.ErrorFrame.Builder builderForValue) { + if (errorFramesBuilder_ == null) { + ensureErrorFramesIsMutable(); + errorFrames_.add(index, builderForValue.build()); + onChanged(); + } else { + errorFramesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public Builder addAllErrorFrames( + java.lang.Iterable values) { + if (errorFramesBuilder_ == null) { + ensureErrorFramesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorFrames_); + onChanged(); + } else { + errorFramesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public Builder clearErrorFrames() { + if (errorFramesBuilder_ == null) { + errorFrames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorFramesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public Builder removeErrorFrames(int index) { + if (errorFramesBuilder_ == null) { + ensureErrorFramesIsMutable(); + errorFrames_.remove(index); + onChanged(); + } else { + errorFramesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public com.google.cloud.migrationcenter.v1.ErrorFrame.Builder getErrorFramesBuilder(int index) { + return getErrorFramesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public com.google.cloud.migrationcenter.v1.ErrorFrameOrBuilder getErrorFramesOrBuilder( + int index) { + if (errorFramesBuilder_ == null) { + return errorFrames_.get(index); + } else { + return errorFramesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public java.util.List + getErrorFramesOrBuilderList() { + if (errorFramesBuilder_ != null) { + return errorFramesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errorFrames_); + } + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public com.google.cloud.migrationcenter.v1.ErrorFrame.Builder addErrorFramesBuilder() { + return getErrorFramesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.ErrorFrame.getDefaultInstance()); + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public com.google.cloud.migrationcenter.v1.ErrorFrame.Builder addErrorFramesBuilder(int index) { + return getErrorFramesFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.ErrorFrame.getDefaultInstance()); + } + /** + * + * + *
+     * The list of error frames.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + public java.util.List + getErrorFramesBuilderList() { + return getErrorFramesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ErrorFrame, + com.google.cloud.migrationcenter.v1.ErrorFrame.Builder, + com.google.cloud.migrationcenter.v1.ErrorFrameOrBuilder> + getErrorFramesFieldBuilder() { + if (errorFramesBuilder_ == null) { + errorFramesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ErrorFrame, + com.google.cloud.migrationcenter.v1.ErrorFrame.Builder, + com.google.cloud.migrationcenter.v1.ErrorFrameOrBuilder>( + errorFrames_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + errorFrames_ = null; + } + return errorFramesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListErrorFramesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListErrorFramesResponse) + private static final com.google.cloud.migrationcenter.v1.ListErrorFramesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListErrorFramesResponse(); + } + + public static com.google.cloud.migrationcenter.v1.ListErrorFramesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListErrorFramesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListErrorFramesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesResponseOrBuilder.java new file mode 100644 index 000000000000..ad9fb97bd44c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListErrorFramesResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListErrorFramesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListErrorFramesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of error frames.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + java.util.List getErrorFramesList(); + /** + * + * + *
+   * The list of error frames.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + com.google.cloud.migrationcenter.v1.ErrorFrame getErrorFrames(int index); + /** + * + * + *
+   * The list of error frames.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + int getErrorFramesCount(); + /** + * + * + *
+   * The list of error frames.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + java.util.List + getErrorFramesOrBuilderList(); + /** + * + * + *
+   * The list of error frames.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + com.google.cloud.migrationcenter.v1.ErrorFrameOrBuilder getErrorFramesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsRequest.java new file mode 100644 index 000000000000..0a7a0719a21c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to list groups.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListGroupsRequest} + */ +public final class ListGroupsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListGroupsRequest) + ListGroupsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListGroupsRequest.newBuilder() to construct. + private ListGroupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListGroupsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListGroupsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListGroupsRequest.class, + com.google.cloud.migrationcenter.v1.ListGroupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for `ListGroupsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for `ListGroupsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListGroupsRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListGroupsRequest other = + (com.google.cloud.migrationcenter.v1.ListGroupsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListGroupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list groups.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListGroupsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListGroupsRequest) + com.google.cloud.migrationcenter.v1.ListGroupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListGroupsRequest.class, + com.google.cloud.migrationcenter.v1.ListGroupsRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListGroupsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListGroupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListGroupsRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListGroupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListGroupsRequest build() { + com.google.cloud.migrationcenter.v1.ListGroupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListGroupsRequest buildPartial() { + com.google.cloud.migrationcenter.v1.ListGroupsRequest result = + new com.google.cloud.migrationcenter.v1.ListGroupsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListGroupsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListGroupsRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListGroupsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListGroupsRequest other) { + if (other == com.google.cloud.migrationcenter.v1.ListGroupsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for `ListGroupsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListGroupsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListGroupsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListGroupsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListGroupsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListGroupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListGroupsRequest) + private static final com.google.cloud.migrationcenter.v1.ListGroupsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListGroupsRequest(); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGroupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListGroupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsRequestOrBuilder.java new file mode 100644 index 000000000000..b00754b62f40 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListGroupsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListGroupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for `ListGroupsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for `ListGroupsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsResponse.java new file mode 100644 index 000000000000..68fa58aa0729 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsResponse.java @@ -0,0 +1,1395 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A response for listing groups.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListGroupsResponse} + */ +public final class ListGroupsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListGroupsResponse) + ListGroupsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListGroupsResponse.newBuilder() to construct. + private ListGroupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListGroupsResponse() { + groups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListGroupsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListGroupsResponse.class, + com.google.cloud.migrationcenter.v1.ListGroupsResponse.Builder.class); + } + + public static final int GROUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List groups_; + /** + * + * + *
+   * The list of Group
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + @java.lang.Override + public java.util.List getGroupsList() { + return groups_; + } + /** + * + * + *
+   * The list of Group
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + @java.lang.Override + public java.util.List + getGroupsOrBuilderList() { + return groups_; + } + /** + * + * + *
+   * The list of Group
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + @java.lang.Override + public int getGroupsCount() { + return groups_.size(); + } + /** + * + * + *
+   * The list of Group
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Group getGroups(int index) { + return groups_.get(index); + } + /** + * + * + *
+   * The list of Group
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GroupOrBuilder getGroupsOrBuilder(int index) { + return groups_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < groups_.size(); i++) { + output.writeMessage(1, groups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, groups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListGroupsResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListGroupsResponse other = + (com.google.cloud.migrationcenter.v1.ListGroupsResponse) obj; + + if (!getGroupsList().equals(other.getGroupsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getGroupsCount() > 0) { + hash = (37 * hash) + GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getGroupsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListGroupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A response for listing groups.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListGroupsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListGroupsResponse) + com.google.cloud.migrationcenter.v1.ListGroupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListGroupsResponse.class, + com.google.cloud.migrationcenter.v1.ListGroupsResponse.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListGroupsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (groupsBuilder_ == null) { + groups_ = java.util.Collections.emptyList(); + } else { + groups_ = null; + groupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListGroupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListGroupsResponse getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListGroupsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListGroupsResponse build() { + com.google.cloud.migrationcenter.v1.ListGroupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListGroupsResponse buildPartial() { + com.google.cloud.migrationcenter.v1.ListGroupsResponse result = + new com.google.cloud.migrationcenter.v1.ListGroupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ListGroupsResponse result) { + if (groupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + groups_ = java.util.Collections.unmodifiableList(groups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groups_ = groups_; + } else { + result.groups_ = groupsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListGroupsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListGroupsResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListGroupsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListGroupsResponse other) { + if (other == com.google.cloud.migrationcenter.v1.ListGroupsResponse.getDefaultInstance()) + return this; + if (groupsBuilder_ == null) { + if (!other.groups_.isEmpty()) { + if (groups_.isEmpty()) { + groups_ = other.groups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupsIsMutable(); + groups_.addAll(other.groups_); + } + onChanged(); + } + } else { + if (!other.groups_.isEmpty()) { + if (groupsBuilder_.isEmpty()) { + groupsBuilder_.dispose(); + groupsBuilder_ = null; + groups_ = other.groups_; + bitField0_ = (bitField0_ & ~0x00000001); + groupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGroupsFieldBuilder() + : null; + } else { + groupsBuilder_.addAllMessages(other.groups_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.Group m = + input.readMessage( + com.google.cloud.migrationcenter.v1.Group.parser(), extensionRegistry); + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(m); + } else { + groupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List groups_ = + java.util.Collections.emptyList(); + + private void ensureGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + groups_ = new java.util.ArrayList(groups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Group, + com.google.cloud.migrationcenter.v1.Group.Builder, + com.google.cloud.migrationcenter.v1.GroupOrBuilder> + groupsBuilder_; + + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public java.util.List getGroupsList() { + if (groupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groups_); + } else { + return groupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public int getGroupsCount() { + if (groupsBuilder_ == null) { + return groups_.size(); + } else { + return groupsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public com.google.cloud.migrationcenter.v1.Group getGroups(int index) { + if (groupsBuilder_ == null) { + return groups_.get(index); + } else { + return groupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public Builder setGroups(int index, com.google.cloud.migrationcenter.v1.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.set(index, value); + onChanged(); + } else { + groupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public Builder setGroups( + int index, com.google.cloud.migrationcenter.v1.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.set(index, builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public Builder addGroups(com.google.cloud.migrationcenter.v1.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.add(value); + onChanged(); + } else { + groupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public Builder addGroups(int index, com.google.cloud.migrationcenter.v1.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.add(index, value); + onChanged(); + } else { + groupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public Builder addGroups(com.google.cloud.migrationcenter.v1.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public Builder addGroups( + int index, com.google.cloud.migrationcenter.v1.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(index, builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public Builder addAllGroups( + java.lang.Iterable values) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groups_); + onChanged(); + } else { + groupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public Builder clearGroups() { + if (groupsBuilder_ == null) { + groups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public Builder removeGroups(int index) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.remove(index); + onChanged(); + } else { + groupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public com.google.cloud.migrationcenter.v1.Group.Builder getGroupsBuilder(int index) { + return getGroupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public com.google.cloud.migrationcenter.v1.GroupOrBuilder getGroupsOrBuilder(int index) { + if (groupsBuilder_ == null) { + return groups_.get(index); + } else { + return groupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public java.util.List + getGroupsOrBuilderList() { + if (groupsBuilder_ != null) { + return groupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groups_); + } + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public com.google.cloud.migrationcenter.v1.Group.Builder addGroupsBuilder() { + return getGroupsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.Group.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public com.google.cloud.migrationcenter.v1.Group.Builder addGroupsBuilder(int index) { + return getGroupsFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.Group.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Group
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + public java.util.List + getGroupsBuilderList() { + return getGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Group, + com.google.cloud.migrationcenter.v1.Group.Builder, + com.google.cloud.migrationcenter.v1.GroupOrBuilder> + getGroupsFieldBuilder() { + if (groupsBuilder_ == null) { + groupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Group, + com.google.cloud.migrationcenter.v1.Group.Builder, + com.google.cloud.migrationcenter.v1.GroupOrBuilder>( + groups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + groups_ = null; + } + return groupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListGroupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListGroupsResponse) + private static final com.google.cloud.migrationcenter.v1.ListGroupsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListGroupsResponse(); + } + + public static com.google.cloud.migrationcenter.v1.ListGroupsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGroupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListGroupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsResponseOrBuilder.java new file mode 100644 index 000000000000..87c09170a199 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListGroupsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListGroupsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListGroupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Group
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + java.util.List getGroupsList(); + /** + * + * + *
+   * The list of Group
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + com.google.cloud.migrationcenter.v1.Group getGroups(int index); + /** + * + * + *
+   * The list of Group
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + int getGroupsCount(); + /** + * + * + *
+   * The list of Group
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + java.util.List + getGroupsOrBuilderList(); + /** + * + * + *
+   * The list of Group
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + com.google.cloud.migrationcenter.v1.GroupOrBuilder getGroupsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesRequest.java new file mode 100644 index 000000000000..6b1931db0db5 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesRequest.java @@ -0,0 +1,1324 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to list import data files of an import job.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListImportDataFilesRequest} + */ +public final class ListImportDataFilesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListImportDataFilesRequest) + ListImportDataFilesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListImportDataFilesRequest.newBuilder() to construct. + private ListImportDataFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListImportDataFilesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListImportDataFilesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest.class, + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Name of the parent of the `ImportDataFiles` resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the parent of the `ImportDataFiles` resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of data files to return. The service may return
+   * fewer than this value. If unspecified, at most 500 data files will be
+   * returned. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous `ListImportDataFiles` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListImportDataFiles`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListImportDataFiles` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListImportDataFiles`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest other = + (com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list import data files of an import job.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListImportDataFilesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListImportDataFilesRequest) + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest.class, + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest build() { + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest buildPartial() { + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest result = + new com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Name of the parent of the `ImportDataFiles` resource.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the parent of the `ImportDataFiles` resource.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the parent of the `ImportDataFiles` resource.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the parent of the `ImportDataFiles` resource.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the parent of the `ImportDataFiles` resource.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of data files to return. The service may return
+     * fewer than this value. If unspecified, at most 500 data files will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of data files to return. The service may return
+     * fewer than this value. If unspecified, at most 500 data files will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of data files to return. The service may return
+     * fewer than this value. If unspecified, at most 500 data files will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListImportDataFiles` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListImportDataFiles`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListImportDataFiles` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListImportDataFiles`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListImportDataFiles` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListImportDataFiles`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListImportDataFiles` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListImportDataFiles`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListImportDataFiles` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListImportDataFiles`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListImportDataFilesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListImportDataFilesRequest) + private static final com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest(); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListImportDataFilesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesRequestOrBuilder.java new file mode 100644 index 000000000000..a3b92375c0d0 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListImportDataFilesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListImportDataFilesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the parent of the `ImportDataFiles` resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Name of the parent of the `ImportDataFiles` resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of data files to return. The service may return
+   * fewer than this value. If unspecified, at most 500 data files will be
+   * returned. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListImportDataFiles` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListImportDataFiles`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListImportDataFiles` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListImportDataFiles`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesResponse.java new file mode 100644 index 000000000000..f482bc3a70c8 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesResponse.java @@ -0,0 +1,1425 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Response for listing payload files of an import job.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListImportDataFilesResponse} + */ +public final class ListImportDataFilesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListImportDataFilesResponse) + ListImportDataFilesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListImportDataFilesResponse.newBuilder() to construct. + private ListImportDataFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListImportDataFilesResponse() { + importDataFiles_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListImportDataFilesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse.class, + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse.Builder.class); + } + + public static final int IMPORT_DATA_FILES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List importDataFiles_; + /** + * + * + *
+   * The list of import data files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + @java.lang.Override + public java.util.List + getImportDataFilesList() { + return importDataFiles_; + } + /** + * + * + *
+   * The list of import data files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + @java.lang.Override + public java.util.List + getImportDataFilesOrBuilderList() { + return importDataFiles_; + } + /** + * + * + *
+   * The list of import data files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + @java.lang.Override + public int getImportDataFilesCount() { + return importDataFiles_.size(); + } + /** + * + * + *
+   * The list of import data files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportDataFile getImportDataFiles(int index) { + return importDataFiles_.get(index); + } + /** + * + * + *
+   * The list of import data files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder getImportDataFilesOrBuilder( + int index) { + return importDataFiles_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < importDataFiles_.size(); i++) { + output.writeMessage(1, importDataFiles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < importDataFiles_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, importDataFiles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse other = + (com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse) obj; + + if (!getImportDataFilesList().equals(other.getImportDataFilesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getImportDataFilesCount() > 0) { + hash = (37 * hash) + IMPORT_DATA_FILES_FIELD_NUMBER; + hash = (53 * hash) + getImportDataFilesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for listing payload files of an import job.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListImportDataFilesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListImportDataFilesResponse) + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse.class, + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (importDataFilesBuilder_ == null) { + importDataFiles_ = java.util.Collections.emptyList(); + } else { + importDataFiles_ = null; + importDataFilesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse build() { + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse buildPartial() { + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse result = + new com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse result) { + if (importDataFilesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + importDataFiles_ = java.util.Collections.unmodifiableList(importDataFiles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.importDataFiles_ = importDataFiles_; + } else { + result.importDataFiles_ = importDataFilesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse other) { + if (other + == com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse.getDefaultInstance()) + return this; + if (importDataFilesBuilder_ == null) { + if (!other.importDataFiles_.isEmpty()) { + if (importDataFiles_.isEmpty()) { + importDataFiles_ = other.importDataFiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureImportDataFilesIsMutable(); + importDataFiles_.addAll(other.importDataFiles_); + } + onChanged(); + } + } else { + if (!other.importDataFiles_.isEmpty()) { + if (importDataFilesBuilder_.isEmpty()) { + importDataFilesBuilder_.dispose(); + importDataFilesBuilder_ = null; + importDataFiles_ = other.importDataFiles_; + bitField0_ = (bitField0_ & ~0x00000001); + importDataFilesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getImportDataFilesFieldBuilder() + : null; + } else { + importDataFilesBuilder_.addAllMessages(other.importDataFiles_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.ImportDataFile m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ImportDataFile.parser(), + extensionRegistry); + if (importDataFilesBuilder_ == null) { + ensureImportDataFilesIsMutable(); + importDataFiles_.add(m); + } else { + importDataFilesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List importDataFiles_ = + java.util.Collections.emptyList(); + + private void ensureImportDataFilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + importDataFiles_ = + new java.util.ArrayList( + importDataFiles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportDataFile, + com.google.cloud.migrationcenter.v1.ImportDataFile.Builder, + com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder> + importDataFilesBuilder_; + + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public java.util.List + getImportDataFilesList() { + if (importDataFilesBuilder_ == null) { + return java.util.Collections.unmodifiableList(importDataFiles_); + } else { + return importDataFilesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public int getImportDataFilesCount() { + if (importDataFilesBuilder_ == null) { + return importDataFiles_.size(); + } else { + return importDataFilesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public com.google.cloud.migrationcenter.v1.ImportDataFile getImportDataFiles(int index) { + if (importDataFilesBuilder_ == null) { + return importDataFiles_.get(index); + } else { + return importDataFilesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public Builder setImportDataFiles( + int index, com.google.cloud.migrationcenter.v1.ImportDataFile value) { + if (importDataFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportDataFilesIsMutable(); + importDataFiles_.set(index, value); + onChanged(); + } else { + importDataFilesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public Builder setImportDataFiles( + int index, com.google.cloud.migrationcenter.v1.ImportDataFile.Builder builderForValue) { + if (importDataFilesBuilder_ == null) { + ensureImportDataFilesIsMutable(); + importDataFiles_.set(index, builderForValue.build()); + onChanged(); + } else { + importDataFilesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public Builder addImportDataFiles(com.google.cloud.migrationcenter.v1.ImportDataFile value) { + if (importDataFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportDataFilesIsMutable(); + importDataFiles_.add(value); + onChanged(); + } else { + importDataFilesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public Builder addImportDataFiles( + int index, com.google.cloud.migrationcenter.v1.ImportDataFile value) { + if (importDataFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportDataFilesIsMutable(); + importDataFiles_.add(index, value); + onChanged(); + } else { + importDataFilesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public Builder addImportDataFiles( + com.google.cloud.migrationcenter.v1.ImportDataFile.Builder builderForValue) { + if (importDataFilesBuilder_ == null) { + ensureImportDataFilesIsMutable(); + importDataFiles_.add(builderForValue.build()); + onChanged(); + } else { + importDataFilesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public Builder addImportDataFiles( + int index, com.google.cloud.migrationcenter.v1.ImportDataFile.Builder builderForValue) { + if (importDataFilesBuilder_ == null) { + ensureImportDataFilesIsMutable(); + importDataFiles_.add(index, builderForValue.build()); + onChanged(); + } else { + importDataFilesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public Builder addAllImportDataFiles( + java.lang.Iterable values) { + if (importDataFilesBuilder_ == null) { + ensureImportDataFilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, importDataFiles_); + onChanged(); + } else { + importDataFilesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public Builder clearImportDataFiles() { + if (importDataFilesBuilder_ == null) { + importDataFiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + importDataFilesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public Builder removeImportDataFiles(int index) { + if (importDataFilesBuilder_ == null) { + ensureImportDataFilesIsMutable(); + importDataFiles_.remove(index); + onChanged(); + } else { + importDataFilesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public com.google.cloud.migrationcenter.v1.ImportDataFile.Builder getImportDataFilesBuilder( + int index) { + return getImportDataFilesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder getImportDataFilesOrBuilder( + int index) { + if (importDataFilesBuilder_ == null) { + return importDataFiles_.get(index); + } else { + return importDataFilesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public java.util.List + getImportDataFilesOrBuilderList() { + if (importDataFilesBuilder_ != null) { + return importDataFilesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(importDataFiles_); + } + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public com.google.cloud.migrationcenter.v1.ImportDataFile.Builder addImportDataFilesBuilder() { + return getImportDataFilesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.ImportDataFile.getDefaultInstance()); + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public com.google.cloud.migrationcenter.v1.ImportDataFile.Builder addImportDataFilesBuilder( + int index) { + return getImportDataFilesFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.ImportDataFile.getDefaultInstance()); + } + /** + * + * + *
+     * The list of import data files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + public java.util.List + getImportDataFilesBuilderList() { + return getImportDataFilesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportDataFile, + com.google.cloud.migrationcenter.v1.ImportDataFile.Builder, + com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder> + getImportDataFilesFieldBuilder() { + if (importDataFilesBuilder_ == null) { + importDataFilesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportDataFile, + com.google.cloud.migrationcenter.v1.ImportDataFile.Builder, + com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder>( + importDataFiles_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + importDataFiles_ = null; + } + return importDataFilesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListImportDataFilesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListImportDataFilesResponse) + private static final com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse(); + } + + public static com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListImportDataFilesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesResponseOrBuilder.java new file mode 100644 index 000000000000..13a24ba2a1cb --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportDataFilesResponseOrBuilder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListImportDataFilesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListImportDataFilesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of import data files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + java.util.List getImportDataFilesList(); + /** + * + * + *
+   * The list of import data files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + com.google.cloud.migrationcenter.v1.ImportDataFile getImportDataFiles(int index); + /** + * + * + *
+   * The list of import data files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + int getImportDataFilesCount(); + /** + * + * + *
+   * The list of import data files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + java.util.List + getImportDataFilesOrBuilderList(); + /** + * + * + *
+   * The list of import data files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + com.google.cloud.migrationcenter.v1.ImportDataFileOrBuilder getImportDataFilesOrBuilder( + int index); + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsRequest.java new file mode 100644 index 000000000000..62e50a12e475 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsRequest.java @@ -0,0 +1,1457 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to list import jobs.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListImportJobsRequest} + */ +public final class ListImportJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListImportJobsRequest) + ListImportJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListImportJobsRequest.newBuilder() to construct. + private ListImportJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListImportJobsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListImportJobsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListImportJobsRequest.class, + com.google.cloud.migrationcenter.v1.ListImportJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for `ListImportJobsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for `ListImportJobsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 6; + private int view_ = 0; + /** + * + * + *
+   * Optional. The level of details of each import job.
+   * Default value is BASIC.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Optional. The level of details of each import job.
+   * Default value is BASIC.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJobView getView() { + com.google.cloud.migrationcenter.v1.ImportJobView result = + com.google.cloud.migrationcenter.v1.ImportJobView.forNumber(view_); + return result == null ? com.google.cloud.migrationcenter.v1.ImportJobView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ImportJobView.IMPORT_JOB_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ImportJobView.IMPORT_JOB_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListImportJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListImportJobsRequest other = + (com.google.cloud.migrationcenter.v1.ListImportJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListImportJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list import jobs.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListImportJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListImportJobsRequest) + com.google.cloud.migrationcenter.v1.ListImportJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListImportJobsRequest.class, + com.google.cloud.migrationcenter.v1.ListImportJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListImportJobsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportJobsRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListImportJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportJobsRequest build() { + com.google.cloud.migrationcenter.v1.ListImportJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportJobsRequest buildPartial() { + com.google.cloud.migrationcenter.v1.ListImportJobsRequest result = + new com.google.cloud.migrationcenter.v1.ListImportJobsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListImportJobsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListImportJobsRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListImportJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListImportJobsRequest other) { + if (other == com.google.cloud.migrationcenter.v1.ListImportJobsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for `ListImportJobsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListImportJobsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListImportJobsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListImportJobsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListImportJobsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Optional. The level of details of each import job.
+     * Default value is BASIC.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Optional. The level of details of each import job.
+     * Default value is BASIC.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The level of details of each import job.
+     * Default value is BASIC.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJobView getView() { + com.google.cloud.migrationcenter.v1.ImportJobView result = + com.google.cloud.migrationcenter.v1.ImportJobView.forNumber(view_); + return result == null + ? com.google.cloud.migrationcenter.v1.ImportJobView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The level of details of each import job.
+     * Default value is BASIC.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.migrationcenter.v1.ImportJobView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The level of details of each import job.
+     * Default value is BASIC.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000020); + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListImportJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListImportJobsRequest) + private static final com.google.cloud.migrationcenter.v1.ListImportJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListImportJobsRequest(); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListImportJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsRequestOrBuilder.java new file mode 100644 index 000000000000..e61fb2ca90e1 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsRequestOrBuilder.java @@ -0,0 +1,174 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListImportJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListImportJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for `ListImportJobsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for `ListImportJobsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. The level of details of each import job.
+   * Default value is BASIC.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Optional. The level of details of each import job.
+   * Default value is BASIC.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.migrationcenter.v1.ImportJobView getView(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsResponse.java new file mode 100644 index 000000000000..2d4b1080a970 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsResponse.java @@ -0,0 +1,1398 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A response for listing import jobs.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListImportJobsResponse} + */ +public final class ListImportJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListImportJobsResponse) + ListImportJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListImportJobsResponse.newBuilder() to construct. + private ListImportJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListImportJobsResponse() { + importJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListImportJobsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListImportJobsResponse.class, + com.google.cloud.migrationcenter.v1.ListImportJobsResponse.Builder.class); + } + + public static final int IMPORT_JOBS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List importJobs_; + /** + * + * + *
+   * The list of import jobs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + @java.lang.Override + public java.util.List getImportJobsList() { + return importJobs_; + } + /** + * + * + *
+   * The list of import jobs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + @java.lang.Override + public java.util.List + getImportJobsOrBuilderList() { + return importJobs_; + } + /** + * + * + *
+   * The list of import jobs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + @java.lang.Override + public int getImportJobsCount() { + return importJobs_.size(); + } + /** + * + * + *
+   * The list of import jobs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJob getImportJobs(int index) { + return importJobs_.get(index); + } + /** + * + * + *
+   * The list of import jobs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJobOrBuilder getImportJobsOrBuilder(int index) { + return importJobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < importJobs_.size(); i++) { + output.writeMessage(1, importJobs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < importJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, importJobs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListImportJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListImportJobsResponse other = + (com.google.cloud.migrationcenter.v1.ListImportJobsResponse) obj; + + if (!getImportJobsList().equals(other.getImportJobsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getImportJobsCount() > 0) { + hash = (37 * hash) + IMPORT_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getImportJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListImportJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A response for listing import jobs.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListImportJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListImportJobsResponse) + com.google.cloud.migrationcenter.v1.ListImportJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListImportJobsResponse.class, + com.google.cloud.migrationcenter.v1.ListImportJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListImportJobsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (importJobsBuilder_ == null) { + importJobs_ = java.util.Collections.emptyList(); + } else { + importJobs_ = null; + importJobsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListImportJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportJobsResponse getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListImportJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportJobsResponse build() { + com.google.cloud.migrationcenter.v1.ListImportJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportJobsResponse buildPartial() { + com.google.cloud.migrationcenter.v1.ListImportJobsResponse result = + new com.google.cloud.migrationcenter.v1.ListImportJobsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ListImportJobsResponse result) { + if (importJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + importJobs_ = java.util.Collections.unmodifiableList(importJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.importJobs_ = importJobs_; + } else { + result.importJobs_ = importJobsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListImportJobsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListImportJobsResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListImportJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListImportJobsResponse other) { + if (other == com.google.cloud.migrationcenter.v1.ListImportJobsResponse.getDefaultInstance()) + return this; + if (importJobsBuilder_ == null) { + if (!other.importJobs_.isEmpty()) { + if (importJobs_.isEmpty()) { + importJobs_ = other.importJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureImportJobsIsMutable(); + importJobs_.addAll(other.importJobs_); + } + onChanged(); + } + } else { + if (!other.importJobs_.isEmpty()) { + if (importJobsBuilder_.isEmpty()) { + importJobsBuilder_.dispose(); + importJobsBuilder_ = null; + importJobs_ = other.importJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + importJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getImportJobsFieldBuilder() + : null; + } else { + importJobsBuilder_.addAllMessages(other.importJobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.ImportJob m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ImportJob.parser(), extensionRegistry); + if (importJobsBuilder_ == null) { + ensureImportJobsIsMutable(); + importJobs_.add(m); + } else { + importJobsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List importJobs_ = + java.util.Collections.emptyList(); + + private void ensureImportJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + importJobs_ = + new java.util.ArrayList(importJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportJob, + com.google.cloud.migrationcenter.v1.ImportJob.Builder, + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder> + importJobsBuilder_; + + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public java.util.List getImportJobsList() { + if (importJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(importJobs_); + } else { + return importJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public int getImportJobsCount() { + if (importJobsBuilder_ == null) { + return importJobs_.size(); + } else { + return importJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public com.google.cloud.migrationcenter.v1.ImportJob getImportJobs(int index) { + if (importJobsBuilder_ == null) { + return importJobs_.get(index); + } else { + return importJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public Builder setImportJobs(int index, com.google.cloud.migrationcenter.v1.ImportJob value) { + if (importJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportJobsIsMutable(); + importJobs_.set(index, value); + onChanged(); + } else { + importJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public Builder setImportJobs( + int index, com.google.cloud.migrationcenter.v1.ImportJob.Builder builderForValue) { + if (importJobsBuilder_ == null) { + ensureImportJobsIsMutable(); + importJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + importJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public Builder addImportJobs(com.google.cloud.migrationcenter.v1.ImportJob value) { + if (importJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportJobsIsMutable(); + importJobs_.add(value); + onChanged(); + } else { + importJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public Builder addImportJobs(int index, com.google.cloud.migrationcenter.v1.ImportJob value) { + if (importJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportJobsIsMutable(); + importJobs_.add(index, value); + onChanged(); + } else { + importJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public Builder addImportJobs( + com.google.cloud.migrationcenter.v1.ImportJob.Builder builderForValue) { + if (importJobsBuilder_ == null) { + ensureImportJobsIsMutable(); + importJobs_.add(builderForValue.build()); + onChanged(); + } else { + importJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public Builder addImportJobs( + int index, com.google.cloud.migrationcenter.v1.ImportJob.Builder builderForValue) { + if (importJobsBuilder_ == null) { + ensureImportJobsIsMutable(); + importJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + importJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public Builder addAllImportJobs( + java.lang.Iterable values) { + if (importJobsBuilder_ == null) { + ensureImportJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, importJobs_); + onChanged(); + } else { + importJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public Builder clearImportJobs() { + if (importJobsBuilder_ == null) { + importJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + importJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public Builder removeImportJobs(int index) { + if (importJobsBuilder_ == null) { + ensureImportJobsIsMutable(); + importJobs_.remove(index); + onChanged(); + } else { + importJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public com.google.cloud.migrationcenter.v1.ImportJob.Builder getImportJobsBuilder(int index) { + return getImportJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public com.google.cloud.migrationcenter.v1.ImportJobOrBuilder getImportJobsOrBuilder( + int index) { + if (importJobsBuilder_ == null) { + return importJobs_.get(index); + } else { + return importJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public java.util.List + getImportJobsOrBuilderList() { + if (importJobsBuilder_ != null) { + return importJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(importJobs_); + } + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public com.google.cloud.migrationcenter.v1.ImportJob.Builder addImportJobsBuilder() { + return getImportJobsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance()); + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public com.google.cloud.migrationcenter.v1.ImportJob.Builder addImportJobsBuilder(int index) { + return getImportJobsFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance()); + } + /** + * + * + *
+     * The list of import jobs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + public java.util.List + getImportJobsBuilderList() { + return getImportJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportJob, + com.google.cloud.migrationcenter.v1.ImportJob.Builder, + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder> + getImportJobsFieldBuilder() { + if (importJobsBuilder_ == null) { + importJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportJob, + com.google.cloud.migrationcenter.v1.ImportJob.Builder, + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder>( + importJobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + importJobs_ = null; + } + return importJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListImportJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListImportJobsResponse) + private static final com.google.cloud.migrationcenter.v1.ListImportJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListImportJobsResponse(); + } + + public static com.google.cloud.migrationcenter.v1.ListImportJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListImportJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListImportJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsResponseOrBuilder.java new file mode 100644 index 000000000000..109d66ba0ffa --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListImportJobsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListImportJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListImportJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of import jobs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + java.util.List getImportJobsList(); + /** + * + * + *
+   * The list of import jobs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + com.google.cloud.migrationcenter.v1.ImportJob getImportJobs(int index); + /** + * + * + *
+   * The list of import jobs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + int getImportJobsCount(); + /** + * + * + *
+   * The list of import jobs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + java.util.List + getImportJobsOrBuilderList(); + /** + * + * + *
+   * The list of import jobs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder getImportJobsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsRequest.java new file mode 100644 index 000000000000..340008201290 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsRequest.java @@ -0,0 +1,1108 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Request for listing preference sets.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListPreferenceSetsRequest} + */ +public final class ListPreferenceSetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListPreferenceSetsRequest) + ListPreferenceSetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPreferenceSetsRequest.newBuilder() to construct. + private ListPreferenceSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPreferenceSetsRequest() { + parent_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPreferenceSetsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest.class, + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for `ListPreferenceSetsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for `ListPreferenceSetsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, at most 500 preference sets will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest other = + (com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for listing preference sets.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListPreferenceSetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListPreferenceSetsRequest) + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest.class, + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest build() { + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest buildPartial() { + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest result = + new com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for `ListPreferenceSetsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListPreferenceSetsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListPreferenceSetsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListPreferenceSetsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListPreferenceSetsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, at most 500 preference sets will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, at most 500 preference sets will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, at most 500 preference sets will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListPreferenceSetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListPreferenceSetsRequest) + private static final com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest(); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPreferenceSetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsRequestOrBuilder.java new file mode 100644 index 000000000000..8c0d533a89c3 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListPreferenceSetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListPreferenceSetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for `ListPreferenceSetsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for `ListPreferenceSetsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, at most 500 preference sets will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsResponse.java new file mode 100644 index 000000000000..f8211d38dc1a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsResponse.java @@ -0,0 +1,1416 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Response message for listing preference sets.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListPreferenceSetsResponse} + */ +public final class ListPreferenceSetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListPreferenceSetsResponse) + ListPreferenceSetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPreferenceSetsResponse.newBuilder() to construct. + private ListPreferenceSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPreferenceSetsResponse() { + preferenceSets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPreferenceSetsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse.class, + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse.Builder.class); + } + + public static final int PREFERENCE_SETS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List preferenceSets_; + /** + * + * + *
+   * The list of PreferenceSets
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + @java.lang.Override + public java.util.List getPreferenceSetsList() { + return preferenceSets_; + } + /** + * + * + *
+   * The list of PreferenceSets
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + @java.lang.Override + public java.util.List + getPreferenceSetsOrBuilderList() { + return preferenceSets_; + } + /** + * + * + *
+   * The list of PreferenceSets
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + @java.lang.Override + public int getPreferenceSetsCount() { + return preferenceSets_.size(); + } + /** + * + * + *
+   * The list of PreferenceSets
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PreferenceSet getPreferenceSets(int index) { + return preferenceSets_.get(index); + } + /** + * + * + *
+   * The list of PreferenceSets
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder getPreferenceSetsOrBuilder( + int index) { + return preferenceSets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < preferenceSets_.size(); i++) { + output.writeMessage(1, preferenceSets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < preferenceSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, preferenceSets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse other = + (com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse) obj; + + if (!getPreferenceSetsList().equals(other.getPreferenceSetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPreferenceSetsCount() > 0) { + hash = (37 * hash) + PREFERENCE_SETS_FIELD_NUMBER; + hash = (53 * hash) + getPreferenceSetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for listing preference sets.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListPreferenceSetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListPreferenceSetsResponse) + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse.class, + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (preferenceSetsBuilder_ == null) { + preferenceSets_ = java.util.Collections.emptyList(); + } else { + preferenceSets_ = null; + preferenceSetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse build() { + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse buildPartial() { + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse result = + new com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse result) { + if (preferenceSetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + preferenceSets_ = java.util.Collections.unmodifiableList(preferenceSets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.preferenceSets_ = preferenceSets_; + } else { + result.preferenceSets_ = preferenceSetsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse other) { + if (other + == com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse.getDefaultInstance()) + return this; + if (preferenceSetsBuilder_ == null) { + if (!other.preferenceSets_.isEmpty()) { + if (preferenceSets_.isEmpty()) { + preferenceSets_ = other.preferenceSets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePreferenceSetsIsMutable(); + preferenceSets_.addAll(other.preferenceSets_); + } + onChanged(); + } + } else { + if (!other.preferenceSets_.isEmpty()) { + if (preferenceSetsBuilder_.isEmpty()) { + preferenceSetsBuilder_.dispose(); + preferenceSetsBuilder_ = null; + preferenceSets_ = other.preferenceSets_; + bitField0_ = (bitField0_ & ~0x00000001); + preferenceSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPreferenceSetsFieldBuilder() + : null; + } else { + preferenceSetsBuilder_.addAllMessages(other.preferenceSets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.PreferenceSet m = + input.readMessage( + com.google.cloud.migrationcenter.v1.PreferenceSet.parser(), + extensionRegistry); + if (preferenceSetsBuilder_ == null) { + ensurePreferenceSetsIsMutable(); + preferenceSets_.add(m); + } else { + preferenceSetsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List preferenceSets_ = + java.util.Collections.emptyList(); + + private void ensurePreferenceSetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + preferenceSets_ = + new java.util.ArrayList( + preferenceSets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PreferenceSet, + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder, + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder> + preferenceSetsBuilder_; + + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public java.util.List + getPreferenceSetsList() { + if (preferenceSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(preferenceSets_); + } else { + return preferenceSetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public int getPreferenceSetsCount() { + if (preferenceSetsBuilder_ == null) { + return preferenceSets_.size(); + } else { + return preferenceSetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public com.google.cloud.migrationcenter.v1.PreferenceSet getPreferenceSets(int index) { + if (preferenceSetsBuilder_ == null) { + return preferenceSets_.get(index); + } else { + return preferenceSetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public Builder setPreferenceSets( + int index, com.google.cloud.migrationcenter.v1.PreferenceSet value) { + if (preferenceSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePreferenceSetsIsMutable(); + preferenceSets_.set(index, value); + onChanged(); + } else { + preferenceSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public Builder setPreferenceSets( + int index, com.google.cloud.migrationcenter.v1.PreferenceSet.Builder builderForValue) { + if (preferenceSetsBuilder_ == null) { + ensurePreferenceSetsIsMutable(); + preferenceSets_.set(index, builderForValue.build()); + onChanged(); + } else { + preferenceSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public Builder addPreferenceSets(com.google.cloud.migrationcenter.v1.PreferenceSet value) { + if (preferenceSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePreferenceSetsIsMutable(); + preferenceSets_.add(value); + onChanged(); + } else { + preferenceSetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public Builder addPreferenceSets( + int index, com.google.cloud.migrationcenter.v1.PreferenceSet value) { + if (preferenceSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePreferenceSetsIsMutable(); + preferenceSets_.add(index, value); + onChanged(); + } else { + preferenceSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public Builder addPreferenceSets( + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder builderForValue) { + if (preferenceSetsBuilder_ == null) { + ensurePreferenceSetsIsMutable(); + preferenceSets_.add(builderForValue.build()); + onChanged(); + } else { + preferenceSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public Builder addPreferenceSets( + int index, com.google.cloud.migrationcenter.v1.PreferenceSet.Builder builderForValue) { + if (preferenceSetsBuilder_ == null) { + ensurePreferenceSetsIsMutable(); + preferenceSets_.add(index, builderForValue.build()); + onChanged(); + } else { + preferenceSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public Builder addAllPreferenceSets( + java.lang.Iterable values) { + if (preferenceSetsBuilder_ == null) { + ensurePreferenceSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, preferenceSets_); + onChanged(); + } else { + preferenceSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public Builder clearPreferenceSets() { + if (preferenceSetsBuilder_ == null) { + preferenceSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + preferenceSetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public Builder removePreferenceSets(int index) { + if (preferenceSetsBuilder_ == null) { + ensurePreferenceSetsIsMutable(); + preferenceSets_.remove(index); + onChanged(); + } else { + preferenceSetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public com.google.cloud.migrationcenter.v1.PreferenceSet.Builder getPreferenceSetsBuilder( + int index) { + return getPreferenceSetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder getPreferenceSetsOrBuilder( + int index) { + if (preferenceSetsBuilder_ == null) { + return preferenceSets_.get(index); + } else { + return preferenceSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public java.util.List + getPreferenceSetsOrBuilderList() { + if (preferenceSetsBuilder_ != null) { + return preferenceSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(preferenceSets_); + } + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public com.google.cloud.migrationcenter.v1.PreferenceSet.Builder addPreferenceSetsBuilder() { + return getPreferenceSetsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance()); + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public com.google.cloud.migrationcenter.v1.PreferenceSet.Builder addPreferenceSetsBuilder( + int index) { + return getPreferenceSetsFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance()); + } + /** + * + * + *
+     * The list of PreferenceSets
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + public java.util.List + getPreferenceSetsBuilderList() { + return getPreferenceSetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PreferenceSet, + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder, + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder> + getPreferenceSetsFieldBuilder() { + if (preferenceSetsBuilder_ == null) { + preferenceSetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PreferenceSet, + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder, + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder>( + preferenceSets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + preferenceSets_ = null; + } + return preferenceSetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListPreferenceSetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListPreferenceSetsResponse) + private static final com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse(); + } + + public static com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPreferenceSetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsResponseOrBuilder.java new file mode 100644 index 000000000000..80906d69052a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListPreferenceSetsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListPreferenceSetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListPreferenceSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of PreferenceSets
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + java.util.List getPreferenceSetsList(); + /** + * + * + *
+   * The list of PreferenceSets
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + com.google.cloud.migrationcenter.v1.PreferenceSet getPreferenceSets(int index); + /** + * + * + *
+   * The list of PreferenceSets
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + int getPreferenceSetsCount(); + /** + * + * + *
+   * The list of PreferenceSets
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + java.util.List + getPreferenceSetsOrBuilderList(); + /** + * + * + *
+   * The list of PreferenceSets
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder getPreferenceSetsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsRequest.java new file mode 100644 index 000000000000..d3e6bf7406db --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsRequest.java @@ -0,0 +1,1286 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to get a list of `ReportConfig` resources.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListReportConfigsRequest} + */ +public final class ListReportConfigsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListReportConfigsRequest) + ListReportConfigsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListReportConfigsRequest.newBuilder() to construct. + private ListReportConfigsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListReportConfigsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListReportConfigsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest.class, + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for `ListReportConfigsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for `ListReportConfigsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListReportConfigsRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest other = + (com.google.cloud.migrationcenter.v1.ListReportConfigsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a list of `ReportConfig` resources.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListReportConfigsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListReportConfigsRequest) + com.google.cloud.migrationcenter.v1.ListReportConfigsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest.class, + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListReportConfigsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportConfigsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportConfigsRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListReportConfigsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportConfigsRequest build() { + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportConfigsRequest buildPartial() { + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest result = + new com.google.cloud.migrationcenter.v1.ListReportConfigsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ListReportConfigsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListReportConfigsRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListReportConfigsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListReportConfigsRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.ListReportConfigsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for `ListReportConfigsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListReportConfigsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListReportConfigsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListReportConfigsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListReportConfigsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListReportConfigsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListReportConfigsRequest) + private static final com.google.cloud.migrationcenter.v1.ListReportConfigsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListReportConfigsRequest(); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReportConfigsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportConfigsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsRequestOrBuilder.java new file mode 100644 index 000000000000..6b14a4f51777 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListReportConfigsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListReportConfigsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for `ListReportConfigsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for `ListReportConfigsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsResponse.java new file mode 100644 index 000000000000..da1ff2b5e1cd --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsResponse.java @@ -0,0 +1,1412 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Response message for listing report configs.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListReportConfigsResponse} + */ +public final class ListReportConfigsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListReportConfigsResponse) + ListReportConfigsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListReportConfigsResponse.newBuilder() to construct. + private ListReportConfigsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListReportConfigsResponse() { + reportConfigs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListReportConfigsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse.class, + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse.Builder.class); + } + + public static final int REPORT_CONFIGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List reportConfigs_; + /** + * + * + *
+   * A list of report configs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + @java.lang.Override + public java.util.List getReportConfigsList() { + return reportConfigs_; + } + /** + * + * + *
+   * A list of report configs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + @java.lang.Override + public java.util.List + getReportConfigsOrBuilderList() { + return reportConfigs_; + } + /** + * + * + *
+   * A list of report configs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + @java.lang.Override + public int getReportConfigsCount() { + return reportConfigs_.size(); + } + /** + * + * + *
+   * A list of report configs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig getReportConfigs(int index) { + return reportConfigs_.get(index); + } + /** + * + * + *
+   * A list of report configs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder getReportConfigsOrBuilder( + int index) { + return reportConfigs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < reportConfigs_.size(); i++) { + output.writeMessage(1, reportConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < reportConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, reportConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListReportConfigsResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse other = + (com.google.cloud.migrationcenter.v1.ListReportConfigsResponse) obj; + + if (!getReportConfigsList().equals(other.getReportConfigsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getReportConfigsCount() > 0) { + hash = (37 * hash) + REPORT_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getReportConfigsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for listing report configs.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListReportConfigsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListReportConfigsResponse) + com.google.cloud.migrationcenter.v1.ListReportConfigsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse.class, + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListReportConfigsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (reportConfigsBuilder_ == null) { + reportConfigs_ = java.util.Collections.emptyList(); + } else { + reportConfigs_ = null; + reportConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportConfigsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportConfigsResponse + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListReportConfigsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportConfigsResponse build() { + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportConfigsResponse buildPartial() { + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse result = + new com.google.cloud.migrationcenter.v1.ListReportConfigsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse result) { + if (reportConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + reportConfigs_ = java.util.Collections.unmodifiableList(reportConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.reportConfigs_ = reportConfigs_; + } else { + result.reportConfigs_ = reportConfigsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ListReportConfigsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListReportConfigsResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListReportConfigsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListReportConfigsResponse other) { + if (other + == com.google.cloud.migrationcenter.v1.ListReportConfigsResponse.getDefaultInstance()) + return this; + if (reportConfigsBuilder_ == null) { + if (!other.reportConfigs_.isEmpty()) { + if (reportConfigs_.isEmpty()) { + reportConfigs_ = other.reportConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReportConfigsIsMutable(); + reportConfigs_.addAll(other.reportConfigs_); + } + onChanged(); + } + } else { + if (!other.reportConfigs_.isEmpty()) { + if (reportConfigsBuilder_.isEmpty()) { + reportConfigsBuilder_.dispose(); + reportConfigsBuilder_ = null; + reportConfigs_ = other.reportConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + reportConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReportConfigsFieldBuilder() + : null; + } else { + reportConfigsBuilder_.addAllMessages(other.reportConfigs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.ReportConfig m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ReportConfig.parser(), + extensionRegistry); + if (reportConfigsBuilder_ == null) { + ensureReportConfigsIsMutable(); + reportConfigs_.add(m); + } else { + reportConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List reportConfigs_ = + java.util.Collections.emptyList(); + + private void ensureReportConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + reportConfigs_ = + new java.util.ArrayList( + reportConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportConfig, + com.google.cloud.migrationcenter.v1.ReportConfig.Builder, + com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder> + reportConfigsBuilder_; + + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public java.util.List getReportConfigsList() { + if (reportConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(reportConfigs_); + } else { + return reportConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public int getReportConfigsCount() { + if (reportConfigsBuilder_ == null) { + return reportConfigs_.size(); + } else { + return reportConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public com.google.cloud.migrationcenter.v1.ReportConfig getReportConfigs(int index) { + if (reportConfigsBuilder_ == null) { + return reportConfigs_.get(index); + } else { + return reportConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public Builder setReportConfigs( + int index, com.google.cloud.migrationcenter.v1.ReportConfig value) { + if (reportConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReportConfigsIsMutable(); + reportConfigs_.set(index, value); + onChanged(); + } else { + reportConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public Builder setReportConfigs( + int index, com.google.cloud.migrationcenter.v1.ReportConfig.Builder builderForValue) { + if (reportConfigsBuilder_ == null) { + ensureReportConfigsIsMutable(); + reportConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + reportConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public Builder addReportConfigs(com.google.cloud.migrationcenter.v1.ReportConfig value) { + if (reportConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReportConfigsIsMutable(); + reportConfigs_.add(value); + onChanged(); + } else { + reportConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public Builder addReportConfigs( + int index, com.google.cloud.migrationcenter.v1.ReportConfig value) { + if (reportConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReportConfigsIsMutable(); + reportConfigs_.add(index, value); + onChanged(); + } else { + reportConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public Builder addReportConfigs( + com.google.cloud.migrationcenter.v1.ReportConfig.Builder builderForValue) { + if (reportConfigsBuilder_ == null) { + ensureReportConfigsIsMutable(); + reportConfigs_.add(builderForValue.build()); + onChanged(); + } else { + reportConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public Builder addReportConfigs( + int index, com.google.cloud.migrationcenter.v1.ReportConfig.Builder builderForValue) { + if (reportConfigsBuilder_ == null) { + ensureReportConfigsIsMutable(); + reportConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + reportConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public Builder addAllReportConfigs( + java.lang.Iterable values) { + if (reportConfigsBuilder_ == null) { + ensureReportConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reportConfigs_); + onChanged(); + } else { + reportConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public Builder clearReportConfigs() { + if (reportConfigsBuilder_ == null) { + reportConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + reportConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public Builder removeReportConfigs(int index) { + if (reportConfigsBuilder_ == null) { + ensureReportConfigsIsMutable(); + reportConfigs_.remove(index); + onChanged(); + } else { + reportConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public com.google.cloud.migrationcenter.v1.ReportConfig.Builder getReportConfigsBuilder( + int index) { + return getReportConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder getReportConfigsOrBuilder( + int index) { + if (reportConfigsBuilder_ == null) { + return reportConfigs_.get(index); + } else { + return reportConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public java.util.List + getReportConfigsOrBuilderList() { + if (reportConfigsBuilder_ != null) { + return reportConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(reportConfigs_); + } + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public com.google.cloud.migrationcenter.v1.ReportConfig.Builder addReportConfigsBuilder() { + return getReportConfigsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.ReportConfig.getDefaultInstance()); + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public com.google.cloud.migrationcenter.v1.ReportConfig.Builder addReportConfigsBuilder( + int index) { + return getReportConfigsFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.ReportConfig.getDefaultInstance()); + } + /** + * + * + *
+     * A list of report configs.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + public java.util.List + getReportConfigsBuilderList() { + return getReportConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportConfig, + com.google.cloud.migrationcenter.v1.ReportConfig.Builder, + com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder> + getReportConfigsFieldBuilder() { + if (reportConfigsBuilder_ == null) { + reportConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportConfig, + com.google.cloud.migrationcenter.v1.ReportConfig.Builder, + com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder>( + reportConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + reportConfigs_ = null; + } + return reportConfigsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListReportConfigsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListReportConfigsResponse) + private static final com.google.cloud.migrationcenter.v1.ListReportConfigsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListReportConfigsResponse(); + } + + public static com.google.cloud.migrationcenter.v1.ListReportConfigsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReportConfigsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportConfigsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsResponseOrBuilder.java new file mode 100644 index 000000000000..dcc93d410f2d --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportConfigsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListReportConfigsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListReportConfigsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of report configs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + java.util.List getReportConfigsList(); + /** + * + * + *
+   * A list of report configs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + com.google.cloud.migrationcenter.v1.ReportConfig getReportConfigs(int index); + /** + * + * + *
+   * A list of report configs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + int getReportConfigsCount(); + /** + * + * + *
+   * A list of report configs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + java.util.List + getReportConfigsOrBuilderList(); + /** + * + * + *
+   * A list of report configs.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder getReportConfigsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsRequest.java new file mode 100644 index 000000000000..8d5b58ef6517 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsRequest.java @@ -0,0 +1,1432 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request for a list of Reports.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListReportsRequest} + */ +public final class ListReportsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListReportsRequest) + ListReportsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListReportsRequest.newBuilder() to construct. + private ListReportsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListReportsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListReportsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListReportsRequest.class, + com.google.cloud.migrationcenter.v1.ListReportsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for `ListReportsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for `ListReportsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. The server may return fewer items than requested.
+   * If unspecified, the server will pick an appropriate default value.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results that the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results that the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 6; + private int view_ = 0; + /** + * + * + *
+   * Determines what information to retrieve for each Report.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Determines what information to retrieve for each Report.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportView getView() { + com.google.cloud.migrationcenter.v1.ReportView result = + com.google.cloud.migrationcenter.v1.ReportView.forNumber(view_); + return result == null ? com.google.cloud.migrationcenter.v1.ReportView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ReportView.REPORT_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(6, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + if (view_ + != com.google.cloud.migrationcenter.v1.ReportView.REPORT_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListReportsRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListReportsRequest other = + (com.google.cloud.migrationcenter.v1.ListReportsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListReportsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request for a list of Reports.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListReportsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListReportsRequest) + com.google.cloud.migrationcenter.v1.ListReportsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListReportsRequest.class, + com.google.cloud.migrationcenter.v1.ListReportsRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListReportsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportsRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListReportsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportsRequest build() { + com.google.cloud.migrationcenter.v1.ListReportsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportsRequest buildPartial() { + com.google.cloud.migrationcenter.v1.ListReportsRequest result = + new com.google.cloud.migrationcenter.v1.ListReportsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListReportsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListReportsRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListReportsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListReportsRequest other) { + if (other == com.google.cloud.migrationcenter.v1.ListReportsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for `ListReportsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListReportsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListReportsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListReportsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListReportsRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. The server may return fewer items than requested.
+     * If unspecified, the server will pick an appropriate default value.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. The server may return fewer items than requested.
+     * If unspecified, the server will pick an appropriate default value.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. The server may return fewer items than requested.
+     * If unspecified, the server will pick an appropriate default value.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results that the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results that the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results that the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results that the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results that the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Determines what information to retrieve for each Report.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Determines what information to retrieve for each Report.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Determines what information to retrieve for each Report.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportView getView() { + com.google.cloud.migrationcenter.v1.ReportView result = + com.google.cloud.migrationcenter.v1.ReportView.forNumber(view_); + return result == null ? com.google.cloud.migrationcenter.v1.ReportView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Determines what information to retrieve for each Report.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.migrationcenter.v1.ReportView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Determines what information to retrieve for each Report.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000020); + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListReportsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListReportsRequest) + private static final com.google.cloud.migrationcenter.v1.ListReportsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListReportsRequest(); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReportsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsRequestOrBuilder.java new file mode 100644 index 000000000000..e189f7f029fb --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListReportsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListReportsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for `ListReportsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for `ListReportsRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. The server may return fewer items than requested.
+   * If unspecified, the server will pick an appropriate default value.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results that the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results that the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Determines what information to retrieve for each Report.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Determines what information to retrieve for each Report.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportView view = 6; + * + * @return The view. + */ + com.google.cloud.migrationcenter.v1.ReportView getView(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsResponse.java new file mode 100644 index 000000000000..2bf8762933dc --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsResponse.java @@ -0,0 +1,1395 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Response message for listing Reports.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListReportsResponse} + */ +public final class ListReportsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListReportsResponse) + ListReportsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListReportsResponse.newBuilder() to construct. + private ListReportsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListReportsResponse() { + reports_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListReportsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListReportsResponse.class, + com.google.cloud.migrationcenter.v1.ListReportsResponse.Builder.class); + } + + public static final int REPORTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List reports_; + /** + * + * + *
+   * The list of Reports.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + @java.lang.Override + public java.util.List getReportsList() { + return reports_; + } + /** + * + * + *
+   * The list of Reports.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + @java.lang.Override + public java.util.List + getReportsOrBuilderList() { + return reports_; + } + /** + * + * + *
+   * The list of Reports.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + @java.lang.Override + public int getReportsCount() { + return reports_.size(); + } + /** + * + * + *
+   * The list of Reports.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Report getReports(int index) { + return reports_.get(index); + } + /** + * + * + *
+   * The list of Reports.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportOrBuilder getReportsOrBuilder(int index) { + return reports_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < reports_.size(); i++) { + output.writeMessage(1, reports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < reports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, reports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListReportsResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListReportsResponse other = + (com.google.cloud.migrationcenter.v1.ListReportsResponse) obj; + + if (!getReportsList().equals(other.getReportsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getReportsCount() > 0) { + hash = (37 * hash) + REPORTS_FIELD_NUMBER; + hash = (53 * hash) + getReportsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListReportsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for listing Reports.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListReportsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListReportsResponse) + com.google.cloud.migrationcenter.v1.ListReportsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListReportsResponse.class, + com.google.cloud.migrationcenter.v1.ListReportsResponse.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListReportsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (reportsBuilder_ == null) { + reports_ = java.util.Collections.emptyList(); + } else { + reports_ = null; + reportsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListReportsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportsResponse getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListReportsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportsResponse build() { + com.google.cloud.migrationcenter.v1.ListReportsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportsResponse buildPartial() { + com.google.cloud.migrationcenter.v1.ListReportsResponse result = + new com.google.cloud.migrationcenter.v1.ListReportsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ListReportsResponse result) { + if (reportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + reports_ = java.util.Collections.unmodifiableList(reports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.reports_ = reports_; + } else { + result.reports_ = reportsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListReportsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListReportsResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListReportsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListReportsResponse other) { + if (other == com.google.cloud.migrationcenter.v1.ListReportsResponse.getDefaultInstance()) + return this; + if (reportsBuilder_ == null) { + if (!other.reports_.isEmpty()) { + if (reports_.isEmpty()) { + reports_ = other.reports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReportsIsMutable(); + reports_.addAll(other.reports_); + } + onChanged(); + } + } else { + if (!other.reports_.isEmpty()) { + if (reportsBuilder_.isEmpty()) { + reportsBuilder_.dispose(); + reportsBuilder_ = null; + reports_ = other.reports_; + bitField0_ = (bitField0_ & ~0x00000001); + reportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReportsFieldBuilder() + : null; + } else { + reportsBuilder_.addAllMessages(other.reports_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.Report m = + input.readMessage( + com.google.cloud.migrationcenter.v1.Report.parser(), extensionRegistry); + if (reportsBuilder_ == null) { + ensureReportsIsMutable(); + reports_.add(m); + } else { + reportsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List reports_ = + java.util.Collections.emptyList(); + + private void ensureReportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + reports_ = new java.util.ArrayList(reports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Report, + com.google.cloud.migrationcenter.v1.Report.Builder, + com.google.cloud.migrationcenter.v1.ReportOrBuilder> + reportsBuilder_; + + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public java.util.List getReportsList() { + if (reportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(reports_); + } else { + return reportsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public int getReportsCount() { + if (reportsBuilder_ == null) { + return reports_.size(); + } else { + return reportsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public com.google.cloud.migrationcenter.v1.Report getReports(int index) { + if (reportsBuilder_ == null) { + return reports_.get(index); + } else { + return reportsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public Builder setReports(int index, com.google.cloud.migrationcenter.v1.Report value) { + if (reportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReportsIsMutable(); + reports_.set(index, value); + onChanged(); + } else { + reportsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public Builder setReports( + int index, com.google.cloud.migrationcenter.v1.Report.Builder builderForValue) { + if (reportsBuilder_ == null) { + ensureReportsIsMutable(); + reports_.set(index, builderForValue.build()); + onChanged(); + } else { + reportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public Builder addReports(com.google.cloud.migrationcenter.v1.Report value) { + if (reportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReportsIsMutable(); + reports_.add(value); + onChanged(); + } else { + reportsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public Builder addReports(int index, com.google.cloud.migrationcenter.v1.Report value) { + if (reportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReportsIsMutable(); + reports_.add(index, value); + onChanged(); + } else { + reportsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public Builder addReports(com.google.cloud.migrationcenter.v1.Report.Builder builderForValue) { + if (reportsBuilder_ == null) { + ensureReportsIsMutable(); + reports_.add(builderForValue.build()); + onChanged(); + } else { + reportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public Builder addReports( + int index, com.google.cloud.migrationcenter.v1.Report.Builder builderForValue) { + if (reportsBuilder_ == null) { + ensureReportsIsMutable(); + reports_.add(index, builderForValue.build()); + onChanged(); + } else { + reportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public Builder addAllReports( + java.lang.Iterable values) { + if (reportsBuilder_ == null) { + ensureReportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reports_); + onChanged(); + } else { + reportsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public Builder clearReports() { + if (reportsBuilder_ == null) { + reports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + reportsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public Builder removeReports(int index) { + if (reportsBuilder_ == null) { + ensureReportsIsMutable(); + reports_.remove(index); + onChanged(); + } else { + reportsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public com.google.cloud.migrationcenter.v1.Report.Builder getReportsBuilder(int index) { + return getReportsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public com.google.cloud.migrationcenter.v1.ReportOrBuilder getReportsOrBuilder(int index) { + if (reportsBuilder_ == null) { + return reports_.get(index); + } else { + return reportsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public java.util.List + getReportsOrBuilderList() { + if (reportsBuilder_ != null) { + return reportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(reports_); + } + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public com.google.cloud.migrationcenter.v1.Report.Builder addReportsBuilder() { + return getReportsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.Report.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public com.google.cloud.migrationcenter.v1.Report.Builder addReportsBuilder(int index) { + return getReportsFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.Report.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Reports.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + public java.util.List + getReportsBuilderList() { + return getReportsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Report, + com.google.cloud.migrationcenter.v1.Report.Builder, + com.google.cloud.migrationcenter.v1.ReportOrBuilder> + getReportsFieldBuilder() { + if (reportsBuilder_ == null) { + reportsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Report, + com.google.cloud.migrationcenter.v1.Report.Builder, + com.google.cloud.migrationcenter.v1.ReportOrBuilder>( + reports_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + reports_ = null; + } + return reportsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListReportsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListReportsResponse) + private static final com.google.cloud.migrationcenter.v1.ListReportsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListReportsResponse(); + } + + public static com.google.cloud.migrationcenter.v1.ListReportsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReportsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListReportsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsResponseOrBuilder.java new file mode 100644 index 000000000000..911cc6f4ce05 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListReportsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListReportsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListReportsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Reports.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + java.util.List getReportsList(); + /** + * + * + *
+   * The list of Reports.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + com.google.cloud.migrationcenter.v1.Report getReports(int index); + /** + * + * + *
+   * The list of Reports.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + int getReportsCount(); + /** + * + * + *
+   * The list of Reports.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + java.util.List + getReportsOrBuilderList(); + /** + * + * + *
+   * The list of Reports.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + com.google.cloud.migrationcenter.v1.ReportOrBuilder getReportsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesRequest.java new file mode 100644 index 000000000000..0597b6cb659e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request for a list of sources.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListSourcesRequest} + */ +public final class ListSourcesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListSourcesRequest) + ListSourcesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSourcesRequest.newBuilder() to construct. + private ListSourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSourcesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSourcesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListSourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListSourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListSourcesRequest.class, + com.google.cloud.migrationcenter.v1.ListSourcesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for `ListSourcesRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for `ListSourcesRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. The server may return fewer items than requested.
+   * If unspecified, the server will pick an appropriate default value.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results that the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results that the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListSourcesRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListSourcesRequest other = + (com.google.cloud.migrationcenter.v1.ListSourcesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListSourcesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request for a list of sources.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListSourcesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListSourcesRequest) + com.google.cloud.migrationcenter.v1.ListSourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListSourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListSourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListSourcesRequest.class, + com.google.cloud.migrationcenter.v1.ListSourcesRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListSourcesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListSourcesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListSourcesRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListSourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListSourcesRequest build() { + com.google.cloud.migrationcenter.v1.ListSourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListSourcesRequest buildPartial() { + com.google.cloud.migrationcenter.v1.ListSourcesRequest result = + new com.google.cloud.migrationcenter.v1.ListSourcesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListSourcesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListSourcesRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListSourcesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListSourcesRequest other) { + if (other == com.google.cloud.migrationcenter.v1.ListSourcesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for `ListSourcesRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListSourcesRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for `ListSourcesRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListSourcesRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for `ListSourcesRequest`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. The server may return fewer items than requested.
+     * If unspecified, the server will pick an appropriate default value.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. The server may return fewer items than requested.
+     * If unspecified, the server will pick an appropriate default value.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. The server may return fewer items than requested.
+     * If unspecified, the server will pick an appropriate default value.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results that the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results that the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results that the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results that the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results that the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListSourcesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListSourcesRequest) + private static final com.google.cloud.migrationcenter.v1.ListSourcesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListSourcesRequest(); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSourcesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListSourcesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesRequestOrBuilder.java new file mode 100644 index 000000000000..e87e5381d6e3 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListSourcesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListSourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for `ListSourcesRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for `ListSourcesRequest`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. The server may return fewer items than requested.
+   * If unspecified, the server will pick an appropriate default value.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results that the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results that the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesResponse.java new file mode 100644 index 000000000000..7805bb1aff3d --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesResponse.java @@ -0,0 +1,1395 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Response message for listing sources.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListSourcesResponse} + */ +public final class ListSourcesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ListSourcesResponse) + ListSourcesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSourcesResponse.newBuilder() to construct. + private ListSourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSourcesResponse() { + sources_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSourcesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListSourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListSourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListSourcesResponse.class, + com.google.cloud.migrationcenter.v1.ListSourcesResponse.Builder.class); + } + + public static final int SOURCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List sources_; + /** + * + * + *
+   * The list of sources.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + @java.lang.Override + public java.util.List getSourcesList() { + return sources_; + } + /** + * + * + *
+   * The list of sources.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + @java.lang.Override + public java.util.List + getSourcesOrBuilderList() { + return sources_; + } + /** + * + * + *
+   * The list of sources.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + @java.lang.Override + public int getSourcesCount() { + return sources_.size(); + } + /** + * + * + *
+   * The list of sources.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Source getSources(int index) { + return sources_.get(index); + } + /** + * + * + *
+   * The list of sources.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.SourceOrBuilder getSourcesOrBuilder(int index) { + return sources_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < sources_.size(); i++) { + output.writeMessage(1, sources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < sources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ListSourcesResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ListSourcesResponse other = + (com.google.cloud.migrationcenter.v1.ListSourcesResponse) obj; + + if (!getSourcesList().equals(other.getSourcesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSourcesCount() > 0) { + hash = (37 * hash) + SOURCES_FIELD_NUMBER; + hash = (53 * hash) + getSourcesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ListSourcesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for listing sources.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ListSourcesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ListSourcesResponse) + com.google.cloud.migrationcenter.v1.ListSourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListSourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListSourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ListSourcesResponse.class, + com.google.cloud.migrationcenter.v1.ListSourcesResponse.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ListSourcesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (sourcesBuilder_ == null) { + sources_ = java.util.Collections.emptyList(); + } else { + sources_ = null; + sourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ListSourcesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListSourcesResponse getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ListSourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListSourcesResponse build() { + com.google.cloud.migrationcenter.v1.ListSourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListSourcesResponse buildPartial() { + com.google.cloud.migrationcenter.v1.ListSourcesResponse result = + new com.google.cloud.migrationcenter.v1.ListSourcesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ListSourcesResponse result) { + if (sourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sources_ = java.util.Collections.unmodifiableList(sources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sources_ = sources_; + } else { + result.sources_ = sourcesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ListSourcesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ListSourcesResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ListSourcesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ListSourcesResponse other) { + if (other == com.google.cloud.migrationcenter.v1.ListSourcesResponse.getDefaultInstance()) + return this; + if (sourcesBuilder_ == null) { + if (!other.sources_.isEmpty()) { + if (sources_.isEmpty()) { + sources_ = other.sources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSourcesIsMutable(); + sources_.addAll(other.sources_); + } + onChanged(); + } + } else { + if (!other.sources_.isEmpty()) { + if (sourcesBuilder_.isEmpty()) { + sourcesBuilder_.dispose(); + sourcesBuilder_ = null; + sources_ = other.sources_; + bitField0_ = (bitField0_ & ~0x00000001); + sourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSourcesFieldBuilder() + : null; + } else { + sourcesBuilder_.addAllMessages(other.sources_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.Source m = + input.readMessage( + com.google.cloud.migrationcenter.v1.Source.parser(), extensionRegistry); + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(m); + } else { + sourcesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List sources_ = + java.util.Collections.emptyList(); + + private void ensureSourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sources_ = new java.util.ArrayList(sources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Source, + com.google.cloud.migrationcenter.v1.Source.Builder, + com.google.cloud.migrationcenter.v1.SourceOrBuilder> + sourcesBuilder_; + + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public java.util.List getSourcesList() { + if (sourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(sources_); + } else { + return sourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public int getSourcesCount() { + if (sourcesBuilder_ == null) { + return sources_.size(); + } else { + return sourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public com.google.cloud.migrationcenter.v1.Source getSources(int index) { + if (sourcesBuilder_ == null) { + return sources_.get(index); + } else { + return sourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public Builder setSources(int index, com.google.cloud.migrationcenter.v1.Source value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.set(index, value); + onChanged(); + } else { + sourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public Builder setSources( + int index, com.google.cloud.migrationcenter.v1.Source.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.set(index, builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public Builder addSources(com.google.cloud.migrationcenter.v1.Source value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.add(value); + onChanged(); + } else { + sourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public Builder addSources(int index, com.google.cloud.migrationcenter.v1.Source value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.add(index, value); + onChanged(); + } else { + sourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public Builder addSources(com.google.cloud.migrationcenter.v1.Source.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public Builder addSources( + int index, com.google.cloud.migrationcenter.v1.Source.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(index, builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public Builder addAllSources( + java.lang.Iterable values) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sources_); + onChanged(); + } else { + sourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public Builder clearSources() { + if (sourcesBuilder_ == null) { + sources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public Builder removeSources(int index) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.remove(index); + onChanged(); + } else { + sourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public com.google.cloud.migrationcenter.v1.Source.Builder getSourcesBuilder(int index) { + return getSourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public com.google.cloud.migrationcenter.v1.SourceOrBuilder getSourcesOrBuilder(int index) { + if (sourcesBuilder_ == null) { + return sources_.get(index); + } else { + return sourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public java.util.List + getSourcesOrBuilderList() { + if (sourcesBuilder_ != null) { + return sourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sources_); + } + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public com.google.cloud.migrationcenter.v1.Source.Builder addSourcesBuilder() { + return getSourcesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.Source.getDefaultInstance()); + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public com.google.cloud.migrationcenter.v1.Source.Builder addSourcesBuilder(int index) { + return getSourcesFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.Source.getDefaultInstance()); + } + /** + * + * + *
+     * The list of sources.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + public java.util.List + getSourcesBuilderList() { + return getSourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Source, + com.google.cloud.migrationcenter.v1.Source.Builder, + com.google.cloud.migrationcenter.v1.SourceOrBuilder> + getSourcesFieldBuilder() { + if (sourcesBuilder_ == null) { + sourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Source, + com.google.cloud.migrationcenter.v1.Source.Builder, + com.google.cloud.migrationcenter.v1.SourceOrBuilder>( + sources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sources_ = null; + } + return sourcesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ListSourcesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ListSourcesResponse) + private static final com.google.cloud.migrationcenter.v1.ListSourcesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ListSourcesResponse(); + } + + public static com.google.cloud.migrationcenter.v1.ListSourcesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSourcesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ListSourcesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesResponseOrBuilder.java new file mode 100644 index 000000000000..2d4396dfa372 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ListSourcesResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ListSourcesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ListSourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of sources.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + java.util.List getSourcesList(); + /** + * + * + *
+   * The list of sources.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + com.google.cloud.migrationcenter.v1.Source getSources(int index); + /** + * + * + *
+   * The list of sources.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + int getSourcesCount(); + /** + * + * + *
+   * The list of sources.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + java.util.List + getSourcesOrBuilderList(); + /** + * + * + *
+   * The list of sources.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + com.google.cloud.migrationcenter.v1.SourceOrBuilder getSourcesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/LocationName.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/LocationName.java new file mode 100644 index 000000000000..775a9e53b5c9 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineArchitectureDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineArchitectureDetails.java new file mode 100644 index 000000000000..dff8e071e7ef --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineArchitectureDetails.java @@ -0,0 +1,2124 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Details of the machine architecture.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachineArchitectureDetails} + */ +public final class MachineArchitectureDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.MachineArchitectureDetails) + MachineArchitectureDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use MachineArchitectureDetails.newBuilder() to construct. + private MachineArchitectureDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MachineArchitectureDetails() { + cpuArchitecture_ = ""; + cpuName_ = ""; + vendor_ = ""; + firmwareType_ = 0; + hyperthreading_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MachineArchitectureDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineArchitectureDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineArchitectureDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.class, + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.Builder.class); + } + + /** + * + * + *
+   * Firmware type.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType} + */ + public enum FirmwareType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified or unknown.
+     * 
+ * + * FIRMWARE_TYPE_UNSPECIFIED = 0; + */ + FIRMWARE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * BIOS firmware.
+     * 
+ * + * BIOS = 1; + */ + BIOS(1), + /** + * + * + *
+     * EFI firmware.
+     * 
+ * + * EFI = 2; + */ + EFI(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified or unknown.
+     * 
+ * + * FIRMWARE_TYPE_UNSPECIFIED = 0; + */ + public static final int FIRMWARE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * BIOS firmware.
+     * 
+ * + * BIOS = 1; + */ + public static final int BIOS_VALUE = 1; + /** + * + * + *
+     * EFI firmware.
+     * 
+ * + * EFI = 2; + */ + public static final int EFI_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FirmwareType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FirmwareType forNumber(int value) { + switch (value) { + case 0: + return FIRMWARE_TYPE_UNSPECIFIED; + case 1: + return BIOS; + case 2: + return EFI; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FirmwareType findValueByNumber(int number) { + return FirmwareType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FirmwareType[] VALUES = values(); + + public static FirmwareType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FirmwareType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType) + } + + /** + * + * + *
+   * CPU hyper-threading support.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading} + */ + public enum CpuHyperThreading implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified or unknown.
+     * 
+ * + * CPU_HYPER_THREADING_UNSPECIFIED = 0; + */ + CPU_HYPER_THREADING_UNSPECIFIED(0), + /** + * + * + *
+     * Hyper-threading is disabled.
+     * 
+ * + * DISABLED = 1; + */ + DISABLED(1), + /** + * + * + *
+     * Hyper-threading is enabled.
+     * 
+ * + * ENABLED = 2; + */ + ENABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified or unknown.
+     * 
+ * + * CPU_HYPER_THREADING_UNSPECIFIED = 0; + */ + public static final int CPU_HYPER_THREADING_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Hyper-threading is disabled.
+     * 
+ * + * DISABLED = 1; + */ + public static final int DISABLED_VALUE = 1; + /** + * + * + *
+     * Hyper-threading is enabled.
+     * 
+ * + * ENABLED = 2; + */ + public static final int ENABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CpuHyperThreading valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CpuHyperThreading forNumber(int value) { + switch (value) { + case 0: + return CPU_HYPER_THREADING_UNSPECIFIED; + case 1: + return DISABLED; + case 2: + return ENABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CpuHyperThreading findValueByNumber(int number) { + return CpuHyperThreading.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final CpuHyperThreading[] VALUES = values(); + + public static CpuHyperThreading valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CpuHyperThreading(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading) + } + + public static final int CPU_ARCHITECTURE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cpuArchitecture_ = ""; + /** + * + * + *
+   * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc.
+   * 
+ * + * string cpu_architecture = 1; + * + * @return The cpuArchitecture. + */ + @java.lang.Override + public java.lang.String getCpuArchitecture() { + java.lang.Object ref = cpuArchitecture_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuArchitecture_ = s; + return s; + } + } + /** + * + * + *
+   * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc.
+   * 
+ * + * string cpu_architecture = 1; + * + * @return The bytes for cpuArchitecture. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCpuArchitectureBytes() { + java.lang.Object ref = cpuArchitecture_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpuArchitecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CPU_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object cpuName_ = ""; + /** + * + * + *
+   * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc.
+   * 
+ * + * string cpu_name = 2; + * + * @return The cpuName. + */ + @java.lang.Override + public java.lang.String getCpuName() { + java.lang.Object ref = cpuName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuName_ = s; + return s; + } + } + /** + * + * + *
+   * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc.
+   * 
+ * + * string cpu_name = 2; + * + * @return The bytes for cpuName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCpuNameBytes() { + java.lang.Object ref = cpuName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpuName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VENDOR_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object vendor_ = ""; + /** + * + * + *
+   * Hardware vendor.
+   * 
+ * + * string vendor = 3; + * + * @return The vendor. + */ + @java.lang.Override + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vendor_ = s; + return s; + } + } + /** + * + * + *
+   * Hardware vendor.
+   * 
+ * + * string vendor = 3; + * + * @return The bytes for vendor. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CPU_THREAD_COUNT_FIELD_NUMBER = 4; + private int cpuThreadCount_ = 0; + /** + * + * + *
+   * Number of CPU threads allocated to the machine.
+   * 
+ * + * int32 cpu_thread_count = 4; + * + * @return The cpuThreadCount. + */ + @java.lang.Override + public int getCpuThreadCount() { + return cpuThreadCount_; + } + + public static final int CPU_SOCKET_COUNT_FIELD_NUMBER = 5; + private int cpuSocketCount_ = 0; + /** + * + * + *
+   * Number of processor sockets allocated to the machine.
+   * 
+ * + * int32 cpu_socket_count = 5; + * + * @return The cpuSocketCount. + */ + @java.lang.Override + public int getCpuSocketCount() { + return cpuSocketCount_; + } + + public static final int BIOS_FIELD_NUMBER = 6; + private com.google.cloud.migrationcenter.v1.BiosDetails bios_; + /** + * + * + *
+   * BIOS Details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + * + * @return Whether the bios field is set. + */ + @java.lang.Override + public boolean hasBios() { + return bios_ != null; + } + /** + * + * + *
+   * BIOS Details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + * + * @return The bios. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BiosDetails getBios() { + return bios_ == null + ? com.google.cloud.migrationcenter.v1.BiosDetails.getDefaultInstance() + : bios_; + } + /** + * + * + *
+   * BIOS Details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.BiosDetailsOrBuilder getBiosOrBuilder() { + return bios_ == null + ? com.google.cloud.migrationcenter.v1.BiosDetails.getDefaultInstance() + : bios_; + } + + public static final int FIRMWARE_TYPE_FIELD_NUMBER = 7; + private int firmwareType_ = 0; + /** + * + * + *
+   * Firmware type.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + * + * + * @return The enum numeric value on the wire for firmwareType. + */ + @java.lang.Override + public int getFirmwareTypeValue() { + return firmwareType_; + } + /** + * + * + *
+   * Firmware type.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + * + * + * @return The firmwareType. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType + getFirmwareType() { + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType result = + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType.forNumber( + firmwareType_); + return result == null + ? com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType.UNRECOGNIZED + : result; + } + + public static final int HYPERTHREADING_FIELD_NUMBER = 8; + private int hyperthreading_ = 0; + /** + * + * + *
+   * CPU hyper-threading support.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + * + * + * @return The enum numeric value on the wire for hyperthreading. + */ + @java.lang.Override + public int getHyperthreadingValue() { + return hyperthreading_; + } + /** + * + * + *
+   * CPU hyper-threading support.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + * + * + * @return The hyperthreading. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading + getHyperthreading() { + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading result = + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading.forNumber( + hyperthreading_); + return result == null + ? com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading + .UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuArchitecture_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpuArchitecture_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cpuName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, vendor_); + } + if (cpuThreadCount_ != 0) { + output.writeInt32(4, cpuThreadCount_); + } + if (cpuSocketCount_ != 0) { + output.writeInt32(5, cpuSocketCount_); + } + if (bios_ != null) { + output.writeMessage(6, getBios()); + } + if (firmwareType_ + != com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType + .FIRMWARE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, firmwareType_); + } + if (hyperthreading_ + != com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading + .CPU_HYPER_THREADING_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, hyperthreading_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuArchitecture_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpuArchitecture_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cpuName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, vendor_); + } + if (cpuThreadCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, cpuThreadCount_); + } + if (cpuSocketCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, cpuSocketCount_); + } + if (bios_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getBios()); + } + if (firmwareType_ + != com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType + .FIRMWARE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, firmwareType_); + } + if (hyperthreading_ + != com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading + .CPU_HYPER_THREADING_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, hyperthreading_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.MachineArchitectureDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails other = + (com.google.cloud.migrationcenter.v1.MachineArchitectureDetails) obj; + + if (!getCpuArchitecture().equals(other.getCpuArchitecture())) return false; + if (!getCpuName().equals(other.getCpuName())) return false; + if (!getVendor().equals(other.getVendor())) return false; + if (getCpuThreadCount() != other.getCpuThreadCount()) return false; + if (getCpuSocketCount() != other.getCpuSocketCount()) return false; + if (hasBios() != other.hasBios()) return false; + if (hasBios()) { + if (!getBios().equals(other.getBios())) return false; + } + if (firmwareType_ != other.firmwareType_) return false; + if (hyperthreading_ != other.hyperthreading_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPU_ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + getCpuArchitecture().hashCode(); + hash = (37 * hash) + CPU_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCpuName().hashCode(); + hash = (37 * hash) + VENDOR_FIELD_NUMBER; + hash = (53 * hash) + getVendor().hashCode(); + hash = (37 * hash) + CPU_THREAD_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCpuThreadCount(); + hash = (37 * hash) + CPU_SOCKET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCpuSocketCount(); + if (hasBios()) { + hash = (37 * hash) + BIOS_FIELD_NUMBER; + hash = (53 * hash) + getBios().hashCode(); + } + hash = (37 * hash) + FIRMWARE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + firmwareType_; + hash = (37 * hash) + HYPERTHREADING_FIELD_NUMBER; + hash = (53 * hash) + hyperthreading_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of the machine architecture.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachineArchitectureDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.MachineArchitectureDetails) + com.google.cloud.migrationcenter.v1.MachineArchitectureDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineArchitectureDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineArchitectureDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.class, + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpuArchitecture_ = ""; + cpuName_ = ""; + vendor_ = ""; + cpuThreadCount_ = 0; + cpuSocketCount_ = 0; + bios_ = null; + if (biosBuilder_ != null) { + biosBuilder_.dispose(); + biosBuilder_ = null; + } + firmwareType_ = 0; + hyperthreading_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineArchitectureDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetails + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetails build() { + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetails buildPartial() { + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails result = + new com.google.cloud.migrationcenter.v1.MachineArchitectureDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpuArchitecture_ = cpuArchitecture_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cpuName_ = cpuName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vendor_ = vendor_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cpuThreadCount_ = cpuThreadCount_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.cpuSocketCount_ = cpuSocketCount_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.bios_ = biosBuilder_ == null ? bios_ : biosBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.firmwareType_ = firmwareType_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.hyperthreading_ = hyperthreading_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.MachineArchitectureDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.MachineArchitectureDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.MachineArchitectureDetails other) { + if (other + == com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.getDefaultInstance()) + return this; + if (!other.getCpuArchitecture().isEmpty()) { + cpuArchitecture_ = other.cpuArchitecture_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCpuName().isEmpty()) { + cpuName_ = other.cpuName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getVendor().isEmpty()) { + vendor_ = other.vendor_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getCpuThreadCount() != 0) { + setCpuThreadCount(other.getCpuThreadCount()); + } + if (other.getCpuSocketCount() != 0) { + setCpuSocketCount(other.getCpuSocketCount()); + } + if (other.hasBios()) { + mergeBios(other.getBios()); + } + if (other.firmwareType_ != 0) { + setFirmwareTypeValue(other.getFirmwareTypeValue()); + } + if (other.hyperthreading_ != 0) { + setHyperthreadingValue(other.getHyperthreadingValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + cpuArchitecture_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + cpuName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + vendor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + cpuThreadCount_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + cpuSocketCount_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + input.readMessage(getBiosFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + firmwareType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + hyperthreading_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object cpuArchitecture_ = ""; + /** + * + * + *
+     * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc.
+     * 
+ * + * string cpu_architecture = 1; + * + * @return The cpuArchitecture. + */ + public java.lang.String getCpuArchitecture() { + java.lang.Object ref = cpuArchitecture_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuArchitecture_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc.
+     * 
+ * + * string cpu_architecture = 1; + * + * @return The bytes for cpuArchitecture. + */ + public com.google.protobuf.ByteString getCpuArchitectureBytes() { + java.lang.Object ref = cpuArchitecture_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpuArchitecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc.
+     * 
+ * + * string cpu_architecture = 1; + * + * @param value The cpuArchitecture to set. + * @return This builder for chaining. + */ + public Builder setCpuArchitecture(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cpuArchitecture_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc.
+     * 
+ * + * string cpu_architecture = 1; + * + * @return This builder for chaining. + */ + public Builder clearCpuArchitecture() { + cpuArchitecture_ = getDefaultInstance().getCpuArchitecture(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc.
+     * 
+ * + * string cpu_architecture = 1; + * + * @param value The bytes for cpuArchitecture to set. + * @return This builder for chaining. + */ + public Builder setCpuArchitectureBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cpuArchitecture_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object cpuName_ = ""; + /** + * + * + *
+     * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc.
+     * 
+ * + * string cpu_name = 2; + * + * @return The cpuName. + */ + public java.lang.String getCpuName() { + java.lang.Object ref = cpuName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc.
+     * 
+ * + * string cpu_name = 2; + * + * @return The bytes for cpuName. + */ + public com.google.protobuf.ByteString getCpuNameBytes() { + java.lang.Object ref = cpuName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpuName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc.
+     * 
+ * + * string cpu_name = 2; + * + * @param value The cpuName to set. + * @return This builder for chaining. + */ + public Builder setCpuName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cpuName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc.
+     * 
+ * + * string cpu_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearCpuName() { + cpuName_ = getDefaultInstance().getCpuName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc.
+     * 
+ * + * string cpu_name = 2; + * + * @param value The bytes for cpuName to set. + * @return This builder for chaining. + */ + public Builder setCpuNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cpuName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object vendor_ = ""; + /** + * + * + *
+     * Hardware vendor.
+     * 
+ * + * string vendor = 3; + * + * @return The vendor. + */ + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vendor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hardware vendor.
+     * 
+ * + * string vendor = 3; + * + * @return The bytes for vendor. + */ + public com.google.protobuf.ByteString getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hardware vendor.
+     * 
+ * + * string vendor = 3; + * + * @param value The vendor to set. + * @return This builder for chaining. + */ + public Builder setVendor(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vendor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Hardware vendor.
+     * 
+ * + * string vendor = 3; + * + * @return This builder for chaining. + */ + public Builder clearVendor() { + vendor_ = getDefaultInstance().getVendor(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Hardware vendor.
+     * 
+ * + * string vendor = 3; + * + * @param value The bytes for vendor to set. + * @return This builder for chaining. + */ + public Builder setVendorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vendor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int cpuThreadCount_; + /** + * + * + *
+     * Number of CPU threads allocated to the machine.
+     * 
+ * + * int32 cpu_thread_count = 4; + * + * @return The cpuThreadCount. + */ + @java.lang.Override + public int getCpuThreadCount() { + return cpuThreadCount_; + } + /** + * + * + *
+     * Number of CPU threads allocated to the machine.
+     * 
+ * + * int32 cpu_thread_count = 4; + * + * @param value The cpuThreadCount to set. + * @return This builder for chaining. + */ + public Builder setCpuThreadCount(int value) { + + cpuThreadCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of CPU threads allocated to the machine.
+     * 
+ * + * int32 cpu_thread_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearCpuThreadCount() { + bitField0_ = (bitField0_ & ~0x00000008); + cpuThreadCount_ = 0; + onChanged(); + return this; + } + + private int cpuSocketCount_; + /** + * + * + *
+     * Number of processor sockets allocated to the machine.
+     * 
+ * + * int32 cpu_socket_count = 5; + * + * @return The cpuSocketCount. + */ + @java.lang.Override + public int getCpuSocketCount() { + return cpuSocketCount_; + } + /** + * + * + *
+     * Number of processor sockets allocated to the machine.
+     * 
+ * + * int32 cpu_socket_count = 5; + * + * @param value The cpuSocketCount to set. + * @return This builder for chaining. + */ + public Builder setCpuSocketCount(int value) { + + cpuSocketCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of processor sockets allocated to the machine.
+     * 
+ * + * int32 cpu_socket_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearCpuSocketCount() { + bitField0_ = (bitField0_ & ~0x00000010); + cpuSocketCount_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.BiosDetails bios_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.BiosDetails, + com.google.cloud.migrationcenter.v1.BiosDetails.Builder, + com.google.cloud.migrationcenter.v1.BiosDetailsOrBuilder> + biosBuilder_; + /** + * + * + *
+     * BIOS Details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + * + * @return Whether the bios field is set. + */ + public boolean hasBios() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * BIOS Details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + * + * @return The bios. + */ + public com.google.cloud.migrationcenter.v1.BiosDetails getBios() { + if (biosBuilder_ == null) { + return bios_ == null + ? com.google.cloud.migrationcenter.v1.BiosDetails.getDefaultInstance() + : bios_; + } else { + return biosBuilder_.getMessage(); + } + } + /** + * + * + *
+     * BIOS Details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + */ + public Builder setBios(com.google.cloud.migrationcenter.v1.BiosDetails value) { + if (biosBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bios_ = value; + } else { + biosBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS Details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + */ + public Builder setBios( + com.google.cloud.migrationcenter.v1.BiosDetails.Builder builderForValue) { + if (biosBuilder_ == null) { + bios_ = builderForValue.build(); + } else { + biosBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS Details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + */ + public Builder mergeBios(com.google.cloud.migrationcenter.v1.BiosDetails value) { + if (biosBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && bios_ != null + && bios_ != com.google.cloud.migrationcenter.v1.BiosDetails.getDefaultInstance()) { + getBiosBuilder().mergeFrom(value); + } else { + bios_ = value; + } + } else { + biosBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS Details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + */ + public Builder clearBios() { + bitField0_ = (bitField0_ & ~0x00000020); + bios_ = null; + if (biosBuilder_ != null) { + biosBuilder_.dispose(); + biosBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * BIOS Details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + */ + public com.google.cloud.migrationcenter.v1.BiosDetails.Builder getBiosBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getBiosFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * BIOS Details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + */ + public com.google.cloud.migrationcenter.v1.BiosDetailsOrBuilder getBiosOrBuilder() { + if (biosBuilder_ != null) { + return biosBuilder_.getMessageOrBuilder(); + } else { + return bios_ == null + ? com.google.cloud.migrationcenter.v1.BiosDetails.getDefaultInstance() + : bios_; + } + } + /** + * + * + *
+     * BIOS Details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.BiosDetails, + com.google.cloud.migrationcenter.v1.BiosDetails.Builder, + com.google.cloud.migrationcenter.v1.BiosDetailsOrBuilder> + getBiosFieldBuilder() { + if (biosBuilder_ == null) { + biosBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.BiosDetails, + com.google.cloud.migrationcenter.v1.BiosDetails.Builder, + com.google.cloud.migrationcenter.v1.BiosDetailsOrBuilder>( + getBios(), getParentForChildren(), isClean()); + bios_ = null; + } + return biosBuilder_; + } + + private int firmwareType_ = 0; + /** + * + * + *
+     * Firmware type.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + * + * + * @return The enum numeric value on the wire for firmwareType. + */ + @java.lang.Override + public int getFirmwareTypeValue() { + return firmwareType_; + } + /** + * + * + *
+     * Firmware type.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + * + * + * @param value The enum numeric value on the wire for firmwareType to set. + * @return This builder for chaining. + */ + public Builder setFirmwareTypeValue(int value) { + firmwareType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Firmware type.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + * + * + * @return The firmwareType. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType + getFirmwareType() { + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType result = + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType.forNumber( + firmwareType_); + return result == null + ? com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Firmware type.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + * + * + * @param value The firmwareType to set. + * @return This builder for chaining. + */ + public Builder setFirmwareType( + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + firmwareType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Firmware type.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + * + * + * @return This builder for chaining. + */ + public Builder clearFirmwareType() { + bitField0_ = (bitField0_ & ~0x00000040); + firmwareType_ = 0; + onChanged(); + return this; + } + + private int hyperthreading_ = 0; + /** + * + * + *
+     * CPU hyper-threading support.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + * + * + * @return The enum numeric value on the wire for hyperthreading. + */ + @java.lang.Override + public int getHyperthreadingValue() { + return hyperthreading_; + } + /** + * + * + *
+     * CPU hyper-threading support.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + * + * + * @param value The enum numeric value on the wire for hyperthreading to set. + * @return This builder for chaining. + */ + public Builder setHyperthreadingValue(int value) { + hyperthreading_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * CPU hyper-threading support.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + * + * + * @return The hyperthreading. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading + getHyperthreading() { + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading result = + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading + .forNumber(hyperthreading_); + return result == null + ? com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * CPU hyper-threading support.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + * + * + * @param value The hyperthreading to set. + * @return This builder for chaining. + */ + public Builder setHyperthreading( + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + hyperthreading_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * CPU hyper-threading support.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + * + * + * @return This builder for chaining. + */ + public Builder clearHyperthreading() { + bitField0_ = (bitField0_ & ~0x00000080); + hyperthreading_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.MachineArchitectureDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.MachineArchitectureDetails) + private static final com.google.cloud.migrationcenter.v1.MachineArchitectureDetails + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.MachineArchitectureDetails(); + } + + public static com.google.cloud.migrationcenter.v1.MachineArchitectureDetails + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MachineArchitectureDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetails + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineArchitectureDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineArchitectureDetailsOrBuilder.java new file mode 100644 index 000000000000..94a147837ff5 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineArchitectureDetailsOrBuilder.java @@ -0,0 +1,220 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface MachineArchitectureDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.MachineArchitectureDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc.
+   * 
+ * + * string cpu_architecture = 1; + * + * @return The cpuArchitecture. + */ + java.lang.String getCpuArchitecture(); + /** + * + * + *
+   * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc.
+   * 
+ * + * string cpu_architecture = 1; + * + * @return The bytes for cpuArchitecture. + */ + com.google.protobuf.ByteString getCpuArchitectureBytes(); + + /** + * + * + *
+   * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc.
+   * 
+ * + * string cpu_name = 2; + * + * @return The cpuName. + */ + java.lang.String getCpuName(); + /** + * + * + *
+   * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc.
+   * 
+ * + * string cpu_name = 2; + * + * @return The bytes for cpuName. + */ + com.google.protobuf.ByteString getCpuNameBytes(); + + /** + * + * + *
+   * Hardware vendor.
+   * 
+ * + * string vendor = 3; + * + * @return The vendor. + */ + java.lang.String getVendor(); + /** + * + * + *
+   * Hardware vendor.
+   * 
+ * + * string vendor = 3; + * + * @return The bytes for vendor. + */ + com.google.protobuf.ByteString getVendorBytes(); + + /** + * + * + *
+   * Number of CPU threads allocated to the machine.
+   * 
+ * + * int32 cpu_thread_count = 4; + * + * @return The cpuThreadCount. + */ + int getCpuThreadCount(); + + /** + * + * + *
+   * Number of processor sockets allocated to the machine.
+   * 
+ * + * int32 cpu_socket_count = 5; + * + * @return The cpuSocketCount. + */ + int getCpuSocketCount(); + + /** + * + * + *
+   * BIOS Details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + * + * @return Whether the bios field is set. + */ + boolean hasBios(); + /** + * + * + *
+   * BIOS Details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + * + * @return The bios. + */ + com.google.cloud.migrationcenter.v1.BiosDetails getBios(); + /** + * + * + *
+   * BIOS Details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + */ + com.google.cloud.migrationcenter.v1.BiosDetailsOrBuilder getBiosOrBuilder(); + + /** + * + * + *
+   * Firmware type.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + * + * + * @return The enum numeric value on the wire for firmwareType. + */ + int getFirmwareTypeValue(); + /** + * + * + *
+   * Firmware type.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + * + * + * @return The firmwareType. + */ + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType getFirmwareType(); + + /** + * + * + *
+   * CPU hyper-threading support.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + * + * + * @return The enum numeric value on the wire for hyperthreading. + */ + int getHyperthreadingValue(); + /** + * + * + *
+   * CPU hyper-threading support.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + * + * + * @return The hyperthreading. + */ + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading + getHyperthreading(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDetails.java new file mode 100644 index 000000000000..dfa2c93c0333 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDetails.java @@ -0,0 +1,2998 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Details of a machine.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachineDetails} + */ +public final class MachineDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.MachineDetails) + MachineDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use MachineDetails.newBuilder() to construct. + private MachineDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MachineDetails() { + uuid_ = ""; + machineName_ = ""; + powerState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MachineDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachineDetails.class, + com.google.cloud.migrationcenter.v1.MachineDetails.Builder.class); + } + + /** + * + * + *
+   * Machine power state.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.MachineDetails.PowerState} + */ + public enum PowerState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Power state is unknown.
+     * 
+ * + * POWER_STATE_UNSPECIFIED = 0; + */ + POWER_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The machine is preparing to enter the ACTIVE state. An instance may enter
+     * the PENDING state when it launches for the first time, or when it is
+     * started after being in the SUSPENDED state.
+     * 
+ * + * PENDING = 1; + */ + PENDING(1), + /** + * + * + *
+     * The machine is active.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The machine is being turned off.
+     * 
+ * + * SUSPENDING = 3; + */ + SUSPENDING(3), + /** + * + * + *
+     * The machine is off.
+     * 
+ * + * SUSPENDED = 4; + */ + SUSPENDED(4), + /** + * + * + *
+     * The machine is being deleted from the hosting platform.
+     * 
+ * + * DELETING = 5; + */ + DELETING(5), + /** + * + * + *
+     * The machine is deleted from the hosting platform.
+     * 
+ * + * DELETED = 6; + */ + DELETED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Power state is unknown.
+     * 
+ * + * POWER_STATE_UNSPECIFIED = 0; + */ + public static final int POWER_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The machine is preparing to enter the ACTIVE state. An instance may enter
+     * the PENDING state when it launches for the first time, or when it is
+     * started after being in the SUSPENDED state.
+     * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + * + * + *
+     * The machine is active.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+     * The machine is being turned off.
+     * 
+ * + * SUSPENDING = 3; + */ + public static final int SUSPENDING_VALUE = 3; + /** + * + * + *
+     * The machine is off.
+     * 
+ * + * SUSPENDED = 4; + */ + public static final int SUSPENDED_VALUE = 4; + /** + * + * + *
+     * The machine is being deleted from the hosting platform.
+     * 
+ * + * DELETING = 5; + */ + public static final int DELETING_VALUE = 5; + /** + * + * + *
+     * The machine is deleted from the hosting platform.
+     * 
+ * + * DELETED = 6; + */ + public static final int DELETED_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PowerState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PowerState forNumber(int value) { + switch (value) { + case 0: + return POWER_STATE_UNSPECIFIED; + case 1: + return PENDING; + case 2: + return ACTIVE; + case 3: + return SUSPENDING; + case 4: + return SUSPENDED; + case 5: + return DELETING; + case 6: + return DELETED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PowerState findValueByNumber(int number) { + return PowerState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MachineDetails.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PowerState[] VALUES = values(); + + public static PowerState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PowerState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.MachineDetails.PowerState) + } + + public static final int UUID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uuid_ = ""; + /** + * + * + *
+   * Machine unique identifier.
+   * 
+ * + * string uuid = 1; + * + * @return The uuid. + */ + @java.lang.Override + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } + } + /** + * + * + *
+   * Machine unique identifier.
+   * 
+ * + * string uuid = 1; + * + * @return The bytes for uuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineName_ = ""; + /** + * + * + *
+   * Machine name.
+   * 
+ * + * string machine_name = 2; + * + * @return The machineName. + */ + @java.lang.Override + public java.lang.String getMachineName() { + java.lang.Object ref = machineName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineName_ = s; + return s; + } + } + /** + * + * + *
+   * Machine name.
+   * 
+ * + * string machine_name = 2; + * + * @return The bytes for machineName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineNameBytes() { + java.lang.Object ref = machineName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Machine creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Machine creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Machine creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int CORE_COUNT_FIELD_NUMBER = 4; + private int coreCount_ = 0; + /** + * + * + *
+   * Number of CPU cores in the machine. Must be non-negative.
+   * 
+ * + * int32 core_count = 4; + * + * @return The coreCount. + */ + @java.lang.Override + public int getCoreCount() { + return coreCount_; + } + + public static final int MEMORY_MB_FIELD_NUMBER = 5; + private int memoryMb_ = 0; + /** + * + * + *
+   * The amount of memory in the machine. Must be non-negative.
+   * 
+ * + * int32 memory_mb = 5; + * + * @return The memoryMb. + */ + @java.lang.Override + public int getMemoryMb() { + return memoryMb_; + } + + public static final int POWER_STATE_FIELD_NUMBER = 6; + private int powerState_ = 0; + /** + * + * + *
+   * Power state of the machine.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + * + * @return The enum numeric value on the wire for powerState. + */ + @java.lang.Override + public int getPowerStateValue() { + return powerState_; + } + /** + * + * + *
+   * Power state of the machine.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + * + * @return The powerState. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetails.PowerState getPowerState() { + com.google.cloud.migrationcenter.v1.MachineDetails.PowerState result = + com.google.cloud.migrationcenter.v1.MachineDetails.PowerState.forNumber(powerState_); + return result == null + ? com.google.cloud.migrationcenter.v1.MachineDetails.PowerState.UNRECOGNIZED + : result; + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 7; + private com.google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture_; + /** + * + * + *
+   * Architecture details (vendor, CPU architecture).
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + * + * @return Whether the architecture field is set. + */ + @java.lang.Override + public boolean hasArchitecture() { + return architecture_ != null; + } + /** + * + * + *
+   * Architecture details (vendor, CPU architecture).
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + * + * @return The architecture. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetails getArchitecture() { + return architecture_ == null + ? com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.getDefaultInstance() + : architecture_; + } + /** + * + * + *
+   * Architecture details (vendor, CPU architecture).
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetailsOrBuilder + getArchitectureOrBuilder() { + return architecture_ == null + ? com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.getDefaultInstance() + : architecture_; + } + + public static final int GUEST_OS_FIELD_NUMBER = 8; + private com.google.cloud.migrationcenter.v1.GuestOsDetails guestOs_; + /** + * + * + *
+   * Guest OS information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + * + * @return Whether the guestOs field is set. + */ + @java.lang.Override + public boolean hasGuestOs() { + return guestOs_ != null; + } + /** + * + * + *
+   * Guest OS information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + * + * @return The guestOs. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestOsDetails getGuestOs() { + return guestOs_ == null + ? com.google.cloud.migrationcenter.v1.GuestOsDetails.getDefaultInstance() + : guestOs_; + } + /** + * + * + *
+   * Guest OS information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GuestOsDetailsOrBuilder getGuestOsOrBuilder() { + return guestOs_ == null + ? com.google.cloud.migrationcenter.v1.GuestOsDetails.getDefaultInstance() + : guestOs_; + } + + public static final int NETWORK_FIELD_NUMBER = 9; + private com.google.cloud.migrationcenter.v1.MachineNetworkDetails network_; + /** + * + * + *
+   * Network details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return network_ != null; + } + /** + * + * + *
+   * Network details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + * + * @return The network. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineNetworkDetails getNetwork() { + return network_ == null + ? com.google.cloud.migrationcenter.v1.MachineNetworkDetails.getDefaultInstance() + : network_; + } + /** + * + * + *
+   * Network details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineNetworkDetailsOrBuilder getNetworkOrBuilder() { + return network_ == null + ? com.google.cloud.migrationcenter.v1.MachineNetworkDetails.getDefaultInstance() + : network_; + } + + public static final int DISKS_FIELD_NUMBER = 10; + private com.google.cloud.migrationcenter.v1.MachineDiskDetails disks_; + /** + * + * + *
+   * Disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + * + * @return Whether the disks field is set. + */ + @java.lang.Override + public boolean hasDisks() { + return disks_ != null; + } + /** + * + * + *
+   * Disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + * + * @return The disks. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDiskDetails getDisks() { + return disks_ == null + ? com.google.cloud.migrationcenter.v1.MachineDiskDetails.getDefaultInstance() + : disks_; + } + /** + * + * + *
+   * Disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDiskDetailsOrBuilder getDisksOrBuilder() { + return disks_ == null + ? com.google.cloud.migrationcenter.v1.MachineDiskDetails.getDefaultInstance() + : disks_; + } + + public static final int PLATFORM_FIELD_NUMBER = 11; + private com.google.cloud.migrationcenter.v1.PlatformDetails platform_; + /** + * + * + *
+   * Platform specific information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + * + * @return Whether the platform field is set. + */ + @java.lang.Override + public boolean hasPlatform() { + return platform_ != null; + } + /** + * + * + *
+   * Platform specific information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + * + * @return The platform. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PlatformDetails getPlatform() { + return platform_ == null + ? com.google.cloud.migrationcenter.v1.PlatformDetails.getDefaultInstance() + : platform_; + } + /** + * + * + *
+   * Platform specific information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PlatformDetailsOrBuilder getPlatformOrBuilder() { + return platform_ == null + ? com.google.cloud.migrationcenter.v1.PlatformDetails.getDefaultInstance() + : platform_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uuid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, machineName_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (coreCount_ != 0) { + output.writeInt32(4, coreCount_); + } + if (memoryMb_ != 0) { + output.writeInt32(5, memoryMb_); + } + if (powerState_ + != com.google.cloud.migrationcenter.v1.MachineDetails.PowerState.POWER_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, powerState_); + } + if (architecture_ != null) { + output.writeMessage(7, getArchitecture()); + } + if (guestOs_ != null) { + output.writeMessage(8, getGuestOs()); + } + if (network_ != null) { + output.writeMessage(9, getNetwork()); + } + if (disks_ != null) { + output.writeMessage(10, getDisks()); + } + if (platform_ != null) { + output.writeMessage(11, getPlatform()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uuid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, machineName_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (coreCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, coreCount_); + } + if (memoryMb_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, memoryMb_); + } + if (powerState_ + != com.google.cloud.migrationcenter.v1.MachineDetails.PowerState.POWER_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, powerState_); + } + if (architecture_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getArchitecture()); + } + if (guestOs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getGuestOs()); + } + if (network_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getNetwork()); + } + if (disks_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDisks()); + } + if (platform_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getPlatform()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.MachineDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.MachineDetails other = + (com.google.cloud.migrationcenter.v1.MachineDetails) obj; + + if (!getUuid().equals(other.getUuid())) return false; + if (!getMachineName().equals(other.getMachineName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (getCoreCount() != other.getCoreCount()) return false; + if (getMemoryMb() != other.getMemoryMb()) return false; + if (powerState_ != other.powerState_) return false; + if (hasArchitecture() != other.hasArchitecture()) return false; + if (hasArchitecture()) { + if (!getArchitecture().equals(other.getArchitecture())) return false; + } + if (hasGuestOs() != other.hasGuestOs()) return false; + if (hasGuestOs()) { + if (!getGuestOs().equals(other.getGuestOs())) return false; + } + if (hasNetwork() != other.hasNetwork()) return false; + if (hasNetwork()) { + if (!getNetwork().equals(other.getNetwork())) return false; + } + if (hasDisks() != other.hasDisks()) return false; + if (hasDisks()) { + if (!getDisks().equals(other.getDisks())) return false; + } + if (hasPlatform() != other.hasPlatform()) return false; + if (hasPlatform()) { + if (!getPlatform().equals(other.getPlatform())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + hash = (37 * hash) + MACHINE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMachineName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + CORE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCoreCount(); + hash = (37 * hash) + MEMORY_MB_FIELD_NUMBER; + hash = (53 * hash) + getMemoryMb(); + hash = (37 * hash) + POWER_STATE_FIELD_NUMBER; + hash = (53 * hash) + powerState_; + if (hasArchitecture()) { + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + getArchitecture().hashCode(); + } + if (hasGuestOs()) { + hash = (37 * hash) + GUEST_OS_FIELD_NUMBER; + hash = (53 * hash) + getGuestOs().hashCode(); + } + if (hasNetwork()) { + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + } + if (hasDisks()) { + hash = (37 * hash) + DISKS_FIELD_NUMBER; + hash = (53 * hash) + getDisks().hashCode(); + } + if (hasPlatform()) { + hash = (37 * hash) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getPlatform().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.MachineDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a machine.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachineDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.MachineDetails) + com.google.cloud.migrationcenter.v1.MachineDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachineDetails.class, + com.google.cloud.migrationcenter.v1.MachineDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.MachineDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uuid_ = ""; + machineName_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + coreCount_ = 0; + memoryMb_ = 0; + powerState_ = 0; + architecture_ = null; + if (architectureBuilder_ != null) { + architectureBuilder_.dispose(); + architectureBuilder_ = null; + } + guestOs_ = null; + if (guestOsBuilder_ != null) { + guestOsBuilder_.dispose(); + guestOsBuilder_ = null; + } + network_ = null; + if (networkBuilder_ != null) { + networkBuilder_.dispose(); + networkBuilder_ = null; + } + disks_ = null; + if (disksBuilder_ != null) { + disksBuilder_.dispose(); + disksBuilder_ = null; + } + platform_ = null; + if (platformBuilder_ != null) { + platformBuilder_.dispose(); + platformBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetails build() { + com.google.cloud.migrationcenter.v1.MachineDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetails buildPartial() { + com.google.cloud.migrationcenter.v1.MachineDetails result = + new com.google.cloud.migrationcenter.v1.MachineDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.MachineDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uuid_ = uuid_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.machineName_ = machineName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.coreCount_ = coreCount_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.memoryMb_ = memoryMb_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.powerState_ = powerState_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.architecture_ = + architectureBuilder_ == null ? architecture_ : architectureBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.guestOs_ = guestOsBuilder_ == null ? guestOs_ : guestOsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.network_ = networkBuilder_ == null ? network_ : networkBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.disks_ = disksBuilder_ == null ? disks_ : disksBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.platform_ = platformBuilder_ == null ? platform_ : platformBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.MachineDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.MachineDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.MachineDetails other) { + if (other == com.google.cloud.migrationcenter.v1.MachineDetails.getDefaultInstance()) + return this; + if (!other.getUuid().isEmpty()) { + uuid_ = other.uuid_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMachineName().isEmpty()) { + machineName_ = other.machineName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.getCoreCount() != 0) { + setCoreCount(other.getCoreCount()); + } + if (other.getMemoryMb() != 0) { + setMemoryMb(other.getMemoryMb()); + } + if (other.powerState_ != 0) { + setPowerStateValue(other.getPowerStateValue()); + } + if (other.hasArchitecture()) { + mergeArchitecture(other.getArchitecture()); + } + if (other.hasGuestOs()) { + mergeGuestOs(other.getGuestOs()); + } + if (other.hasNetwork()) { + mergeNetwork(other.getNetwork()); + } + if (other.hasDisks()) { + mergeDisks(other.getDisks()); + } + if (other.hasPlatform()) { + mergePlatform(other.getPlatform()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + machineName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + coreCount_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + memoryMb_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + powerState_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + input.readMessage(getArchitectureFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getGuestOsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage(getNetworkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage(getDisksFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + input.readMessage(getPlatformFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uuid_ = ""; + /** + * + * + *
+     * Machine unique identifier.
+     * 
+ * + * string uuid = 1; + * + * @return The uuid. + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Machine unique identifier.
+     * 
+ * + * string uuid = 1; + * + * @return The bytes for uuid. + */ + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Machine unique identifier.
+     * 
+ * + * string uuid = 1; + * + * @param value The uuid to set. + * @return This builder for chaining. + */ + public Builder setUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uuid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Machine unique identifier.
+     * 
+ * + * string uuid = 1; + * + * @return This builder for chaining. + */ + public Builder clearUuid() { + uuid_ = getDefaultInstance().getUuid(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Machine unique identifier.
+     * 
+ * + * string uuid = 1; + * + * @param value The bytes for uuid to set. + * @return This builder for chaining. + */ + public Builder setUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uuid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object machineName_ = ""; + /** + * + * + *
+     * Machine name.
+     * 
+ * + * string machine_name = 2; + * + * @return The machineName. + */ + public java.lang.String getMachineName() { + java.lang.Object ref = machineName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Machine name.
+     * 
+ * + * string machine_name = 2; + * + * @return The bytes for machineName. + */ + public com.google.protobuf.ByteString getMachineNameBytes() { + java.lang.Object ref = machineName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Machine name.
+     * 
+ * + * string machine_name = 2; + * + * @param value The machineName to set. + * @return This builder for chaining. + */ + public Builder setMachineName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Machine name.
+     * 
+ * + * string machine_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearMachineName() { + machineName_ = getDefaultInstance().getMachineName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Machine name.
+     * 
+ * + * string machine_name = 2; + * + * @param value The bytes for machineName to set. + * @return This builder for chaining. + */ + public Builder setMachineNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Machine creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Machine creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Machine creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Machine creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Machine creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Machine creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Machine creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Machine creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Machine creation time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private int coreCount_; + /** + * + * + *
+     * Number of CPU cores in the machine. Must be non-negative.
+     * 
+ * + * int32 core_count = 4; + * + * @return The coreCount. + */ + @java.lang.Override + public int getCoreCount() { + return coreCount_; + } + /** + * + * + *
+     * Number of CPU cores in the machine. Must be non-negative.
+     * 
+ * + * int32 core_count = 4; + * + * @param value The coreCount to set. + * @return This builder for chaining. + */ + public Builder setCoreCount(int value) { + + coreCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of CPU cores in the machine. Must be non-negative.
+     * 
+ * + * int32 core_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearCoreCount() { + bitField0_ = (bitField0_ & ~0x00000008); + coreCount_ = 0; + onChanged(); + return this; + } + + private int memoryMb_; + /** + * + * + *
+     * The amount of memory in the machine. Must be non-negative.
+     * 
+ * + * int32 memory_mb = 5; + * + * @return The memoryMb. + */ + @java.lang.Override + public int getMemoryMb() { + return memoryMb_; + } + /** + * + * + *
+     * The amount of memory in the machine. Must be non-negative.
+     * 
+ * + * int32 memory_mb = 5; + * + * @param value The memoryMb to set. + * @return This builder for chaining. + */ + public Builder setMemoryMb(int value) { + + memoryMb_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The amount of memory in the machine. Must be non-negative.
+     * 
+ * + * int32 memory_mb = 5; + * + * @return This builder for chaining. + */ + public Builder clearMemoryMb() { + bitField0_ = (bitField0_ & ~0x00000010); + memoryMb_ = 0; + onChanged(); + return this; + } + + private int powerState_ = 0; + /** + * + * + *
+     * Power state of the machine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + * + * @return The enum numeric value on the wire for powerState. + */ + @java.lang.Override + public int getPowerStateValue() { + return powerState_; + } + /** + * + * + *
+     * Power state of the machine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + * + * @param value The enum numeric value on the wire for powerState to set. + * @return This builder for chaining. + */ + public Builder setPowerStateValue(int value) { + powerState_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Power state of the machine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + * + * @return The powerState. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetails.PowerState getPowerState() { + com.google.cloud.migrationcenter.v1.MachineDetails.PowerState result = + com.google.cloud.migrationcenter.v1.MachineDetails.PowerState.forNumber(powerState_); + return result == null + ? com.google.cloud.migrationcenter.v1.MachineDetails.PowerState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Power state of the machine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + * + * @param value The powerState to set. + * @return This builder for chaining. + */ + public Builder setPowerState( + com.google.cloud.migrationcenter.v1.MachineDetails.PowerState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + powerState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Power state of the machine.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + * + * @return This builder for chaining. + */ + public Builder clearPowerState() { + bitField0_ = (bitField0_ & ~0x00000020); + powerState_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails, + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineArchitectureDetailsOrBuilder> + architectureBuilder_; + /** + * + * + *
+     * Architecture details (vendor, CPU architecture).
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + * + * @return Whether the architecture field is set. + */ + public boolean hasArchitecture() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Architecture details (vendor, CPU architecture).
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + * + * @return The architecture. + */ + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetails getArchitecture() { + if (architectureBuilder_ == null) { + return architecture_ == null + ? com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.getDefaultInstance() + : architecture_; + } else { + return architectureBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Architecture details (vendor, CPU architecture).
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + */ + public Builder setArchitecture( + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails value) { + if (architectureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + architecture_ = value; + } else { + architectureBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Architecture details (vendor, CPU architecture).
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + */ + public Builder setArchitecture( + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.Builder builderForValue) { + if (architectureBuilder_ == null) { + architecture_ = builderForValue.build(); + } else { + architectureBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Architecture details (vendor, CPU architecture).
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + */ + public Builder mergeArchitecture( + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails value) { + if (architectureBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && architecture_ != null + && architecture_ + != com.google.cloud.migrationcenter.v1.MachineArchitectureDetails + .getDefaultInstance()) { + getArchitectureBuilder().mergeFrom(value); + } else { + architecture_ = value; + } + } else { + architectureBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Architecture details (vendor, CPU architecture).
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + */ + public Builder clearArchitecture() { + bitField0_ = (bitField0_ & ~0x00000040); + architecture_ = null; + if (architectureBuilder_ != null) { + architectureBuilder_.dispose(); + architectureBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Architecture details (vendor, CPU architecture).
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + */ + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.Builder + getArchitectureBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getArchitectureFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Architecture details (vendor, CPU architecture).
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + */ + public com.google.cloud.migrationcenter.v1.MachineArchitectureDetailsOrBuilder + getArchitectureOrBuilder() { + if (architectureBuilder_ != null) { + return architectureBuilder_.getMessageOrBuilder(); + } else { + return architecture_ == null + ? com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.getDefaultInstance() + : architecture_; + } + } + /** + * + * + *
+     * Architecture details (vendor, CPU architecture).
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails, + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineArchitectureDetailsOrBuilder> + getArchitectureFieldBuilder() { + if (architectureBuilder_ == null) { + architectureBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails, + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineArchitectureDetailsOrBuilder>( + getArchitecture(), getParentForChildren(), isClean()); + architecture_ = null; + } + return architectureBuilder_; + } + + private com.google.cloud.migrationcenter.v1.GuestOsDetails guestOs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestOsDetails, + com.google.cloud.migrationcenter.v1.GuestOsDetails.Builder, + com.google.cloud.migrationcenter.v1.GuestOsDetailsOrBuilder> + guestOsBuilder_; + /** + * + * + *
+     * Guest OS information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + * + * @return Whether the guestOs field is set. + */ + public boolean hasGuestOs() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Guest OS information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + * + * @return The guestOs. + */ + public com.google.cloud.migrationcenter.v1.GuestOsDetails getGuestOs() { + if (guestOsBuilder_ == null) { + return guestOs_ == null + ? com.google.cloud.migrationcenter.v1.GuestOsDetails.getDefaultInstance() + : guestOs_; + } else { + return guestOsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Guest OS information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + */ + public Builder setGuestOs(com.google.cloud.migrationcenter.v1.GuestOsDetails value) { + if (guestOsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + guestOs_ = value; + } else { + guestOsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Guest OS information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + */ + public Builder setGuestOs( + com.google.cloud.migrationcenter.v1.GuestOsDetails.Builder builderForValue) { + if (guestOsBuilder_ == null) { + guestOs_ = builderForValue.build(); + } else { + guestOsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Guest OS information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + */ + public Builder mergeGuestOs(com.google.cloud.migrationcenter.v1.GuestOsDetails value) { + if (guestOsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && guestOs_ != null + && guestOs_ + != com.google.cloud.migrationcenter.v1.GuestOsDetails.getDefaultInstance()) { + getGuestOsBuilder().mergeFrom(value); + } else { + guestOs_ = value; + } + } else { + guestOsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Guest OS information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + */ + public Builder clearGuestOs() { + bitField0_ = (bitField0_ & ~0x00000080); + guestOs_ = null; + if (guestOsBuilder_ != null) { + guestOsBuilder_.dispose(); + guestOsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Guest OS information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + */ + public com.google.cloud.migrationcenter.v1.GuestOsDetails.Builder getGuestOsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getGuestOsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Guest OS information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + */ + public com.google.cloud.migrationcenter.v1.GuestOsDetailsOrBuilder getGuestOsOrBuilder() { + if (guestOsBuilder_ != null) { + return guestOsBuilder_.getMessageOrBuilder(); + } else { + return guestOs_ == null + ? com.google.cloud.migrationcenter.v1.GuestOsDetails.getDefaultInstance() + : guestOs_; + } + } + /** + * + * + *
+     * Guest OS information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestOsDetails, + com.google.cloud.migrationcenter.v1.GuestOsDetails.Builder, + com.google.cloud.migrationcenter.v1.GuestOsDetailsOrBuilder> + getGuestOsFieldBuilder() { + if (guestOsBuilder_ == null) { + guestOsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GuestOsDetails, + com.google.cloud.migrationcenter.v1.GuestOsDetails.Builder, + com.google.cloud.migrationcenter.v1.GuestOsDetailsOrBuilder>( + getGuestOs(), getParentForChildren(), isClean()); + guestOs_ = null; + } + return guestOsBuilder_; + } + + private com.google.cloud.migrationcenter.v1.MachineNetworkDetails network_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineNetworkDetails, + com.google.cloud.migrationcenter.v1.MachineNetworkDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineNetworkDetailsOrBuilder> + networkBuilder_; + /** + * + * + *
+     * Network details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + * + * @return Whether the network field is set. + */ + public boolean hasNetwork() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Network details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + * + * @return The network. + */ + public com.google.cloud.migrationcenter.v1.MachineNetworkDetails getNetwork() { + if (networkBuilder_ == null) { + return network_ == null + ? com.google.cloud.migrationcenter.v1.MachineNetworkDetails.getDefaultInstance() + : network_; + } else { + return networkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Network details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + */ + public Builder setNetwork(com.google.cloud.migrationcenter.v1.MachineNetworkDetails value) { + if (networkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + } else { + networkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Network details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + */ + public Builder setNetwork( + com.google.cloud.migrationcenter.v1.MachineNetworkDetails.Builder builderForValue) { + if (networkBuilder_ == null) { + network_ = builderForValue.build(); + } else { + networkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Network details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + */ + public Builder mergeNetwork(com.google.cloud.migrationcenter.v1.MachineNetworkDetails value) { + if (networkBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && network_ != null + && network_ + != com.google.cloud.migrationcenter.v1.MachineNetworkDetails.getDefaultInstance()) { + getNetworkBuilder().mergeFrom(value); + } else { + network_ = value; + } + } else { + networkBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Network details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + */ + public Builder clearNetwork() { + bitField0_ = (bitField0_ & ~0x00000100); + network_ = null; + if (networkBuilder_ != null) { + networkBuilder_.dispose(); + networkBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Network details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + */ + public com.google.cloud.migrationcenter.v1.MachineNetworkDetails.Builder getNetworkBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Network details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + */ + public com.google.cloud.migrationcenter.v1.MachineNetworkDetailsOrBuilder + getNetworkOrBuilder() { + if (networkBuilder_ != null) { + return networkBuilder_.getMessageOrBuilder(); + } else { + return network_ == null + ? com.google.cloud.migrationcenter.v1.MachineNetworkDetails.getDefaultInstance() + : network_; + } + } + /** + * + * + *
+     * Network details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineNetworkDetails, + com.google.cloud.migrationcenter.v1.MachineNetworkDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineNetworkDetailsOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + networkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineNetworkDetails, + com.google.cloud.migrationcenter.v1.MachineNetworkDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineNetworkDetailsOrBuilder>( + getNetwork(), getParentForChildren(), isClean()); + network_ = null; + } + return networkBuilder_; + } + + private com.google.cloud.migrationcenter.v1.MachineDiskDetails disks_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineDiskDetails, + com.google.cloud.migrationcenter.v1.MachineDiskDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineDiskDetailsOrBuilder> + disksBuilder_; + /** + * + * + *
+     * Disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + * + * @return Whether the disks field is set. + */ + public boolean hasDisks() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + * + * @return The disks. + */ + public com.google.cloud.migrationcenter.v1.MachineDiskDetails getDisks() { + if (disksBuilder_ == null) { + return disks_ == null + ? com.google.cloud.migrationcenter.v1.MachineDiskDetails.getDefaultInstance() + : disks_; + } else { + return disksBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + */ + public Builder setDisks(com.google.cloud.migrationcenter.v1.MachineDiskDetails value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + disks_ = value; + } else { + disksBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + */ + public Builder setDisks( + com.google.cloud.migrationcenter.v1.MachineDiskDetails.Builder builderForValue) { + if (disksBuilder_ == null) { + disks_ = builderForValue.build(); + } else { + disksBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + */ + public Builder mergeDisks(com.google.cloud.migrationcenter.v1.MachineDiskDetails value) { + if (disksBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && disks_ != null + && disks_ + != com.google.cloud.migrationcenter.v1.MachineDiskDetails.getDefaultInstance()) { + getDisksBuilder().mergeFrom(value); + } else { + disks_ = value; + } + } else { + disksBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + */ + public Builder clearDisks() { + bitField0_ = (bitField0_ & ~0x00000200); + disks_ = null; + if (disksBuilder_ != null) { + disksBuilder_.dispose(); + disksBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + */ + public com.google.cloud.migrationcenter.v1.MachineDiskDetails.Builder getDisksBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getDisksFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + */ + public com.google.cloud.migrationcenter.v1.MachineDiskDetailsOrBuilder getDisksOrBuilder() { + if (disksBuilder_ != null) { + return disksBuilder_.getMessageOrBuilder(); + } else { + return disks_ == null + ? com.google.cloud.migrationcenter.v1.MachineDiskDetails.getDefaultInstance() + : disks_; + } + } + /** + * + * + *
+     * Disk details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineDiskDetails, + com.google.cloud.migrationcenter.v1.MachineDiskDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineDiskDetailsOrBuilder> + getDisksFieldBuilder() { + if (disksBuilder_ == null) { + disksBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineDiskDetails, + com.google.cloud.migrationcenter.v1.MachineDiskDetails.Builder, + com.google.cloud.migrationcenter.v1.MachineDiskDetailsOrBuilder>( + getDisks(), getParentForChildren(), isClean()); + disks_ = null; + } + return disksBuilder_; + } + + private com.google.cloud.migrationcenter.v1.PlatformDetails platform_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PlatformDetails, + com.google.cloud.migrationcenter.v1.PlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.PlatformDetailsOrBuilder> + platformBuilder_; + /** + * + * + *
+     * Platform specific information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + * + * @return Whether the platform field is set. + */ + public boolean hasPlatform() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Platform specific information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + * + * @return The platform. + */ + public com.google.cloud.migrationcenter.v1.PlatformDetails getPlatform() { + if (platformBuilder_ == null) { + return platform_ == null + ? com.google.cloud.migrationcenter.v1.PlatformDetails.getDefaultInstance() + : platform_; + } else { + return platformBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Platform specific information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + */ + public Builder setPlatform(com.google.cloud.migrationcenter.v1.PlatformDetails value) { + if (platformBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + platform_ = value; + } else { + platformBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Platform specific information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + */ + public Builder setPlatform( + com.google.cloud.migrationcenter.v1.PlatformDetails.Builder builderForValue) { + if (platformBuilder_ == null) { + platform_ = builderForValue.build(); + } else { + platformBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Platform specific information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + */ + public Builder mergePlatform(com.google.cloud.migrationcenter.v1.PlatformDetails value) { + if (platformBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && platform_ != null + && platform_ + != com.google.cloud.migrationcenter.v1.PlatformDetails.getDefaultInstance()) { + getPlatformBuilder().mergeFrom(value); + } else { + platform_ = value; + } + } else { + platformBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Platform specific information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + */ + public Builder clearPlatform() { + bitField0_ = (bitField0_ & ~0x00000400); + platform_ = null; + if (platformBuilder_ != null) { + platformBuilder_.dispose(); + platformBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Platform specific information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + */ + public com.google.cloud.migrationcenter.v1.PlatformDetails.Builder getPlatformBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getPlatformFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Platform specific information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + */ + public com.google.cloud.migrationcenter.v1.PlatformDetailsOrBuilder getPlatformOrBuilder() { + if (platformBuilder_ != null) { + return platformBuilder_.getMessageOrBuilder(); + } else { + return platform_ == null + ? com.google.cloud.migrationcenter.v1.PlatformDetails.getDefaultInstance() + : platform_; + } + } + /** + * + * + *
+     * Platform specific information.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PlatformDetails, + com.google.cloud.migrationcenter.v1.PlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.PlatformDetailsOrBuilder> + getPlatformFieldBuilder() { + if (platformBuilder_ == null) { + platformBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PlatformDetails, + com.google.cloud.migrationcenter.v1.PlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.PlatformDetailsOrBuilder>( + getPlatform(), getParentForChildren(), isClean()); + platform_ = null; + } + return platformBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.MachineDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.MachineDetails) + private static final com.google.cloud.migrationcenter.v1.MachineDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.MachineDetails(); + } + + public static com.google.cloud.migrationcenter.v1.MachineDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MachineDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDetailsOrBuilder.java new file mode 100644 index 000000000000..951d058a635d --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDetailsOrBuilder.java @@ -0,0 +1,337 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface MachineDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.MachineDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Machine unique identifier.
+   * 
+ * + * string uuid = 1; + * + * @return The uuid. + */ + java.lang.String getUuid(); + /** + * + * + *
+   * Machine unique identifier.
+   * 
+ * + * string uuid = 1; + * + * @return The bytes for uuid. + */ + com.google.protobuf.ByteString getUuidBytes(); + + /** + * + * + *
+   * Machine name.
+   * 
+ * + * string machine_name = 2; + * + * @return The machineName. + */ + java.lang.String getMachineName(); + /** + * + * + *
+   * Machine name.
+   * 
+ * + * string machine_name = 2; + * + * @return The bytes for machineName. + */ + com.google.protobuf.ByteString getMachineNameBytes(); + + /** + * + * + *
+   * Machine creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Machine creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Machine creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Number of CPU cores in the machine. Must be non-negative.
+   * 
+ * + * int32 core_count = 4; + * + * @return The coreCount. + */ + int getCoreCount(); + + /** + * + * + *
+   * The amount of memory in the machine. Must be non-negative.
+   * 
+ * + * int32 memory_mb = 5; + * + * @return The memoryMb. + */ + int getMemoryMb(); + + /** + * + * + *
+   * Power state of the machine.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + * + * @return The enum numeric value on the wire for powerState. + */ + int getPowerStateValue(); + /** + * + * + *
+   * Power state of the machine.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + * + * @return The powerState. + */ + com.google.cloud.migrationcenter.v1.MachineDetails.PowerState getPowerState(); + + /** + * + * + *
+   * Architecture details (vendor, CPU architecture).
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + * + * @return Whether the architecture field is set. + */ + boolean hasArchitecture(); + /** + * + * + *
+   * Architecture details (vendor, CPU architecture).
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + * + * @return The architecture. + */ + com.google.cloud.migrationcenter.v1.MachineArchitectureDetails getArchitecture(); + /** + * + * + *
+   * Architecture details (vendor, CPU architecture).
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + */ + com.google.cloud.migrationcenter.v1.MachineArchitectureDetailsOrBuilder + getArchitectureOrBuilder(); + + /** + * + * + *
+   * Guest OS information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + * + * @return Whether the guestOs field is set. + */ + boolean hasGuestOs(); + /** + * + * + *
+   * Guest OS information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + * + * @return The guestOs. + */ + com.google.cloud.migrationcenter.v1.GuestOsDetails getGuestOs(); + /** + * + * + *
+   * Guest OS information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + */ + com.google.cloud.migrationcenter.v1.GuestOsDetailsOrBuilder getGuestOsOrBuilder(); + + /** + * + * + *
+   * Network details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * Network details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + * + * @return The network. + */ + com.google.cloud.migrationcenter.v1.MachineNetworkDetails getNetwork(); + /** + * + * + *
+   * Network details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + */ + com.google.cloud.migrationcenter.v1.MachineNetworkDetailsOrBuilder getNetworkOrBuilder(); + + /** + * + * + *
+   * Disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + * + * @return Whether the disks field is set. + */ + boolean hasDisks(); + /** + * + * + *
+   * Disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + * + * @return The disks. + */ + com.google.cloud.migrationcenter.v1.MachineDiskDetails getDisks(); + /** + * + * + *
+   * Disk details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + */ + com.google.cloud.migrationcenter.v1.MachineDiskDetailsOrBuilder getDisksOrBuilder(); + + /** + * + * + *
+   * Platform specific information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + * + * @return Whether the platform field is set. + */ + boolean hasPlatform(); + /** + * + * + *
+   * Platform specific information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + * + * @return The platform. + */ + com.google.cloud.migrationcenter.v1.PlatformDetails getPlatform(); + /** + * + * + *
+   * Platform specific information.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + */ + com.google.cloud.migrationcenter.v1.PlatformDetailsOrBuilder getPlatformOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDiskDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDiskDetails.java new file mode 100644 index 000000000000..4967e2285c7f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDiskDetails.java @@ -0,0 +1,893 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Details of machine disks.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachineDiskDetails} + */ +public final class MachineDiskDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.MachineDiskDetails) + MachineDiskDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use MachineDiskDetails.newBuilder() to construct. + private MachineDiskDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MachineDiskDetails() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MachineDiskDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineDiskDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineDiskDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachineDiskDetails.class, + com.google.cloud.migrationcenter.v1.MachineDiskDetails.Builder.class); + } + + public static final int TOTAL_CAPACITY_BYTES_FIELD_NUMBER = 1; + private long totalCapacityBytes_ = 0L; + /** + * + * + *
+   * Disk total Capacity.
+   * 
+ * + * int64 total_capacity_bytes = 1; + * + * @return The totalCapacityBytes. + */ + @java.lang.Override + public long getTotalCapacityBytes() { + return totalCapacityBytes_; + } + + public static final int TOTAL_FREE_BYTES_FIELD_NUMBER = 2; + private long totalFreeBytes_ = 0L; + /** + * + * + *
+   * Total disk free space.
+   * 
+ * + * int64 total_free_bytes = 2; + * + * @return The totalFreeBytes. + */ + @java.lang.Override + public long getTotalFreeBytes() { + return totalFreeBytes_; + } + + public static final int DISKS_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.DiskEntryList disks_; + /** + * + * + *
+   * List of disks.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + * + * @return Whether the disks field is set. + */ + @java.lang.Override + public boolean hasDisks() { + return disks_ != null; + } + /** + * + * + *
+   * List of disks.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + * + * @return The disks. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntryList getDisks() { + return disks_ == null + ? com.google.cloud.migrationcenter.v1.DiskEntryList.getDefaultInstance() + : disks_; + } + /** + * + * + *
+   * List of disks.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskEntryListOrBuilder getDisksOrBuilder() { + return disks_ == null + ? com.google.cloud.migrationcenter.v1.DiskEntryList.getDefaultInstance() + : disks_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (totalCapacityBytes_ != 0L) { + output.writeInt64(1, totalCapacityBytes_); + } + if (totalFreeBytes_ != 0L) { + output.writeInt64(2, totalFreeBytes_); + } + if (disks_ != null) { + output.writeMessage(3, getDisks()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (totalCapacityBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, totalCapacityBytes_); + } + if (totalFreeBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, totalFreeBytes_); + } + if (disks_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDisks()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.MachineDiskDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.MachineDiskDetails other = + (com.google.cloud.migrationcenter.v1.MachineDiskDetails) obj; + + if (getTotalCapacityBytes() != other.getTotalCapacityBytes()) return false; + if (getTotalFreeBytes() != other.getTotalFreeBytes()) return false; + if (hasDisks() != other.hasDisks()) return false; + if (hasDisks()) { + if (!getDisks().equals(other.getDisks())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOTAL_CAPACITY_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalCapacityBytes()); + hash = (37 * hash) + TOTAL_FREE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalFreeBytes()); + if (hasDisks()) { + hash = (37 * hash) + DISKS_FIELD_NUMBER; + hash = (53 * hash) + getDisks().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.MachineDiskDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of machine disks.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachineDiskDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.MachineDiskDetails) + com.google.cloud.migrationcenter.v1.MachineDiskDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineDiskDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineDiskDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachineDiskDetails.class, + com.google.cloud.migrationcenter.v1.MachineDiskDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.MachineDiskDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + totalCapacityBytes_ = 0L; + totalFreeBytes_ = 0L; + disks_ = null; + if (disksBuilder_ != null) { + disksBuilder_.dispose(); + disksBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineDiskDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDiskDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.MachineDiskDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDiskDetails build() { + com.google.cloud.migrationcenter.v1.MachineDiskDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDiskDetails buildPartial() { + com.google.cloud.migrationcenter.v1.MachineDiskDetails result = + new com.google.cloud.migrationcenter.v1.MachineDiskDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.MachineDiskDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.totalCapacityBytes_ = totalCapacityBytes_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalFreeBytes_ = totalFreeBytes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.disks_ = disksBuilder_ == null ? disks_ : disksBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.MachineDiskDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.MachineDiskDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.MachineDiskDetails other) { + if (other == com.google.cloud.migrationcenter.v1.MachineDiskDetails.getDefaultInstance()) + return this; + if (other.getTotalCapacityBytes() != 0L) { + setTotalCapacityBytes(other.getTotalCapacityBytes()); + } + if (other.getTotalFreeBytes() != 0L) { + setTotalFreeBytes(other.getTotalFreeBytes()); + } + if (other.hasDisks()) { + mergeDisks(other.getDisks()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + totalCapacityBytes_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + totalFreeBytes_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage(getDisksFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long totalCapacityBytes_; + /** + * + * + *
+     * Disk total Capacity.
+     * 
+ * + * int64 total_capacity_bytes = 1; + * + * @return The totalCapacityBytes. + */ + @java.lang.Override + public long getTotalCapacityBytes() { + return totalCapacityBytes_; + } + /** + * + * + *
+     * Disk total Capacity.
+     * 
+ * + * int64 total_capacity_bytes = 1; + * + * @param value The totalCapacityBytes to set. + * @return This builder for chaining. + */ + public Builder setTotalCapacityBytes(long value) { + + totalCapacityBytes_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk total Capacity.
+     * 
+ * + * int64 total_capacity_bytes = 1; + * + * @return This builder for chaining. + */ + public Builder clearTotalCapacityBytes() { + bitField0_ = (bitField0_ & ~0x00000001); + totalCapacityBytes_ = 0L; + onChanged(); + return this; + } + + private long totalFreeBytes_; + /** + * + * + *
+     * Total disk free space.
+     * 
+ * + * int64 total_free_bytes = 2; + * + * @return The totalFreeBytes. + */ + @java.lang.Override + public long getTotalFreeBytes() { + return totalFreeBytes_; + } + /** + * + * + *
+     * Total disk free space.
+     * 
+ * + * int64 total_free_bytes = 2; + * + * @param value The totalFreeBytes to set. + * @return This builder for chaining. + */ + public Builder setTotalFreeBytes(long value) { + + totalFreeBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Total disk free space.
+     * 
+ * + * int64 total_free_bytes = 2; + * + * @return This builder for chaining. + */ + public Builder clearTotalFreeBytes() { + bitField0_ = (bitField0_ & ~0x00000002); + totalFreeBytes_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.DiskEntryList disks_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskEntryList, + com.google.cloud.migrationcenter.v1.DiskEntryList.Builder, + com.google.cloud.migrationcenter.v1.DiskEntryListOrBuilder> + disksBuilder_; + /** + * + * + *
+     * List of disks.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + * + * @return Whether the disks field is set. + */ + public boolean hasDisks() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * List of disks.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + * + * @return The disks. + */ + public com.google.cloud.migrationcenter.v1.DiskEntryList getDisks() { + if (disksBuilder_ == null) { + return disks_ == null + ? com.google.cloud.migrationcenter.v1.DiskEntryList.getDefaultInstance() + : disks_; + } else { + return disksBuilder_.getMessage(); + } + } + /** + * + * + *
+     * List of disks.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + */ + public Builder setDisks(com.google.cloud.migrationcenter.v1.DiskEntryList value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + disks_ = value; + } else { + disksBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * List of disks.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + */ + public Builder setDisks( + com.google.cloud.migrationcenter.v1.DiskEntryList.Builder builderForValue) { + if (disksBuilder_ == null) { + disks_ = builderForValue.build(); + } else { + disksBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * List of disks.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + */ + public Builder mergeDisks(com.google.cloud.migrationcenter.v1.DiskEntryList value) { + if (disksBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && disks_ != null + && disks_ != com.google.cloud.migrationcenter.v1.DiskEntryList.getDefaultInstance()) { + getDisksBuilder().mergeFrom(value); + } else { + disks_ = value; + } + } else { + disksBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * List of disks.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + */ + public Builder clearDisks() { + bitField0_ = (bitField0_ & ~0x00000004); + disks_ = null; + if (disksBuilder_ != null) { + disksBuilder_.dispose(); + disksBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * List of disks.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + */ + public com.google.cloud.migrationcenter.v1.DiskEntryList.Builder getDisksBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDisksFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * List of disks.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + */ + public com.google.cloud.migrationcenter.v1.DiskEntryListOrBuilder getDisksOrBuilder() { + if (disksBuilder_ != null) { + return disksBuilder_.getMessageOrBuilder(); + } else { + return disks_ == null + ? com.google.cloud.migrationcenter.v1.DiskEntryList.getDefaultInstance() + : disks_; + } + } + /** + * + * + *
+     * List of disks.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskEntryList, + com.google.cloud.migrationcenter.v1.DiskEntryList.Builder, + com.google.cloud.migrationcenter.v1.DiskEntryListOrBuilder> + getDisksFieldBuilder() { + if (disksBuilder_ == null) { + disksBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskEntryList, + com.google.cloud.migrationcenter.v1.DiskEntryList.Builder, + com.google.cloud.migrationcenter.v1.DiskEntryListOrBuilder>( + getDisks(), getParentForChildren(), isClean()); + disks_ = null; + } + return disksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.MachineDiskDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.MachineDiskDetails) + private static final com.google.cloud.migrationcenter.v1.MachineDiskDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.MachineDiskDetails(); + } + + public static com.google.cloud.migrationcenter.v1.MachineDiskDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MachineDiskDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineDiskDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDiskDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDiskDetailsOrBuilder.java new file mode 100644 index 000000000000..1abec088e5ed --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineDiskDetailsOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface MachineDiskDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.MachineDiskDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Disk total Capacity.
+   * 
+ * + * int64 total_capacity_bytes = 1; + * + * @return The totalCapacityBytes. + */ + long getTotalCapacityBytes(); + + /** + * + * + *
+   * Total disk free space.
+   * 
+ * + * int64 total_free_bytes = 2; + * + * @return The totalFreeBytes. + */ + long getTotalFreeBytes(); + + /** + * + * + *
+   * List of disks.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + * + * @return Whether the disks field is set. + */ + boolean hasDisks(); + /** + * + * + *
+   * List of disks.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + * + * @return The disks. + */ + com.google.cloud.migrationcenter.v1.DiskEntryList getDisks(); + /** + * + * + *
+   * List of disks.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + */ + com.google.cloud.migrationcenter.v1.DiskEntryListOrBuilder getDisksOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineNetworkDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineNetworkDetails.java new file mode 100644 index 000000000000..f3a995896f79 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineNetworkDetails.java @@ -0,0 +1,1262 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Details of network adapters and settings.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachineNetworkDetails} + */ +public final class MachineNetworkDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.MachineNetworkDetails) + MachineNetworkDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use MachineNetworkDetails.newBuilder() to construct. + private MachineNetworkDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MachineNetworkDetails() { + primaryIpAddress_ = ""; + publicIpAddress_ = ""; + primaryMacAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MachineNetworkDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineNetworkDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineNetworkDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachineNetworkDetails.class, + com.google.cloud.migrationcenter.v1.MachineNetworkDetails.Builder.class); + } + + public static final int PRIMARY_IP_ADDRESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object primaryIpAddress_ = ""; + /** + * + * + *
+   * The primary IP address of the machine.
+   * 
+ * + * string primary_ip_address = 1; + * + * @return The primaryIpAddress. + */ + @java.lang.Override + public java.lang.String getPrimaryIpAddress() { + java.lang.Object ref = primaryIpAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + primaryIpAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The primary IP address of the machine.
+   * 
+ * + * string primary_ip_address = 1; + * + * @return The bytes for primaryIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrimaryIpAddressBytes() { + java.lang.Object ref = primaryIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_IP_ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object publicIpAddress_ = ""; + /** + * + * + *
+   * The public IP address of the machine.
+   * 
+ * + * string public_ip_address = 2; + * + * @return The publicIpAddress. + */ + @java.lang.Override + public java.lang.String getPublicIpAddress() { + java.lang.Object ref = publicIpAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicIpAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The public IP address of the machine.
+   * 
+ * + * string public_ip_address = 2; + * + * @return The bytes for publicIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublicIpAddressBytes() { + java.lang.Object ref = publicIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIMARY_MAC_ADDRESS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object primaryMacAddress_ = ""; + /** + * + * + *
+   * MAC address of the machine.
+   * This property is used to uniqly identify the machine.
+   * 
+ * + * string primary_mac_address = 3; + * + * @return The primaryMacAddress. + */ + @java.lang.Override + public java.lang.String getPrimaryMacAddress() { + java.lang.Object ref = primaryMacAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + primaryMacAddress_ = s; + return s; + } + } + /** + * + * + *
+   * MAC address of the machine.
+   * This property is used to uniqly identify the machine.
+   * 
+ * + * string primary_mac_address = 3; + * + * @return The bytes for primaryMacAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrimaryMacAddressBytes() { + java.lang.Object ref = primaryMacAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryMacAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADAPTERS_FIELD_NUMBER = 4; + private com.google.cloud.migrationcenter.v1.NetworkAdapterList adapters_; + /** + * + * + *
+   * List of network adapters.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + * + * @return Whether the adapters field is set. + */ + @java.lang.Override + public boolean hasAdapters() { + return adapters_ != null; + } + /** + * + * + *
+   * List of network adapters.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + * + * @return The adapters. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterList getAdapters() { + return adapters_ == null + ? com.google.cloud.migrationcenter.v1.NetworkAdapterList.getDefaultInstance() + : adapters_; + } + /** + * + * + *
+   * List of network adapters.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterListOrBuilder getAdaptersOrBuilder() { + return adapters_ == null + ? com.google.cloud.migrationcenter.v1.NetworkAdapterList.getDefaultInstance() + : adapters_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryIpAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, primaryIpAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIpAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, publicIpAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryMacAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, primaryMacAddress_); + } + if (adapters_ != null) { + output.writeMessage(4, getAdapters()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryIpAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, primaryIpAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIpAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, publicIpAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryMacAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, primaryMacAddress_); + } + if (adapters_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAdapters()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.MachineNetworkDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.MachineNetworkDetails other = + (com.google.cloud.migrationcenter.v1.MachineNetworkDetails) obj; + + if (!getPrimaryIpAddress().equals(other.getPrimaryIpAddress())) return false; + if (!getPublicIpAddress().equals(other.getPublicIpAddress())) return false; + if (!getPrimaryMacAddress().equals(other.getPrimaryMacAddress())) return false; + if (hasAdapters() != other.hasAdapters()) return false; + if (hasAdapters()) { + if (!getAdapters().equals(other.getAdapters())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRIMARY_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getPrimaryIpAddress().hashCode(); + hash = (37 * hash) + PUBLIC_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getPublicIpAddress().hashCode(); + hash = (37 * hash) + PRIMARY_MAC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getPrimaryMacAddress().hashCode(); + if (hasAdapters()) { + hash = (37 * hash) + ADAPTERS_FIELD_NUMBER; + hash = (53 * hash) + getAdapters().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.MachineNetworkDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of network adapters and settings.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachineNetworkDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.MachineNetworkDetails) + com.google.cloud.migrationcenter.v1.MachineNetworkDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineNetworkDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineNetworkDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachineNetworkDetails.class, + com.google.cloud.migrationcenter.v1.MachineNetworkDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.MachineNetworkDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + primaryIpAddress_ = ""; + publicIpAddress_ = ""; + primaryMacAddress_ = ""; + adapters_ = null; + if (adaptersBuilder_ != null) { + adaptersBuilder_.dispose(); + adaptersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineNetworkDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineNetworkDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.MachineNetworkDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineNetworkDetails build() { + com.google.cloud.migrationcenter.v1.MachineNetworkDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineNetworkDetails buildPartial() { + com.google.cloud.migrationcenter.v1.MachineNetworkDetails result = + new com.google.cloud.migrationcenter.v1.MachineNetworkDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.MachineNetworkDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.primaryIpAddress_ = primaryIpAddress_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.publicIpAddress_ = publicIpAddress_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.primaryMacAddress_ = primaryMacAddress_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.adapters_ = adaptersBuilder_ == null ? adapters_ : adaptersBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.MachineNetworkDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.MachineNetworkDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.MachineNetworkDetails other) { + if (other == com.google.cloud.migrationcenter.v1.MachineNetworkDetails.getDefaultInstance()) + return this; + if (!other.getPrimaryIpAddress().isEmpty()) { + primaryIpAddress_ = other.primaryIpAddress_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPublicIpAddress().isEmpty()) { + publicIpAddress_ = other.publicIpAddress_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPrimaryMacAddress().isEmpty()) { + primaryMacAddress_ = other.primaryMacAddress_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasAdapters()) { + mergeAdapters(other.getAdapters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + primaryIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + publicIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + primaryMacAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getAdaptersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object primaryIpAddress_ = ""; + /** + * + * + *
+     * The primary IP address of the machine.
+     * 
+ * + * string primary_ip_address = 1; + * + * @return The primaryIpAddress. + */ + public java.lang.String getPrimaryIpAddress() { + java.lang.Object ref = primaryIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + primaryIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The primary IP address of the machine.
+     * 
+ * + * string primary_ip_address = 1; + * + * @return The bytes for primaryIpAddress. + */ + public com.google.protobuf.ByteString getPrimaryIpAddressBytes() { + java.lang.Object ref = primaryIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The primary IP address of the machine.
+     * 
+ * + * string primary_ip_address = 1; + * + * @param value The primaryIpAddress to set. + * @return This builder for chaining. + */ + public Builder setPrimaryIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + primaryIpAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The primary IP address of the machine.
+     * 
+ * + * string primary_ip_address = 1; + * + * @return This builder for chaining. + */ + public Builder clearPrimaryIpAddress() { + primaryIpAddress_ = getDefaultInstance().getPrimaryIpAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The primary IP address of the machine.
+     * 
+ * + * string primary_ip_address = 1; + * + * @param value The bytes for primaryIpAddress to set. + * @return This builder for chaining. + */ + public Builder setPrimaryIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + primaryIpAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object publicIpAddress_ = ""; + /** + * + * + *
+     * The public IP address of the machine.
+     * 
+ * + * string public_ip_address = 2; + * + * @return The publicIpAddress. + */ + public java.lang.String getPublicIpAddress() { + java.lang.Object ref = publicIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The public IP address of the machine.
+     * 
+ * + * string public_ip_address = 2; + * + * @return The bytes for publicIpAddress. + */ + public com.google.protobuf.ByteString getPublicIpAddressBytes() { + java.lang.Object ref = publicIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The public IP address of the machine.
+     * 
+ * + * string public_ip_address = 2; + * + * @param value The publicIpAddress to set. + * @return This builder for chaining. + */ + public Builder setPublicIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + publicIpAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The public IP address of the machine.
+     * 
+ * + * string public_ip_address = 2; + * + * @return This builder for chaining. + */ + public Builder clearPublicIpAddress() { + publicIpAddress_ = getDefaultInstance().getPublicIpAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The public IP address of the machine.
+     * 
+ * + * string public_ip_address = 2; + * + * @param value The bytes for publicIpAddress to set. + * @return This builder for chaining. + */ + public Builder setPublicIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + publicIpAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object primaryMacAddress_ = ""; + /** + * + * + *
+     * MAC address of the machine.
+     * This property is used to uniqly identify the machine.
+     * 
+ * + * string primary_mac_address = 3; + * + * @return The primaryMacAddress. + */ + public java.lang.String getPrimaryMacAddress() { + java.lang.Object ref = primaryMacAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + primaryMacAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * MAC address of the machine.
+     * This property is used to uniqly identify the machine.
+     * 
+ * + * string primary_mac_address = 3; + * + * @return The bytes for primaryMacAddress. + */ + public com.google.protobuf.ByteString getPrimaryMacAddressBytes() { + java.lang.Object ref = primaryMacAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryMacAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * MAC address of the machine.
+     * This property is used to uniqly identify the machine.
+     * 
+ * + * string primary_mac_address = 3; + * + * @param value The primaryMacAddress to set. + * @return This builder for chaining. + */ + public Builder setPrimaryMacAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + primaryMacAddress_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * MAC address of the machine.
+     * This property is used to uniqly identify the machine.
+     * 
+ * + * string primary_mac_address = 3; + * + * @return This builder for chaining. + */ + public Builder clearPrimaryMacAddress() { + primaryMacAddress_ = getDefaultInstance().getPrimaryMacAddress(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * MAC address of the machine.
+     * This property is used to uniqly identify the machine.
+     * 
+ * + * string primary_mac_address = 3; + * + * @param value The bytes for primaryMacAddress to set. + * @return This builder for chaining. + */ + public Builder setPrimaryMacAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + primaryMacAddress_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.NetworkAdapterList adapters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAdapterList, + com.google.cloud.migrationcenter.v1.NetworkAdapterList.Builder, + com.google.cloud.migrationcenter.v1.NetworkAdapterListOrBuilder> + adaptersBuilder_; + /** + * + * + *
+     * List of network adapters.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + * + * @return Whether the adapters field is set. + */ + public boolean hasAdapters() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * List of network adapters.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + * + * @return The adapters. + */ + public com.google.cloud.migrationcenter.v1.NetworkAdapterList getAdapters() { + if (adaptersBuilder_ == null) { + return adapters_ == null + ? com.google.cloud.migrationcenter.v1.NetworkAdapterList.getDefaultInstance() + : adapters_; + } else { + return adaptersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * List of network adapters.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + */ + public Builder setAdapters(com.google.cloud.migrationcenter.v1.NetworkAdapterList value) { + if (adaptersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + adapters_ = value; + } else { + adaptersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * List of network adapters.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + */ + public Builder setAdapters( + com.google.cloud.migrationcenter.v1.NetworkAdapterList.Builder builderForValue) { + if (adaptersBuilder_ == null) { + adapters_ = builderForValue.build(); + } else { + adaptersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * List of network adapters.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + */ + public Builder mergeAdapters(com.google.cloud.migrationcenter.v1.NetworkAdapterList value) { + if (adaptersBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && adapters_ != null + && adapters_ + != com.google.cloud.migrationcenter.v1.NetworkAdapterList.getDefaultInstance()) { + getAdaptersBuilder().mergeFrom(value); + } else { + adapters_ = value; + } + } else { + adaptersBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * List of network adapters.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + */ + public Builder clearAdapters() { + bitField0_ = (bitField0_ & ~0x00000008); + adapters_ = null; + if (adaptersBuilder_ != null) { + adaptersBuilder_.dispose(); + adaptersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * List of network adapters.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + */ + public com.google.cloud.migrationcenter.v1.NetworkAdapterList.Builder getAdaptersBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getAdaptersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * List of network adapters.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + */ + public com.google.cloud.migrationcenter.v1.NetworkAdapterListOrBuilder getAdaptersOrBuilder() { + if (adaptersBuilder_ != null) { + return adaptersBuilder_.getMessageOrBuilder(); + } else { + return adapters_ == null + ? com.google.cloud.migrationcenter.v1.NetworkAdapterList.getDefaultInstance() + : adapters_; + } + } + /** + * + * + *
+     * List of network adapters.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAdapterList, + com.google.cloud.migrationcenter.v1.NetworkAdapterList.Builder, + com.google.cloud.migrationcenter.v1.NetworkAdapterListOrBuilder> + getAdaptersFieldBuilder() { + if (adaptersBuilder_ == null) { + adaptersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAdapterList, + com.google.cloud.migrationcenter.v1.NetworkAdapterList.Builder, + com.google.cloud.migrationcenter.v1.NetworkAdapterListOrBuilder>( + getAdapters(), getParentForChildren(), isClean()); + adapters_ = null; + } + return adaptersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.MachineNetworkDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.MachineNetworkDetails) + private static final com.google.cloud.migrationcenter.v1.MachineNetworkDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.MachineNetworkDetails(); + } + + public static com.google.cloud.migrationcenter.v1.MachineNetworkDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MachineNetworkDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineNetworkDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineNetworkDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineNetworkDetailsOrBuilder.java new file mode 100644 index 000000000000..f770f3971a26 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineNetworkDetailsOrBuilder.java @@ -0,0 +1,137 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface MachineNetworkDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.MachineNetworkDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The primary IP address of the machine.
+   * 
+ * + * string primary_ip_address = 1; + * + * @return The primaryIpAddress. + */ + java.lang.String getPrimaryIpAddress(); + /** + * + * + *
+   * The primary IP address of the machine.
+   * 
+ * + * string primary_ip_address = 1; + * + * @return The bytes for primaryIpAddress. + */ + com.google.protobuf.ByteString getPrimaryIpAddressBytes(); + + /** + * + * + *
+   * The public IP address of the machine.
+   * 
+ * + * string public_ip_address = 2; + * + * @return The publicIpAddress. + */ + java.lang.String getPublicIpAddress(); + /** + * + * + *
+   * The public IP address of the machine.
+   * 
+ * + * string public_ip_address = 2; + * + * @return The bytes for publicIpAddress. + */ + com.google.protobuf.ByteString getPublicIpAddressBytes(); + + /** + * + * + *
+   * MAC address of the machine.
+   * This property is used to uniqly identify the machine.
+   * 
+ * + * string primary_mac_address = 3; + * + * @return The primaryMacAddress. + */ + java.lang.String getPrimaryMacAddress(); + /** + * + * + *
+   * MAC address of the machine.
+   * This property is used to uniqly identify the machine.
+   * 
+ * + * string primary_mac_address = 3; + * + * @return The bytes for primaryMacAddress. + */ + com.google.protobuf.ByteString getPrimaryMacAddressBytes(); + + /** + * + * + *
+   * List of network adapters.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + * + * @return Whether the adapters field is set. + */ + boolean hasAdapters(); + /** + * + * + *
+   * List of network adapters.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + * + * @return The adapters. + */ + com.google.cloud.migrationcenter.v1.NetworkAdapterList getAdapters(); + /** + * + * + *
+   * List of network adapters.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + */ + com.google.cloud.migrationcenter.v1.NetworkAdapterListOrBuilder getAdaptersOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachinePreferences.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachinePreferences.java new file mode 100644 index 000000000000..95f3b9261274 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachinePreferences.java @@ -0,0 +1,1005 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * The type of machines to consider when calculating virtual machine migration
+ * insights and recommendations.
+ * Not all machine types are available in all zones and regions.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachinePreferences} + */ +public final class MachinePreferences extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.MachinePreferences) + MachinePreferencesOrBuilder { + private static final long serialVersionUID = 0L; + // Use MachinePreferences.newBuilder() to construct. + private MachinePreferences(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MachinePreferences() { + allowedMachineSeries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MachinePreferences(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachinePreferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachinePreferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachinePreferences.class, + com.google.cloud.migrationcenter.v1.MachinePreferences.Builder.class); + } + + public static final int ALLOWED_MACHINE_SERIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List allowedMachineSeries_; + /** + * + * + *
+   * Compute Engine machine series to consider for insights and recommendations.
+   * If empty, no restriction is applied on the machine series.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + @java.lang.Override + public java.util.List + getAllowedMachineSeriesList() { + return allowedMachineSeries_; + } + /** + * + * + *
+   * Compute Engine machine series to consider for insights and recommendations.
+   * If empty, no restriction is applied on the machine series.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + @java.lang.Override + public java.util.List + getAllowedMachineSeriesOrBuilderList() { + return allowedMachineSeries_; + } + /** + * + * + *
+   * Compute Engine machine series to consider for insights and recommendations.
+   * If empty, no restriction is applied on the machine series.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + @java.lang.Override + public int getAllowedMachineSeriesCount() { + return allowedMachineSeries_.size(); + } + /** + * + * + *
+   * Compute Engine machine series to consider for insights and recommendations.
+   * If empty, no restriction is applied on the machine series.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineSeries getAllowedMachineSeries(int index) { + return allowedMachineSeries_.get(index); + } + /** + * + * + *
+   * Compute Engine machine series to consider for insights and recommendations.
+   * If empty, no restriction is applied on the machine series.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder + getAllowedMachineSeriesOrBuilder(int index) { + return allowedMachineSeries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < allowedMachineSeries_.size(); i++) { + output.writeMessage(1, allowedMachineSeries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < allowedMachineSeries_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, allowedMachineSeries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.MachinePreferences)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.MachinePreferences other = + (com.google.cloud.migrationcenter.v1.MachinePreferences) obj; + + if (!getAllowedMachineSeriesList().equals(other.getAllowedMachineSeriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAllowedMachineSeriesCount() > 0) { + hash = (37 * hash) + ALLOWED_MACHINE_SERIES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedMachineSeriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.MachinePreferences prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The type of machines to consider when calculating virtual machine migration
+   * insights and recommendations.
+   * Not all machine types are available in all zones and regions.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachinePreferences} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.MachinePreferences) + com.google.cloud.migrationcenter.v1.MachinePreferencesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachinePreferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachinePreferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachinePreferences.class, + com.google.cloud.migrationcenter.v1.MachinePreferences.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.MachinePreferences.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (allowedMachineSeriesBuilder_ == null) { + allowedMachineSeries_ = java.util.Collections.emptyList(); + } else { + allowedMachineSeries_ = null; + allowedMachineSeriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachinePreferences_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachinePreferences getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.MachinePreferences.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachinePreferences build() { + com.google.cloud.migrationcenter.v1.MachinePreferences result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachinePreferences buildPartial() { + com.google.cloud.migrationcenter.v1.MachinePreferences result = + new com.google.cloud.migrationcenter.v1.MachinePreferences(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.MachinePreferences result) { + if (allowedMachineSeriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + allowedMachineSeries_ = java.util.Collections.unmodifiableList(allowedMachineSeries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedMachineSeries_ = allowedMachineSeries_; + } else { + result.allowedMachineSeries_ = allowedMachineSeriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.MachinePreferences result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.MachinePreferences) { + return mergeFrom((com.google.cloud.migrationcenter.v1.MachinePreferences) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.MachinePreferences other) { + if (other == com.google.cloud.migrationcenter.v1.MachinePreferences.getDefaultInstance()) + return this; + if (allowedMachineSeriesBuilder_ == null) { + if (!other.allowedMachineSeries_.isEmpty()) { + if (allowedMachineSeries_.isEmpty()) { + allowedMachineSeries_ = other.allowedMachineSeries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedMachineSeriesIsMutable(); + allowedMachineSeries_.addAll(other.allowedMachineSeries_); + } + onChanged(); + } + } else { + if (!other.allowedMachineSeries_.isEmpty()) { + if (allowedMachineSeriesBuilder_.isEmpty()) { + allowedMachineSeriesBuilder_.dispose(); + allowedMachineSeriesBuilder_ = null; + allowedMachineSeries_ = other.allowedMachineSeries_; + bitField0_ = (bitField0_ & ~0x00000001); + allowedMachineSeriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAllowedMachineSeriesFieldBuilder() + : null; + } else { + allowedMachineSeriesBuilder_.addAllMessages(other.allowedMachineSeries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.MachineSeries m = + input.readMessage( + com.google.cloud.migrationcenter.v1.MachineSeries.parser(), + extensionRegistry); + if (allowedMachineSeriesBuilder_ == null) { + ensureAllowedMachineSeriesIsMutable(); + allowedMachineSeries_.add(m); + } else { + allowedMachineSeriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + allowedMachineSeries_ = java.util.Collections.emptyList(); + + private void ensureAllowedMachineSeriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedMachineSeries_ = + new java.util.ArrayList( + allowedMachineSeries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineSeries, + com.google.cloud.migrationcenter.v1.MachineSeries.Builder, + com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder> + allowedMachineSeriesBuilder_; + + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public java.util.List + getAllowedMachineSeriesList() { + if (allowedMachineSeriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(allowedMachineSeries_); + } else { + return allowedMachineSeriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public int getAllowedMachineSeriesCount() { + if (allowedMachineSeriesBuilder_ == null) { + return allowedMachineSeries_.size(); + } else { + return allowedMachineSeriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public com.google.cloud.migrationcenter.v1.MachineSeries getAllowedMachineSeries(int index) { + if (allowedMachineSeriesBuilder_ == null) { + return allowedMachineSeries_.get(index); + } else { + return allowedMachineSeriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public Builder setAllowedMachineSeries( + int index, com.google.cloud.migrationcenter.v1.MachineSeries value) { + if (allowedMachineSeriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedMachineSeriesIsMutable(); + allowedMachineSeries_.set(index, value); + onChanged(); + } else { + allowedMachineSeriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public Builder setAllowedMachineSeries( + int index, com.google.cloud.migrationcenter.v1.MachineSeries.Builder builderForValue) { + if (allowedMachineSeriesBuilder_ == null) { + ensureAllowedMachineSeriesIsMutable(); + allowedMachineSeries_.set(index, builderForValue.build()); + onChanged(); + } else { + allowedMachineSeriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public Builder addAllowedMachineSeries( + com.google.cloud.migrationcenter.v1.MachineSeries value) { + if (allowedMachineSeriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedMachineSeriesIsMutable(); + allowedMachineSeries_.add(value); + onChanged(); + } else { + allowedMachineSeriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public Builder addAllowedMachineSeries( + int index, com.google.cloud.migrationcenter.v1.MachineSeries value) { + if (allowedMachineSeriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedMachineSeriesIsMutable(); + allowedMachineSeries_.add(index, value); + onChanged(); + } else { + allowedMachineSeriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public Builder addAllowedMachineSeries( + com.google.cloud.migrationcenter.v1.MachineSeries.Builder builderForValue) { + if (allowedMachineSeriesBuilder_ == null) { + ensureAllowedMachineSeriesIsMutable(); + allowedMachineSeries_.add(builderForValue.build()); + onChanged(); + } else { + allowedMachineSeriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public Builder addAllowedMachineSeries( + int index, com.google.cloud.migrationcenter.v1.MachineSeries.Builder builderForValue) { + if (allowedMachineSeriesBuilder_ == null) { + ensureAllowedMachineSeriesIsMutable(); + allowedMachineSeries_.add(index, builderForValue.build()); + onChanged(); + } else { + allowedMachineSeriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public Builder addAllAllowedMachineSeries( + java.lang.Iterable values) { + if (allowedMachineSeriesBuilder_ == null) { + ensureAllowedMachineSeriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedMachineSeries_); + onChanged(); + } else { + allowedMachineSeriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public Builder clearAllowedMachineSeries() { + if (allowedMachineSeriesBuilder_ == null) { + allowedMachineSeries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + allowedMachineSeriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public Builder removeAllowedMachineSeries(int index) { + if (allowedMachineSeriesBuilder_ == null) { + ensureAllowedMachineSeriesIsMutable(); + allowedMachineSeries_.remove(index); + onChanged(); + } else { + allowedMachineSeriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public com.google.cloud.migrationcenter.v1.MachineSeries.Builder getAllowedMachineSeriesBuilder( + int index) { + return getAllowedMachineSeriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder + getAllowedMachineSeriesOrBuilder(int index) { + if (allowedMachineSeriesBuilder_ == null) { + return allowedMachineSeries_.get(index); + } else { + return allowedMachineSeriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public java.util.List + getAllowedMachineSeriesOrBuilderList() { + if (allowedMachineSeriesBuilder_ != null) { + return allowedMachineSeriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(allowedMachineSeries_); + } + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public com.google.cloud.migrationcenter.v1.MachineSeries.Builder + addAllowedMachineSeriesBuilder() { + return getAllowedMachineSeriesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.MachineSeries.getDefaultInstance()); + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public com.google.cloud.migrationcenter.v1.MachineSeries.Builder addAllowedMachineSeriesBuilder( + int index) { + return getAllowedMachineSeriesFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.MachineSeries.getDefaultInstance()); + } + /** + * + * + *
+     * Compute Engine machine series to consider for insights and recommendations.
+     * If empty, no restriction is applied on the machine series.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + public java.util.List + getAllowedMachineSeriesBuilderList() { + return getAllowedMachineSeriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineSeries, + com.google.cloud.migrationcenter.v1.MachineSeries.Builder, + com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder> + getAllowedMachineSeriesFieldBuilder() { + if (allowedMachineSeriesBuilder_ == null) { + allowedMachineSeriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineSeries, + com.google.cloud.migrationcenter.v1.MachineSeries.Builder, + com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder>( + allowedMachineSeries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + allowedMachineSeries_ = null; + } + return allowedMachineSeriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.MachinePreferences) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.MachinePreferences) + private static final com.google.cloud.migrationcenter.v1.MachinePreferences DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.MachinePreferences(); + } + + public static com.google.cloud.migrationcenter.v1.MachinePreferences getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MachinePreferences parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachinePreferences getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachinePreferencesOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachinePreferencesOrBuilder.java new file mode 100644 index 000000000000..36a896480e45 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachinePreferencesOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface MachinePreferencesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.MachinePreferences) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Compute Engine machine series to consider for insights and recommendations.
+   * If empty, no restriction is applied on the machine series.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + java.util.List getAllowedMachineSeriesList(); + /** + * + * + *
+   * Compute Engine machine series to consider for insights and recommendations.
+   * If empty, no restriction is applied on the machine series.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + com.google.cloud.migrationcenter.v1.MachineSeries getAllowedMachineSeries(int index); + /** + * + * + *
+   * Compute Engine machine series to consider for insights and recommendations.
+   * If empty, no restriction is applied on the machine series.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + int getAllowedMachineSeriesCount(); + /** + * + * + *
+   * Compute Engine machine series to consider for insights and recommendations.
+   * If empty, no restriction is applied on the machine series.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + java.util.List + getAllowedMachineSeriesOrBuilderList(); + /** + * + * + *
+   * Compute Engine machine series to consider for insights and recommendations.
+   * If empty, no restriction is applied on the machine series.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * + */ + com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder getAllowedMachineSeriesOrBuilder( + int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineSeries.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineSeries.java new file mode 100644 index 000000000000..3e88d6da7a48 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineSeries.java @@ -0,0 +1,638 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A Compute Engine machine series.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachineSeries} + */ +public final class MachineSeries extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.MachineSeries) + MachineSeriesOrBuilder { + private static final long serialVersionUID = 0L; + // Use MachineSeries.newBuilder() to construct. + private MachineSeries(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MachineSeries() { + code_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MachineSeries(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineSeries_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineSeries_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachineSeries.class, + com.google.cloud.migrationcenter.v1.MachineSeries.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object code_ = ""; + /** + * + * + *
+   * Code to identify a Compute Engine machine series. Consult
+   * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison
+   * for more details on the available series.
+   * 
+ * + * string code = 1; + * + * @return The code. + */ + @java.lang.Override + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } + } + /** + * + * + *
+   * Code to identify a Compute Engine machine series. Consult
+   * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison
+   * for more details on the available series.
+   * 
+ * + * string code = 1; + * + * @return The bytes for code. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(code_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, code_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(code_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, code_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.MachineSeries)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.MachineSeries other = + (com.google.cloud.migrationcenter.v1.MachineSeries) obj; + + if (!getCode().equals(other.getCode())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.MachineSeries prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A Compute Engine machine series.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MachineSeries} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.MachineSeries) + com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineSeries_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineSeries_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MachineSeries.class, + com.google.cloud.migrationcenter.v1.MachineSeries.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.MachineSeries.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MachineSeries_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineSeries getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.MachineSeries.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineSeries build() { + com.google.cloud.migrationcenter.v1.MachineSeries result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineSeries buildPartial() { + com.google.cloud.migrationcenter.v1.MachineSeries result = + new com.google.cloud.migrationcenter.v1.MachineSeries(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.MachineSeries result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.MachineSeries) { + return mergeFrom((com.google.cloud.migrationcenter.v1.MachineSeries) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.MachineSeries other) { + if (other == com.google.cloud.migrationcenter.v1.MachineSeries.getDefaultInstance()) + return this; + if (!other.getCode().isEmpty()) { + code_ = other.code_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + code_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object code_ = ""; + /** + * + * + *
+     * Code to identify a Compute Engine machine series. Consult
+     * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison
+     * for more details on the available series.
+     * 
+ * + * string code = 1; + * + * @return The code. + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Code to identify a Compute Engine machine series. Consult
+     * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison
+     * for more details on the available series.
+     * 
+ * + * string code = 1; + * + * @return The bytes for code. + */ + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Code to identify a Compute Engine machine series. Consult
+     * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison
+     * for more details on the available series.
+     * 
+ * + * string code = 1; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Code to identify a Compute Engine machine series. Consult
+     * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison
+     * for more details on the available series.
+     * 
+ * + * string code = 1; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + code_ = getDefaultInstance().getCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Code to identify a Compute Engine machine series. Consult
+     * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison
+     * for more details on the available series.
+     * 
+ * + * string code = 1; + * + * @param value The bytes for code to set. + * @return This builder for chaining. + */ + public Builder setCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.MachineSeries) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.MachineSeries) + private static final com.google.cloud.migrationcenter.v1.MachineSeries DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.MachineSeries(); + } + + public static com.google.cloud.migrationcenter.v1.MachineSeries getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MachineSeries parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineSeries getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineSeriesOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineSeriesOrBuilder.java new file mode 100644 index 000000000000..f7dc6d2118cd --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MachineSeriesOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface MachineSeriesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.MachineSeries) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Code to identify a Compute Engine machine series. Consult
+   * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison
+   * for more details on the available series.
+   * 
+ * + * string code = 1; + * + * @return The code. + */ + java.lang.String getCode(); + /** + * + * + *
+   * Code to identify a Compute Engine machine series. Consult
+   * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison
+   * for more details on the available series.
+   * 
+ * + * string code = 1; + * + * @return The bytes for code. + */ + com.google.protobuf.ByteString getCodeBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MemoryUsageSample.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MemoryUsageSample.java new file mode 100644 index 000000000000..ee818cee65e7 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MemoryUsageSample.java @@ -0,0 +1,536 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Memory usage sample.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MemoryUsageSample} + */ +public final class MemoryUsageSample extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.MemoryUsageSample) + MemoryUsageSampleOrBuilder { + private static final long serialVersionUID = 0L; + // Use MemoryUsageSample.newBuilder() to construct. + private MemoryUsageSample(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MemoryUsageSample() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MemoryUsageSample(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MemoryUsageSample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MemoryUsageSample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MemoryUsageSample.class, + com.google.cloud.migrationcenter.v1.MemoryUsageSample.Builder.class); + } + + public static final int UTILIZED_PERCENTAGE_FIELD_NUMBER = 1; + private float utilizedPercentage_ = 0F; + /** + * + * + *
+   * Percentage of system memory utilized. Must be in the interval [0, 100].
+   * 
+ * + * float utilized_percentage = 1; + * + * @return The utilizedPercentage. + */ + @java.lang.Override + public float getUtilizedPercentage() { + return utilizedPercentage_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(utilizedPercentage_) != 0) { + output.writeFloat(1, utilizedPercentage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(utilizedPercentage_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, utilizedPercentage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.MemoryUsageSample)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.MemoryUsageSample other = + (com.google.cloud.migrationcenter.v1.MemoryUsageSample) obj; + + if (java.lang.Float.floatToIntBits(getUtilizedPercentage()) + != java.lang.Float.floatToIntBits(other.getUtilizedPercentage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + UTILIZED_PERCENTAGE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getUtilizedPercentage()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.MemoryUsageSample prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Memory usage sample.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MemoryUsageSample} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.MemoryUsageSample) + com.google.cloud.migrationcenter.v1.MemoryUsageSampleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MemoryUsageSample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MemoryUsageSample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MemoryUsageSample.class, + com.google.cloud.migrationcenter.v1.MemoryUsageSample.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.MemoryUsageSample.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + utilizedPercentage_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MemoryUsageSample_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MemoryUsageSample getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.MemoryUsageSample.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MemoryUsageSample build() { + com.google.cloud.migrationcenter.v1.MemoryUsageSample result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MemoryUsageSample buildPartial() { + com.google.cloud.migrationcenter.v1.MemoryUsageSample result = + new com.google.cloud.migrationcenter.v1.MemoryUsageSample(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.MemoryUsageSample result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.utilizedPercentage_ = utilizedPercentage_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.MemoryUsageSample) { + return mergeFrom((com.google.cloud.migrationcenter.v1.MemoryUsageSample) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.MemoryUsageSample other) { + if (other == com.google.cloud.migrationcenter.v1.MemoryUsageSample.getDefaultInstance()) + return this; + if (other.getUtilizedPercentage() != 0F) { + setUtilizedPercentage(other.getUtilizedPercentage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + utilizedPercentage_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float utilizedPercentage_; + /** + * + * + *
+     * Percentage of system memory utilized. Must be in the interval [0, 100].
+     * 
+ * + * float utilized_percentage = 1; + * + * @return The utilizedPercentage. + */ + @java.lang.Override + public float getUtilizedPercentage() { + return utilizedPercentage_; + } + /** + * + * + *
+     * Percentage of system memory utilized. Must be in the interval [0, 100].
+     * 
+ * + * float utilized_percentage = 1; + * + * @param value The utilizedPercentage to set. + * @return This builder for chaining. + */ + public Builder setUtilizedPercentage(float value) { + + utilizedPercentage_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Percentage of system memory utilized. Must be in the interval [0, 100].
+     * 
+ * + * float utilized_percentage = 1; + * + * @return This builder for chaining. + */ + public Builder clearUtilizedPercentage() { + bitField0_ = (bitField0_ & ~0x00000001); + utilizedPercentage_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.MemoryUsageSample) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.MemoryUsageSample) + private static final com.google.cloud.migrationcenter.v1.MemoryUsageSample DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.MemoryUsageSample(); + } + + public static com.google.cloud.migrationcenter.v1.MemoryUsageSample getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MemoryUsageSample parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MemoryUsageSample getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MemoryUsageSampleOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MemoryUsageSampleOrBuilder.java new file mode 100644 index 000000000000..a2fb1fd52e80 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MemoryUsageSampleOrBuilder.java @@ -0,0 +1,38 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface MemoryUsageSampleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.MemoryUsageSample) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Percentage of system memory utilized. Must be in the interval [0, 100].
+   * 
+ * + * float utilized_percentage = 1; + * + * @return The utilizedPercentage. + */ + float getUtilizedPercentage(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterProto.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterProto.java new file mode 100644 index 000000000000..236ef0eebaf3 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterProto.java @@ -0,0 +1,3502 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public final class MigrationCenterProto { + private MigrationCenterProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Asset_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Asset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Asset_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Asset_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Asset_AttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Asset_AttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_PreferenceSet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_PreferenceSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ImportJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ImportJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ImportJob_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ImportJob_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ImportDataFile_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ImportDataFile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Group_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Group_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Group_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Group_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ErrorFrame_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ErrorFrame_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Source_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Source_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportConfig_GroupPreferenceSetAssignment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportConfig_GroupPreferenceSetAssignment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Report_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Report_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListAssetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListAssetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListAssetsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListAssetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GetAssetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GetAssetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_UpdateAssetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_UpdateAssetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DeleteAssetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DeleteAssetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_BatchDeleteAssetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_BatchDeleteAssetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_CreateImportJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_CreateImportJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListImportJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListImportJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListImportJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListImportJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GetImportJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GetImportJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DeleteImportJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DeleteImportJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_UpdateImportJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_UpdateImportJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ValidateImportJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ValidateImportJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_RunImportJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_RunImportJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GetImportDataFileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GetImportDataFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_CreateImportDataFileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_CreateImportDataFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DeleteImportDataFileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DeleteImportDataFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListGroupsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListGroupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListGroupsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListGroupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GetGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GetGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_CreateGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_CreateGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_UpdateGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_UpdateGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DeleteGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DeleteGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AddAssetsToGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AddAssetsToGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_RemoveAssetsFromGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_RemoveAssetsFromGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListErrorFramesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListErrorFramesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListErrorFramesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListErrorFramesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GetErrorFrameRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GetErrorFrameRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListSourcesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListSourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListSourcesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListSourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GetSourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GetSourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_CreateSourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_CreateSourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_UpdateSourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_UpdateSourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DeleteSourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DeleteSourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GetPreferenceSetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GetPreferenceSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_CreatePreferenceSetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_CreatePreferenceSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_UpdatePreferenceSetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_UpdatePreferenceSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DeletePreferenceSetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DeletePreferenceSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GetSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GetSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_UpdateSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_UpdateSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_CreateReportConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_CreateReportConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DeleteReportConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DeleteReportConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GetReportRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GetReportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListReportsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListReportsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListReportsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListReportsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DeleteReportRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DeleteReportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GetReportConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GetReportConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListReportConfigsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListReportConfigsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ListReportConfigsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ListReportConfigsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_CreateReportRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_CreateReportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Frames_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Frames_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AssetFrame_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AssetFrame_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AssetFrame_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AssetFrame_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AssetFrame_AttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AssetFrame_AttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_MachineDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_MachineDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_MachineArchitectureDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_MachineArchitectureDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_BiosDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_BiosDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_MachineNetworkDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_MachineNetworkDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_NetworkAdapterList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_NetworkAdapterList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_NetworkAdapterDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_NetworkAdapterDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_NetworkAddressList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_NetworkAddressList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_NetworkAddress_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_NetworkAddress_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_MachineDiskDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_MachineDiskDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DiskEntryList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DiskEntryList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DiskEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DiskEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DiskPartitionList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DiskPartitionList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DiskPartition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DiskPartition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_VmwareDiskConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_VmwareDiskConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GuestOsDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GuestOsDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GuestConfigDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GuestConfigDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_FstabEntryList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_FstabEntryList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_FstabEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_FstabEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_HostsEntryList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_HostsEntryList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_HostsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_HostsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_NfsExportList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_NfsExportList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_NfsExport_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_NfsExport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GuestRuntimeDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GuestRuntimeDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_RunningServiceList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_RunningServiceList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_RunningService_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_RunningService_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_RunningProcessList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_RunningProcessList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_RunningProcess_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_RunningProcess_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_RunningProcess_AttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_RunningProcess_AttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_RuntimeNetworkInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_RuntimeNetworkInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_NetworkConnectionList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_NetworkConnectionList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_NetworkConnection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_NetworkConnection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplicationList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplicationList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplication_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplication_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_OpenFileList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_OpenFileList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_OpenFileDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_OpenFileDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_PlatformDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_PlatformDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_VmwarePlatformDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_VmwarePlatformDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AwsEc2PlatformDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AwsEc2PlatformDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AzureVmPlatformDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AzureVmPlatformDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_GenericPlatformDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_GenericPlatformDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_PhysicalPlatformDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_PhysicalPlatformDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_MemoryUsageSample_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_MemoryUsageSample_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_CpuUsageSample_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_CpuUsageSample_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_NetworkUsageSample_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_NetworkUsageSample_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DiskUsageSample_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DiskUsageSample_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_PerformanceSample_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_PerformanceSample_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AssetPerformanceData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AssetPerformanceData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Stats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Stats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_CPU_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_CPU_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Memory_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Memory_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Network_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Network_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Disk_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Disk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_InsightList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_InsightList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Insight_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Insight_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_MigrationInsight_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_MigrationInsight_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ComputeEngineMigrationTarget_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ComputeEngineMigrationTarget_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_FitDescriptor_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_FitDescriptor_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ComputeEngineShapeDescriptor_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ComputeEngineShapeDescriptor_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Aggregation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Aggregation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Aggregation_Count_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Aggregation_Count_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Aggregation_Sum_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Aggregation_Sum_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Aggregation_Histogram_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Aggregation_Histogram_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Aggregation_Frequency_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Aggregation_Frequency_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AggregationResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AggregationResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Count_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Count_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Sum_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Sum_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_Bucket_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_Bucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_ValuesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_ValuesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_FileValidationReport_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_FileValidationReport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ValidationReport_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ValidationReport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ExecutionReport_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ExecutionReport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ImportError_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ImportError_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ImportRowError_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ImportRowError_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_HeadersEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_HeadersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_AssetList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_AssetList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_FrameViolationEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_FrameViolationEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_VirtualMachinePreferences_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_VirtualMachinePreferences_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ComputeEnginePreferences_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ComputeEnginePreferences_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_MachinePreferences_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_MachinePreferences_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_MachineSeries_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_MachineSeries_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_RegionPreferences_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_RegionPreferences_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_Settings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_Settings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_DataPoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_DataPoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportSummary_UtilizationChartData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportSummary_UtilizationChartData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_Bucket_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_Bucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportSummary_AssetAggregateStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportSummary_AssetAggregateStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportSummary_MachineSeriesAllocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportSummary_MachineSeriesAllocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ComputeEngineFinding_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ComputeEngineFinding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupPreferenceSetFinding_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupPreferenceSetFinding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupFinding_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupFinding_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/migrationcenter/v1/migrat" + + "ioncenter.proto\022\037google.cloud.migrationc" + + "enter.v1\032\034google/api/annotations.proto\032\027" + + "google/api/client.proto\032\037google/api/fiel" + + "d_behavior.proto\032\031google/api/resource.pr" + + "oto\032#google/longrunning/operations.proto" + + "\032\033google/protobuf/empty.proto\032 google/pr" + + "otobuf/field_mask.proto\032\037google/protobuf" + + "/timestamp.proto\032\026google/type/date.proto" + + "\032\027google/type/money.proto\"\352\006\n\005Asset\022\022\n\004n" + + "ame\030\001 \001(\tB\004\342A\001\003\0225\n\013create_time\030\002 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\004\342A\001\003\0225\n\013update" + + "_time\030\003 \001(\0132\032.google.protobuf.TimestampB" + + "\004\342A\001\003\022B\n\006labels\030\004 \003(\01322.google.cloud.mig" + + "rationcenter.v1.Asset.LabelsEntry\022J\n\natt" + + "ributes\030\005 \003(\01326.google.cloud.migrationce" + + "nter.v1.Asset.AttributesEntry\022P\n\017machine" + + "_details\030\006 \001(\0132/.google.cloud.migrationc" + + "enter.v1.MachineDetailsB\004\342A\001\003H\000\022H\n\014insig" + + "ht_list\030\024 \001(\0132,.google.cloud.migrationce" + + "nter.v1.InsightListB\004\342A\001\003\022U\n\020performance" + + "_data\030\025 \001(\01325.google.cloud.migrationcent" + + "er.v1.AssetPerformanceDataB\004\342A\001\003\022?\n\007sour" + + "ces\030\026 \003(\tB.\342A\001\003\372A\'\n%migrationcenter.goog" + + "leapis.com/Source\022F\n\017assigned_groups\030\027 \003" + + "(\tB-\342A\001\003\372A&\n$migrationcenter.googleapis." + + "com/Group\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\0321\n\017AttributesEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:a\352A^\n$migrat" + + "ioncenter.googleapis.com/Asset\0226projects" + + "/{project}/locations/{location}/assets/{" + + "asset}B\016\n\014AssetDetails\"\231\003\n\rPreferenceSet" + + "\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\0225\n\013create_time\030\002 \001(" + + "\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013u" + + "pdate_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tampB\004\342A\001\003\022\024\n\014display_name\030\004 \001(\t\022\023\n\013desc" + + "ription\030\005 \001(\t\022_\n\033virtual_machine_prefere" + + "nces\030\006 \001(\0132:.google.cloud.migrationcente" + + "r.v1.VirtualMachinePreferences:z\352Aw\n,mig" + + "rationcenter.googleapis.com/PreferenceSe" + + "t\022Gprojects/{project}/locations/{locatio" + + "n}/preferenceSets/{preference_set}\"\240\010\n\tI" + + "mportJob\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\024\n\014display_" + + "name\030\002 \001(\t\0225\n\013create_time\030\003 \001(\0132\032.google" + + ".protobuf.TimestampB\004\342A\001\003\0225\n\013update_time" + + "\030\004 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003" + + "\0227\n\rcomplete_time\030\005 \001(\0132\032.google.protobu" + + "f.TimestampB\004\342A\001\003\022N\n\005state\030\006 \001(\01629.googl" + + "e.cloud.migrationcenter.v1.ImportJob.Imp" + + "ortJobStateB\004\342A\001\003\022F\n\006labels\030\007 \003(\01326.goog" + + "le.cloud.migrationcenter.v1.ImportJob.La" + + "belsEntry\022D\n\014asset_source\030\010 \001(\tB.\342A\001\002\372A\'" + + "\n%migrationcenter.googleapis.com/Source\022" + + "T\n\021validation_report\030\n \001(\01321.google.clou" + + "d.migrationcenter.v1.ValidationReportB\004\342" + + "A\001\003H\000\022R\n\020execution_report\030\013 \001(\01320.google" + + ".cloud.migrationcenter.v1.ExecutionRepor" + + "tB\004\342A\001\003H\000\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"\220\002\n\016ImportJobState\022 \n\034I" + + "MPORT_JOB_STATE_UNSPECIFIED\020\000\022\034\n\030IMPORT_" + + "JOB_STATE_PENDING\020\001\022\034\n\030IMPORT_JOB_STATE_" + + "RUNNING\020\002\022\036\n\032IMPORT_JOB_STATE_COMPLETED\020" + + "\003\022\033\n\027IMPORT_JOB_STATE_FAILED\020\004\022\037\n\033IMPORT" + + "_JOB_STATE_VALIDATING\020\005\022&\n\"IMPORT_JOB_ST" + + "ATE_FAILED_VALIDATION\020\006\022\032\n\026IMPORT_JOB_ST" + + "ATE_READY\020\007:n\352Ak\n(migrationcenter.google" + + "apis.com/ImportJob\022?projects/{project}/l" + + "ocations/{location}/importJobs/{import_j" + + "ob}B\010\n\006report\"\263\004\n\016ImportDataFile\022\022\n\004name" + + "\030\001 \001(\tB\004\342A\001\003\022\024\n\014display_name\030\006 \001(\t\022F\n\006fo" + + "rmat\030\002 \001(\01620.google.cloud.migrationcente" + + "r.v1.ImportJobFormatB\004\342A\001\002\0225\n\013create_tim" + + "e\030\003 \001(\0132\032.google.protobuf.TimestampB\004\342A\001" + + "\003\022J\n\005state\030\004 \001(\01625.google.cloud.migratio" + + "ncenter.v1.ImportDataFile.StateB\004\342A\001\003\022K\n" + + "\020upload_file_info\030\005 \001(\0132/.google.cloud.m" + + "igrationcenter.v1.UploadFileInfoH\000\"8\n\005St" + + "ate\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001" + + "\022\n\n\006ACTIVE\020\002:\227\001\352A\223\001\n-migrationcenter.goo" + + "gleapis.com/ImportDataFile\022bprojects/{pr" + + "oject}/locations/{location}/importJobs/{" + + "import_job}/importDataFiles/{import_data" + + "_file}B\013\n\tfile_info\"\212\003\n\005Group\022\022\n\004name\030\001 " + + "\001(\tB\004\342A\001\003\0225\n\013create_time\030\002 \001(\0132\032.google." + + "protobuf.TimestampB\004\342A\001\003\0225\n\013update_time\030" + + "\003 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022" + + "B\n\006labels\030\004 \003(\01322.google.cloud.migration" + + "center.v1.Group.LabelsEntry\022\024\n\014display_n" + + "ame\030\005 \001(\t\022\023\n\013description\030\006 \001(\t\032-\n\013Labels" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:a\352" + + "A^\n$migrationcenter.googleapis.com/Group" + + "\0226projects/{project}/locations/{location" + + "}/groups/{group}\"\372\002\n\nErrorFrame\022\022\n\004name\030" + + "\001 \001(\tB\004\342A\001\003\022N\n\nviolations\030\002 \003(\01324.google" + + ".cloud.migrationcenter.v1.FrameViolation" + + "EntryB\004\342A\001\003\022I\n\016original_frame\030\003 \001(\0132+.go" + + "ogle.cloud.migrationcenter.v1.AssetFrame" + + "B\004\342A\001\003\0228\n\016ingestion_time\030\004 \001(\0132\032.google." + + "protobuf.TimestampB\004\342A\001\003:\202\001\352A\177\n)migratio" + + "ncenter.googleapis.com/ErrorFrame\022Rproje" + + "cts/{project}/locations/{location}/sourc" + + "es/{source}/errorFrames/{error_frame}\"\346\005" + + "\n\006Source\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\0225\n\013create_t" + + "ime\030\002 \001(\0132\032.google.protobuf.TimestampB\004\342" + + "A\001\003\0225\n\013update_time\030\003 \001(\0132\032.google.protob" + + "uf.TimestampB\004\342A\001\003\022\024\n\014display_name\030\004 \001(\t" + + "\022\023\n\013description\030\005 \001(\t\022@\n\004type\030\006 \001(\01622.go" + + "ogle.cloud.migrationcenter.v1.Source.Sou" + + "rceType\022\020\n\010priority\030\007 \001(\005\022\017\n\007managed\030\010 \001" + + "(\010\022!\n\023pending_frame_count\030\t \001(\005B\004\342A\001\003\022\037\n" + + "\021error_frame_count\030\n \001(\005B\004\342A\001\003\022B\n\005state\030" + + "\013 \001(\0162-.google.cloud.migrationcenter.v1." + + "Source.StateB\004\342A\001\003\"\224\001\n\nSourceType\022\027\n\023SOU" + + "RCE_TYPE_UNKNOWN\020\000\022\026\n\022SOURCE_TYPE_UPLOAD" + + "\020\001\022\035\n\031SOURCE_TYPE_GUEST_OS_SCAN\020\002\022\036\n\032SOU" + + "RCE_TYPE_INVENTORY_SCAN\020\003\022\026\n\022SOURCE_TYPE" + + "_CUSTOM\020\004\"E\n\005State\022\025\n\021STATE_UNSPECIFIED\020" + + "\000\022\n\n\006ACTIVE\020\001\022\014\n\010DELETING\020\002\022\013\n\007INVALID\020\003" + + ":d\352Aa\n%migrationcenter.googleapis.com/So" + + "urce\0228projects/{project}/locations/{loca" + + "tion}/sources/{source}\"\335\004\n\014ReportConfig\022" + + "\022\n\004name\030\001 \001(\tB\004\342A\001\003\0225\n\013create_time\030\002 \001(\013" + + "2\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013up" + + "date_time\030\003 \001(\0132\032.google.protobuf.Timest" + + "ampB\004\342A\001\003\022\024\n\014display_name\030\004 \001(\t\022\023\n\013descr" + + "iption\030\005 \001(\t\022y\n\037group_preferenceset_assi" + + "gnments\030\006 \003(\0132J.google.cloud.migrationce" + + "nter.v1.ReportConfig.GroupPreferenceSetA" + + "ssignmentB\004\342A\001\002\032\253\001\n\034GroupPreferenceSetAs" + + "signment\022<\n\005group\030\001 \001(\tB-\342A\001\002\372A&\n$migrat" + + "ioncenter.googleapis.com/Group\022M\n\016prefer" + + "ence_set\030\002 \001(\tB5\342A\001\002\372A.\n,migrationcenter" + + ".googleapis.com/PreferenceSet:w\352At\n+migr" + + "ationcenter.googleapis.com/ReportConfig\022" + + "Eprojects/{project}/locations/{location}" + + "/reportConfigs/{report_config}\"\376\004\n\006Repor" + + "t\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\0225\n\013create_time\030\002 \001" + + "(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013" + + "update_time\030\003 \001(\0132\032.google.protobuf.Time" + + "stampB\004\342A\001\003\022\024\n\014display_name\030\004 \001(\t\022\023\n\013des" + + "cription\030\005 \001(\t\022:\n\004type\030\006 \001(\0162,.google.cl" + + "oud.migrationcenter.v1.Report.Type\022<\n\005st" + + "ate\030\007 \001(\0162-.google.cloud.migrationcenter" + + ".v1.Report.State\022E\n\007summary\030\010 \001(\0132..goog" + + "le.cloud.migrationcenter.v1.ReportSummar" + + "yB\004\342A\001\003\"9\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\033\n" + + "\027TOTAL_COST_OF_OWNERSHIP\020\001\"F\n\005State\022\025\n\021S" + + "TATE_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\r\n\tSUCCE" + + "EDED\020\002\022\n\n\006FAILED\020\003:\202\001\352A\177\n%migrationcente" + + "r.googleapis.com/Report\022Vprojects/{proje" + + "ct}/locations/{location}/reportConfigs/{" + + "report_config}/reports/{report}\"\207\002\n\021Oper" + + "ationMetadata\0225\n\013create_time\030\001 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\004\342A\001\003\0222\n\010end_time" + + "\030\002 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003" + + "\022\024\n\006target\030\003 \001(\tB\004\342A\001\003\022\022\n\004verb\030\004 \001(\tB\004\342A" + + "\001\003\022\034\n\016status_message\030\005 \001(\tB\004\342A\001\003\022$\n\026requ" + + "ested_cancellation\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_ve" + + "rsion\030\007 \001(\tB\004\342A\001\003\"\325\001\n\021ListAssetsRequest\022" + + "=\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\022$migrationcente" + + "r.googleapis.com/Asset\022\021\n\tpage_size\030\002 \001(" + + "\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n" + + "\010order_by\030\005 \001(\t\0228\n\004view\030\006 \001(\0162*.google.c" + + "loud.migrationcenter.v1.AssetView\"z\n\022Lis" + + "tAssetsResponse\0226\n\006assets\030\001 \003(\0132&.google" + + ".cloud.migrationcenter.v1.Asset\022\027\n\017next_" + + "page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"\210\001" + + "\n\017GetAssetRequest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&" + + "\n$migrationcenter.googleapis.com/Asset\0228" + + "\n\004view\030\002 \001(\0162*.google.cloud.migrationcen" + + "ter.v1.AssetView\"\242\001\n\022UpdateAssetRequest\022" + + "5\n\013update_mask\030\001 \001(\0132\032.google.protobuf.F" + + "ieldMaskB\004\342A\001\002\022;\n\005asset\030\002 \001(\0132&.google.c" + + "loud.migrationcenter.v1.AssetB\004\342A\001\002\022\030\n\nr" + + "equest_id\030\003 \001(\tB\004\342A\001\001\"\246\001\n\030BatchUpdateAss" + + "etsRequest\022=\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\022$mig" + + "rationcenter.googleapis.com/Asset\022K\n\010req" + + "uests\030\002 \003(\01323.google.cloud.migrationcent" + + "er.v1.UpdateAssetRequestB\004\342A\001\002\"S\n\031BatchU" + + "pdateAssetsResponse\0226\n\006assets\030\001 \003(\0132&.go" + + "ogle.cloud.migrationcenter.v1.Asset\"k\n\022D" + + "eleteAssetRequest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&" + + "\n$migrationcenter.googleapis.com/Asset\022\030" + + "\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\"\264\001\n\030BatchDelete" + + "AssetsRequest\022=\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\022$" + + "migrationcenter.googleapis.com/Asset\022<\n\005" + + "names\030\002 \003(\tB-\342A\001\002\372A&\n$migrationcenter.go" + + "ogleapis.com/Asset\022\033\n\rallow_missing\030\003 \001(" + + "\010B\004\342A\001\001\"\251\001\n\030ReportAssetFramesRequest\022\024\n\006" + + "parent\030\001 \001(\tB\004\342A\001\002\0227\n\006frames\030\002 \001(\0132\'.goo" + + "gle.cloud.migrationcenter.v1.Frames\022>\n\006s" + + "ource\030\003 \001(\tB.\342A\001\002\372A\'\n%migrationcenter.go" + + "ogleapis.com/Source\"\033\n\031ReportAssetFrames" + + "Response\"\210\001\n\034AggregateAssetsValuesReques" + + "t\022\024\n\006parent\030\001 \001(\tB\004\342A\001\002\022B\n\014aggregations\030" + + "\002 \003(\0132,.google.cloud.migrationcenter.v1." + + "Aggregation\022\016\n\006filter\030\003 \001(\t\"d\n\035Aggregate" + + "AssetsValuesResponse\022C\n\007results\030\001 \003(\01322." + + "google.cloud.migrationcenter.v1.Aggregat" + + "ionResult\"\330\001\n\026CreateImportJobRequest\022A\n\006" + + "parent\030\001 \001(\tB1\342A\001\002\372A*\022(migrationcenter.g" + + "oogleapis.com/ImportJob\022\033\n\rimport_job_id" + + "\030\002 \001(\tB\004\342A\001\002\022D\n\nimport_job\030\003 \001(\0132*.googl" + + "e.cloud.migrationcenter.v1.ImportJobB\004\342A" + + "\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"\347\001\n\025ListImp" + + "ortJobsRequest\022A\n\006parent\030\001 \001(\tB1\342A\001\002\372A*\022" + + "(migrationcenter.googleapis.com/ImportJo" + + "b\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" + + "\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\022B\n\004vi" + + "ew\030\006 \001(\0162..google.cloud.migrationcenter." + + "v1.ImportJobViewB\004\342A\001\001\"\207\001\n\026ListImportJob" + + "sResponse\022?\n\013import_jobs\030\001 \003(\0132*.google." + + "cloud.migrationcenter.v1.ImportJob\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t" + + "\"\232\001\n\023GetImportJobRequest\022?\n\004name\030\001 \001(\tB1" + + "\342A\001\002\372A*\n(migrationcenter.googleapis.com/" + + "ImportJob\022B\n\004view\030\002 \001(\0162..google.cloud.m" + + "igrationcenter.v1.ImportJobViewB\004\342A\001\001\"\210\001" + + "\n\026DeleteImportJobRequest\022?\n\004name\030\001 \001(\tB1" + + "\342A\001\002\372A*\n(migrationcenter.googleapis.com/" + + "ImportJob\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\022\023\n\005f" + + "orce\030\003 \001(\010B\004\342A\001\001\"\257\001\n\026UpdateImportJobRequ" + + "est\0225\n\013update_mask\030\001 \001(\0132\032.google.protob" + + "uf.FieldMaskB\004\342A\001\002\022D\n\nimport_job\030\002 \001(\0132*" + + ".google.cloud.migrationcenter.v1.ImportJ" + + "obB\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"u\n\030Va" + + "lidateImportJobRequest\022?\n\004name\030\001 \001(\tB1\342A" + + "\001\002\372A*\n(migrationcenter.googleapis.com/Im" + + "portJob\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\"p\n\023Run" + + "ImportJobRequest\022?\n\004name\030\001 \001(\tB1\342A\001\002\372A*\n" + + "(migrationcenter.googleapis.com/ImportJo" + + "b\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\"`\n\030GetImport" + + "DataFileRequest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-" + + "migrationcenter.googleapis.com/ImportDat" + + "aFile\"\255\001\n\032ListImportDataFilesRequest\022F\n\006" + + "parent\030\001 \001(\tB6\342A\001\002\372A/\022-migrationcenter.g" + + "oogleapis.com/ImportDataFile\022\021\n\tpage_siz" + + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 " + + "\001(\t\022\020\n\010order_by\030\005 \001(\t\"\227\001\n\033ListImportData" + + "FilesResponse\022J\n\021import_data_files\030\001 \003(\013" + + "2/.google.cloud.migrationcenter.v1.Impor" + + "tDataFile\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013un" + + "reachable\030\003 \003(\t\"\363\001\n\033CreateImportDataFile" + + "Request\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/\022-migrat" + + "ioncenter.googleapis.com/ImportDataFile\022" + + "!\n\023import_data_file_id\030\002 \001(\tB\004\342A\001\002\022O\n\020im" + + "port_data_file\030\003 \001(\0132/.google.cloud.migr" + + "ationcenter.v1.ImportDataFileB\004\342A\001\002\022\030\n\nr" + + "equest_id\030\004 \001(\tB\004\342A\001\001\"}\n\033DeleteImportDat" + + "aFileRequest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-mig" + + "rationcenter.googleapis.com/ImportDataFi" + + "le\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\"\233\001\n\021ListGro" + + "upsRequest\022=\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\022$mig" + + "rationcenter.googleapis.com/Group\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filt" + + "er\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"z\n\022ListGroups" + + "Response\0226\n\006groups\030\001 \003(\0132&.google.cloud." + + "migrationcenter.v1.Group\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"N\n\017GetGro" + + "upRequest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&\n$migrat" + + "ioncenter.googleapis.com/Group\"\302\001\n\022Creat" + + "eGroupRequest\022=\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\022$" + + "migrationcenter.googleapis.com/Group\022\026\n\010" + + "group_id\030\002 \001(\tB\004\342A\001\002\022;\n\005group\030\003 \001(\0132&.go" + + "ogle.cloud.migrationcenter.v1.GroupB\004\342A\001" + + "\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"\242\001\n\022UpdateGr" + + "oupRequest\0225\n\013update_mask\030\001 \001(\0132\032.google" + + ".protobuf.FieldMaskB\004\342A\001\002\022;\n\005group\030\002 \001(\013" + + "2&.google.cloud.migrationcenter.v1.Group" + + "B\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"k\n\022Dele" + + "teGroupRequest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&\n$m" + + "igrationcenter.googleapis.com/Group\022\030\n\nr" + + "equest_id\030\002 \001(\tB\004\342A\001\001\"\321\001\n\027AddAssetsToGro" + + "upRequest\022<\n\005group\030\001 \001(\tB-\342A\001\002\372A&\n$migra" + + "tioncenter.googleapis.com/Group\022\030\n\nreque" + + "st_id\030\002 \001(\tB\004\342A\001\001\022@\n\006assets\030\003 \001(\0132*.goog" + + "le.cloud.migrationcenter.v1.AssetListB\004\342" + + "A\001\002\022\034\n\016allow_existing\030\004 \001(\010B\004\342A\001\001\"\325\001\n\034Re" + + "moveAssetsFromGroupRequest\022<\n\005group\030\001 \001(" + + "\tB-\342A\001\002\372A&\n$migrationcenter.googleapis.c" + + "om/Group\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\022@\n\006as" + + "sets\030\003 \001(\0132*.google.cloud.migrationcente" + + "r.v1.AssetListB\004\342A\001\002\022\033\n\rallow_missing\030\004 " + + "\001(\010B\004\342A\001\001\"\310\001\n\026ListErrorFramesRequest\022B\n\006" + + "parent\030\001 \001(\tB2\342A\001\002\372A+\022)migrationcenter.g" + + "oogleapis.com/ErrorFrame\022\021\n\tpage_size\030\002 " + + "\001(\005\022\022\n\npage_token\030\003 \001(\t\022C\n\004view\030\004 \001(\0162/." + + "google.cloud.migrationcenter.v1.ErrorFra" + + "meViewB\004\342A\001\001\"\212\001\n\027ListErrorFramesResponse" + + "\022A\n\014error_frames\030\001 \003(\0132+.google.cloud.mi" + + "grationcenter.v1.ErrorFrame\022\027\n\017next_page" + + "_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"\235\001\n\024Ge" + + "tErrorFrameRequest\022@\n\004name\030\001 \001(\tB2\342A\001\002\372A" + + "+\n)migrationcenter.googleapis.com/ErrorF" + + "rame\022C\n\004view\030\002 \001(\0162/.google.cloud.migrat" + + "ioncenter.v1.ErrorFrameViewB\004\342A\001\001\"\235\001\n\022Li" + + "stSourcesRequest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A" + + "\'\022%migrationcenter.googleapis.com/Source" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022" + + "\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"}\n\023Lis" + + "tSourcesResponse\0228\n\007sources\030\001 \003(\0132\'.goog" + + "le.cloud.migrationcenter.v1.Source\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t" + + "\"P\n\020GetSourceRequest\022<\n\004name\030\001 \001(\tB.\342A\001\002" + + "\372A\'\n%migrationcenter.googleapis.com/Sour" + + "ce\"\307\001\n\023CreateSourceRequest\022>\n\006parent\030\001 \001" + + "(\tB.\342A\001\002\372A\'\022%migrationcenter.googleapis." + + "com/Source\022\027\n\tsource_id\030\002 \001(\tB\004\342A\001\002\022=\n\006s" + + "ource\030\003 \001(\0132\'.google.cloud.migrationcent" + + "er.v1.SourceB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004" + + "\342A\001\001\"\245\001\n\023UpdateSourceRequest\0225\n\013update_m" + + "ask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\004\342" + + "A\001\002\022=\n\006source\030\002 \001(\0132\'.google.cloud.migra" + + "tioncenter.v1.SourceB\004\342A\001\002\022\030\n\nrequest_id" + + "\030\003 \001(\tB\004\342A\001\001\"m\n\023DeleteSourceRequest\022<\n\004n" + + "ame\030\001 \001(\tB.\342A\001\002\372A\'\n%migrationcenter.goog" + + "leapis.com/Source\022\030\n\nrequest_id\030\002 \001(\tB\004\342" + + "A\001\001\"\233\001\n\031ListPreferenceSetsRequest\022E\n\006par" + + "ent\030\001 \001(\tB5\342A\001\002\372A.\022,migrationcenter.goog" + + "leapis.com/PreferenceSet\022\021\n\tpage_size\030\002 " + + "\001(\005\022\022\n\npage_token\030\003 \001(\t\022\020\n\010order_by\030\005 \001(" + + "\t\"\223\001\n\032ListPreferenceSetsResponse\022G\n\017pref" + + "erence_sets\030\001 \003(\0132..google.cloud.migrati" + + "oncenter.v1.PreferenceSet\022\027\n\017next_page_t" + + "oken\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"^\n\027GetPr" + + "eferenceSetRequest\022C\n\004name\030\001 \001(\tB5\342A\001\002\372A" + + ".\n,migrationcenter.googleapis.com/Prefer" + + "enceSet\"\354\001\n\032CreatePreferenceSetRequest\022E" + + "\n\006parent\030\001 \001(\tB5\342A\001\002\372A.\022,migrationcenter" + + ".googleapis.com/PreferenceSet\022\037\n\021prefere" + + "nce_set_id\030\002 \001(\tB\004\342A\001\002\022L\n\016preference_set" + + "\030\003 \001(\0132..google.cloud.migrationcenter.v1" + + ".PreferenceSetB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\t" + + "B\004\342A\001\001\"\273\001\n\032UpdatePreferenceSetRequest\0225\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.Fie" + + "ldMaskB\004\342A\001\002\022L\n\016preference_set\030\002 \001(\0132..g" + + "oogle.cloud.migrationcenter.v1.Preferenc" + + "eSetB\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"{\n\032" + + "DeletePreferenceSetRequest\022C\n\004name\030\001 \001(\t" + + "B5\342A\001\002\372A.\n,migrationcenter.googleapis.co" + + "m/PreferenceSet\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001" + + "\001\"T\n\022GetSettingsRequest\022>\n\004name\030\001 \001(\tB0\342" + + "A\001\002\372A)\n\'migrationcenter.googleapis.com/S" + + "ettings\"\253\001\n\025UpdateSettingsRequest\0225\n\013upd" + + "ate_mask\030\001 \001(\0132\032.google.protobuf.FieldMa" + + "skB\004\342A\001\002\022A\n\010settings\030\002 \001(\0132).google.clou" + + "d.migrationcenter.v1.SettingsB\004\342A\001\002\022\030\n\nr" + + "equest_id\030\003 \001(\tB\004\342A\001\001\"\347\001\n\031CreateReportCo" + + "nfigRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\022+mi" + + "grationcenter.googleapis.com/ReportConfi" + + "g\022\036\n\020report_config_id\030\002 \001(\tB\004\342A\001\002\022J\n\rrep" + + "ort_config\030\003 \001(\0132-.google.cloud.migratio" + + "ncenter.v1.ReportConfigB\004\342A\001\002\022\030\n\nrequest" + + "_id\030\004 \001(\tB\004\342A\001\001\"\216\001\n\031DeleteReportConfigRe" + + "quest\022B\n\004name\030\001 \001(\tB4\342A\001\002\372A-\n+migrationc" + + "enter.googleapis.com/ReportConfig\022\030\n\nreq" + + "uest_id\030\002 \001(\tB\004\342A\001\001\022\023\n\005force\030\003 \001(\010B\004\342A\001\001" + + "\"\213\001\n\020GetReportRequest\022<\n\004name\030\001 \001(\tB.\342A\001" + + "\002\372A\'\n%migrationcenter.googleapis.com/Rep" + + "ort\0229\n\004view\030\006 \001(\0162+.google.cloud.migrati" + + "oncenter.v1.ReportView\"\330\001\n\022ListReportsRe" + + "quest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\022%migratio" + + "ncenter.googleapis.com/Report\022\021\n\tpage_si" + + "ze\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004" + + " \001(\t\022\020\n\010order_by\030\005 \001(\t\0229\n\004view\030\006 \001(\0162+.g" + + "oogle.cloud.migrationcenter.v1.ReportVie" + + "w\"}\n\023ListReportsResponse\0228\n\007reports\030\001 \003(" + + "\0132\'.google.cloud.migrationcenter.v1.Repo" + + "rt\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachab" + + "le\030\003 \003(\t\"m\n\023DeleteReportRequest\022<\n\004name\030" + + "\001 \001(\tB.\342A\001\002\372A\'\n%migrationcenter.googleap" + + "is.com/Report\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\"" + + "\\\n\026GetReportConfigRequest\022B\n\004name\030\001 \001(\tB" + + "4\342A\001\002\372A-\n+migrationcenter.googleapis.com" + + "/ReportConfig\"\251\001\n\030ListReportConfigsReque" + + "st\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\022+migrationce" + + "nter.googleapis.com/ReportConfig\022\021\n\tpage" + + "_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filte" + + "r\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\220\001\n\031ListReport" + + "ConfigsResponse\022E\n\016report_configs\030\001 \003(\0132" + + "-.google.cloud.migrationcenter.v1.Report" + + "Config\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unrea" + + "chable\030\003 \003(\t\"\307\001\n\023CreateReportRequest\022>\n\006" + + "parent\030\001 \001(\tB.\342A\001\002\372A\'\022%migrationcenter.g" + + "oogleapis.com/Report\022\027\n\treport_id\030\002 \001(\tB" + + "\004\342A\001\002\022=\n\006report\030\003 \001(\0132\'.google.cloud.mig" + + "rationcenter.v1.ReportB\004\342A\001\002\022\030\n\nrequest_" + + "id\030\004 \001(\tB\004\342A\001\001\"J\n\006Frames\022@\n\013frames_data\030" + + "\001 \003(\0132+.google.cloud.migrationcenter.v1." + + "AssetFrame\"\376\003\n\nAssetFrame\022J\n\017machine_det" + + "ails\030\001 \001(\0132/.google.cloud.migrationcente" + + "r.v1.MachineDetailsH\000\022/\n\013report_time\030\n \001" + + "(\0132\032.google.protobuf.Timestamp\022G\n\006labels" + + "\030\013 \003(\01327.google.cloud.migrationcenter.v1" + + ".AssetFrame.LabelsEntry\022O\n\nattributes\030\014 " + + "\003(\0132;.google.cloud.migrationcenter.v1.As" + + "setFrame.AttributesEntry\022O\n\023performance_" + + "samples\030\r \003(\01322.google.cloud.migrationce" + + "nter.v1.PerformanceSample\022\031\n\013trace_token" + + "\030\016 \001(\tB\004\342A\001\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t", + "\022\r\n\005value\030\002 \001(\t:\0028\001\0321\n\017AttributesEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\013\n\tFrameD" + + "ata\"\302\005\n\016MachineDetails\022\014\n\004uuid\030\001 \001(\t\022\024\n\014" + + "machine_name\030\002 \001(\t\022/\n\013create_time\030\003 \001(\0132" + + "\032.google.protobuf.Timestamp\022\022\n\ncore_coun" + + "t\030\004 \001(\005\022\021\n\tmemory_mb\030\005 \001(\005\022O\n\013power_stat" + + "e\030\006 \001(\0162:.google.cloud.migrationcenter.v" + + "1.MachineDetails.PowerState\022Q\n\014architect" + + "ure\030\007 \001(\0132;.google.cloud.migrationcenter" + + ".v1.MachineArchitectureDetails\022A\n\010guest_" + + "os\030\010 \001(\0132/.google.cloud.migrationcenter." + + "v1.GuestOsDetails\022G\n\007network\030\t \001(\01326.goo" + + "gle.cloud.migrationcenter.v1.MachineNetw" + + "orkDetails\022B\n\005disks\030\n \001(\01323.google.cloud" + + ".migrationcenter.v1.MachineDiskDetails\022B" + + "\n\010platform\030\013 \001(\01320.google.cloud.migratio" + + "ncenter.v1.PlatformDetails\"|\n\nPowerState" + + "\022\033\n\027POWER_STATE_UNSPECIFIED\020\000\022\013\n\007PENDING" + + "\020\001\022\n\n\006ACTIVE\020\002\022\016\n\nSUSPENDING\020\003\022\r\n\tSUSPEN" + + "DED\020\004\022\014\n\010DELETING\020\005\022\013\n\007DELETED\020\006\"\247\004\n\032Mac" + + "hineArchitectureDetails\022\030\n\020cpu_architect" + + "ure\030\001 \001(\t\022\020\n\010cpu_name\030\002 \001(\t\022\016\n\006vendor\030\003 " + + "\001(\t\022\030\n\020cpu_thread_count\030\004 \001(\005\022\030\n\020cpu_soc" + + "ket_count\030\005 \001(\005\022:\n\004bios\030\006 \001(\0132,.google.c" + + "loud.migrationcenter.v1.BiosDetails\022_\n\rf" + + "irmware_type\030\007 \001(\0162H.google.cloud.migrat" + + "ioncenter.v1.MachineArchitectureDetails." + + "FirmwareType\022e\n\016hyperthreading\030\010 \001(\0162M.g" + + "oogle.cloud.migrationcenter.v1.MachineAr" + + "chitectureDetails.CpuHyperThreading\"@\n\014F" + + "irmwareType\022\035\n\031FIRMWARE_TYPE_UNSPECIFIED" + + "\020\000\022\010\n\004BIOS\020\001\022\007\n\003EFI\020\002\"S\n\021CpuHyperThreadi" + + "ng\022#\n\037CPU_HYPER_THREADING_UNSPECIFIED\020\000\022" + + "\014\n\010DISABLED\020\001\022\013\n\007ENABLED\020\002\"\221\001\n\013BiosDetai" + + "ls\022\021\n\tbios_name\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\024\n\014man" + + "ufacturer\030\003 \001(\t\022\017\n\007version\030\004 \001(\t\022\'\n\014rele" + + "ase_date\030\005 \001(\0132\021.google.type.Date\022\023\n\013smb" + + "ios_uuid\030\006 \001(\t\"\262\001\n\025MachineNetworkDetails" + + "\022\032\n\022primary_ip_address\030\001 \001(\t\022\031\n\021public_i" + + "p_address\030\002 \001(\t\022\033\n\023primary_mac_address\030\003" + + " \001(\t\022E\n\010adapters\030\004 \001(\01323.google.cloud.mi" + + "grationcenter.v1.NetworkAdapterList\"]\n\022N" + + "etworkAdapterList\022G\n\007entries\030\001 \003(\01326.goo" + + "gle.cloud.migrationcenter.v1.NetworkAdap" + + "terDetails\"\212\001\n\025NetworkAdapterDetails\022\024\n\014" + + "adapter_type\030\001 \001(\t\022\023\n\013mac_address\030\002 \001(\t\022" + + "F\n\taddresses\030\003 \001(\01323.google.cloud.migrat" + + "ioncenter.v1.NetworkAddressList\"V\n\022Netwo" + + "rkAddressList\022@\n\007entries\030\001 \003(\0132/.google." + + "cloud.migrationcenter.v1.NetworkAddress\"" + + "\242\002\n\016NetworkAddress\022\022\n\nip_address\030\001 \001(\t\022\023" + + "\n\013subnet_mask\030\002 \001(\t\022\r\n\005bcast\030\003 \001(\t\022\014\n\004fq" + + "dn\030\004 \001(\t\022U\n\nassignment\030\005 \001(\0162A.google.cl" + + "oud.migrationcenter.v1.NetworkAddress.Ad" + + "dressAssignment\"s\n\021AddressAssignment\022\"\n\036" + + "ADDRESS_ASSIGNMENT_UNSPECIFIED\020\000\022\035\n\031ADDR" + + "ESS_ASSIGNMENT_STATIC\020\001\022\033\n\027ADDRESS_ASSIG" + + "NMENT_DHCP\020\002\"\213\001\n\022MachineDiskDetails\022\034\n\024t" + + "otal_capacity_bytes\030\001 \001(\003\022\030\n\020total_free_" + + "bytes\030\002 \001(\003\022=\n\005disks\030\003 \001(\0132..google.clou" + + "d.migrationcenter.v1.DiskEntryList\"L\n\rDi" + + "skEntryList\022;\n\007entries\030\001 \003(\0132*.google.cl" + + "oud.migrationcenter.v1.DiskEntry\"\340\003\n\tDis" + + "kEntry\022\026\n\016capacity_bytes\030\001 \001(\003\022\022\n\nfree_b" + + "ytes\030\002 \001(\003\022\022\n\ndisk_label\030\003 \001(\t\022\027\n\017disk_l" + + "abel_type\030\004 \001(\t\022P\n\016interface_type\030\005 \001(\0162" + + "8.google.cloud.migrationcenter.v1.DiskEn" + + "try.InterfaceType\022F\n\npartitions\030\006 \001(\01322." + + "google.cloud.migrationcenter.v1.DiskPart" + + "itionList\022\022\n\nhw_address\030\007 \001(\t\022C\n\006vmware\030" + + "\024 \001(\01321.google.cloud.migrationcenter.v1." + + "VmwareDiskConfigH\000\"r\n\rInterfaceType\022\036\n\032I" + + "NTERFACE_TYPE_UNSPECIFIED\020\000\022\007\n\003IDE\020\001\022\010\n\004" + + "SATA\020\002\022\007\n\003SAS\020\003\022\010\n\004SCSI\020\004\022\010\n\004NVME\020\005\022\006\n\002F" + + "C\020\006\022\t\n\005ISCSI\020\007B\023\n\021platform_specific\"T\n\021D" + + "iskPartitionList\022?\n\007entries\030\001 \003(\0132..goog" + + "le.cloud.migrationcenter.v1.DiskPartitio" + + "n\"\315\001\n\rDiskPartition\022\014\n\004type\030\001 \001(\t\022\023\n\013fil" + + "e_system\030\002 \001(\t\022\023\n\013mount_point\030\003 \001(\t\022\026\n\016c" + + "apacity_bytes\030\004 \001(\003\022\022\n\nfree_bytes\030\005 \001(\003\022" + + "\014\n\004uuid\030\006 \001(\t\022J\n\016sub_partitions\030\007 \001(\01322." + + "google.cloud.migrationcenter.v1.DiskPart" + + "itionList\"\206\006\n\020VmwareDiskConfig\022S\n\014backin" + + "g_type\030\001 \001(\0162=.google.cloud.migrationcen" + + "ter.v1.VmwareDiskConfig.BackingType\022\016\n\006s" + + "hared\030\002 \001(\010\022M\n\tvmdk_mode\030\003 \001(\0162:.google." + + "cloud.migrationcenter.v1.VmwareDiskConfi" + + "g.VmdkMode\022]\n\021rdm_compatibility\030\004 \001(\0162B." + + "google.cloud.migrationcenter.v1.VmwareDi" + + "skConfig.RdmCompatibility\"\377\001\n\013BackingTyp" + + "e\022\034\n\030BACKING_TYPE_UNSPECIFIED\020\000\022\030\n\024BACKI" + + "NG_TYPE_FLAT_V1\020\001\022\030\n\024BACKING_TYPE_FLAT_V" + + "2\020\002\022\025\n\021BACKING_TYPE_PMEM\020\003\022\027\n\023BACKING_TY" + + "PE_RDM_V1\020\004\022\027\n\023BACKING_TYPE_RDM_V2\020\005\022\031\n\025" + + "BACKING_TYPE_SESPARSE\020\006\022\034\n\030BACKING_TYPE_" + + "SESPARSE_V1\020\007\022\034\n\030BACKING_TYPE_SESPARSE_V" + + "2\020\010\"o\n\010VmdkMode\022\031\n\025VMDK_MODE_UNSPECIFIED" + + "\020\000\022\r\n\tDEPENDENT\020\001\022\032\n\026INDEPENDENT_PERSIST" + + "ENT\020\002\022\035\n\031INDEPENDENT_NONPERSISTENT\020\003\"l\n\020" + + "RdmCompatibility\022!\n\035RDM_COMPATIBILITY_UN" + + "SPECIFIED\020\000\022\032\n\026PHYSICAL_COMPATIBILITY\020\001\022" + + "\031\n\025VIRTUAL_COMPATIBILITY\020\002\"\206\002\n\016GuestOsDe" + + "tails\022\017\n\007os_name\030\001 \001(\t\022F\n\006family\030\002 \001(\01626" + + ".google.cloud.migrationcenter.v1.Operati" + + "ngSystemFamily\022\017\n\007version\030\003 \001(\t\022C\n\006confi" + + "g\030\004 \001(\01323.google.cloud.migrationcenter.v" + + "1.GuestConfigDetails\022E\n\007runtime\030\005 \001(\01324." + + "google.cloud.migrationcenter.v1.GuestRun" + + "timeDetails\"\305\003\n\022GuestConfigDetails\022\r\n\005is" + + "sue\030\001 \001(\t\022>\n\005fstab\030\002 \001(\0132/.google.cloud." + + "migrationcenter.v1.FstabEntryList\022>\n\005hos" + + "ts\030\003 \001(\0132/.google.cloud.migrationcenter." + + "v1.HostsEntryList\022C\n\013nfs_exports\030\004 \001(\0132." + + ".google.cloud.migrationcenter.v1.NfsExpo" + + "rtList\022U\n\014selinux_mode\030\005 \001(\0162?.google.cl" + + "oud.migrationcenter.v1.GuestConfigDetail" + + "s.SeLinuxMode\"\203\001\n\013SeLinuxMode\022\035\n\031SE_LINU" + + "X_MODE_UNSPECIFIED\020\000\022\032\n\026SE_LINUX_MODE_DI" + + "SABLED\020\001\022\034\n\030SE_LINUX_MODE_PERMISSIVE\020\002\022\033" + + "\n\027SE_LINUX_MODE_ENFORCING\020\003\"N\n\016FstabEntr" + + "yList\022<\n\007entries\030\001 \003(\0132+.google.cloud.mi" + + "grationcenter.v1.FstabEntry\"g\n\nFstabEntr" + + "y\022\014\n\004spec\030\001 \001(\t\022\014\n\004file\030\002 \001(\t\022\017\n\007vfstype" + + "\030\003 \001(\t\022\016\n\006mntops\030\004 \001(\t\022\014\n\004freq\030\005 \001(\005\022\016\n\006" + + "passno\030\006 \001(\005\"N\n\016HostsEntryList\022<\n\007entrie" + + "s\030\001 \003(\0132+.google.cloud.migrationcenter.v" + + "1.HostsEntry\",\n\nHostsEntry\022\n\n\002ip\030\001 \001(\t\022\022" + + "\n\nhost_names\030\002 \003(\t\"L\n\rNfsExportList\022;\n\007e" + + "ntries\030\001 \003(\0132*.google.cloud.migrationcen" + + "ter.v1.NfsExport\"4\n\tNfsExport\022\030\n\020export_" + + "directory\030\001 \001(\t\022\r\n\005hosts\030\002 \003(\t\"\343\003\n\023Guest" + + "RuntimeDetails\022E\n\010services\030\001 \001(\01323.googl" + + "e.cloud.migrationcenter.v1.RunningServic" + + "eList\022F\n\tprocesses\030\002 \001(\01323.google.cloud." + + "migrationcenter.v1.RunningProcessList\022D\n" + + "\007network\030\003 \001(\01323.google.cloud.migrationc" + + "enter.v1.RuntimeNetworkInfo\0222\n\016last_boot" + + "_time\030\004 \001(\0132\032.google.protobuf.Timestamp\022" + + "\016\n\006domain\030\005 \001(\t\022\024\n\014machine_name\030\006 \001(\t\022V\n" + + "\016installed_apps\030\007 \001(\0132>.google.cloud.mig" + + "rationcenter.v1.GuestInstalledApplicatio" + + "nList\022E\n\016open_file_list\030\010 \001(\0132-.google.c" + + "loud.migrationcenter.v1.OpenFileList\"V\n\022" + + "RunningServiceList\022@\n\007entries\030\001 \003(\0132/.go" + + "ogle.cloud.migrationcenter.v1.RunningSer" + + "vice\"\223\003\n\016RunningService\022\024\n\014service_name\030" + + "\001 \001(\t\022D\n\005state\030\002 \001(\01625.google.cloud.migr" + + "ationcenter.v1.RunningService.State\022M\n\ns" + + "tart_mode\030\003 \001(\01629.google.cloud.migration" + + "center.v1.RunningService.StartMode\022\020\n\010ex" + + "e_path\030\004 \001(\t\022\017\n\007cmdline\030\005 \001(\t\022\013\n\003pid\030\006 \001" + + "(\003\"C\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006AC" + + "TIVE\020\001\022\n\n\006PAUSED\020\002\022\013\n\007STOPPED\020\003\"a\n\tStart" + + "Mode\022\032\n\026START_MODE_UNSPECIFIED\020\000\022\010\n\004BOOT" + + "\020\001\022\n\n\006SYSTEM\020\002\022\010\n\004AUTO\020\003\022\n\n\006MANUAL\020\004\022\014\n\010" + + "DISABLED\020\005\"V\n\022RunningProcessList\022@\n\007entr" + + "ies\030\001 \003(\0132/.google.cloud.migrationcenter" + + ".v1.RunningProcess\"\326\001\n\016RunningProcess\022\013\n" + + "\003pid\030\001 \001(\003\022\020\n\010exe_path\030\002 \001(\t\022\017\n\007cmdline\030" + + "\003 \001(\t\022\014\n\004user\030\004 \001(\t\022S\n\nattributes\030d \003(\0132" + + "?.google.cloud.migrationcenter.v1.Runnin" + + "gProcess.AttributesEntry\0321\n\017AttributesEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\220\001\n\022" + + "RuntimeNetworkInfo\022-\n\tscan_time\030\001 \001(\0132\032." + + "google.protobuf.Timestamp\022K\n\013connections" + + "\030\002 \001(\01326.google.cloud.migrationcenter.v1" + + ".NetworkConnectionList\"\\\n\025NetworkConnect" + + "ionList\022C\n\007entries\030\001 \003(\01322.google.cloud." + + "migrationcenter.v1.NetworkConnection\"\313\002\n" + + "\021NetworkConnection\022\020\n\010protocol\030\001 \001(\t\022\030\n\020" + + "local_ip_address\030\002 \001(\t\022\022\n\nlocal_port\030\003 \001" + + "(\005\022\031\n\021remote_ip_address\030\004 \001(\t\022\023\n\013remote_" + + "port\030\005 \001(\005\022G\n\005state\030\006 \001(\01628.google.cloud" + + ".migrationcenter.v1.NetworkConnection.St" + + "ate\022\013\n\003pid\030\007 \001(\003\022\024\n\014process_name\030\010 \001(\t\"Z" + + "\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007OPENIN" + + "G\020\001\022\010\n\004OPEN\020\002\022\n\n\006LISTEN\020\003\022\013\n\007CLOSING\020\004\022\n" + + "\n\006CLOSED\020\005\"l\n\035GuestInstalledApplicationL" + + "ist\022K\n\007entries\030\001 \003(\0132:.google.cloud.migr" + + "ationcenter.v1.GuestInstalledApplication" + + "\"\226\001\n\031GuestInstalledApplication\022\030\n\020applic" + + "ation_name\030\001 \001(\t\022\016\n\006vendor\030\002 \001(\t\0220\n\014inst" + + "all_time\030\003 \001(\0132\032.google.protobuf.Timesta" + + "mp\022\014\n\004path\030\004 \001(\t\022\017\n\007version\030\005 \001(\t\"Q\n\014Ope" + + "nFileList\022A\n\007entries\030\001 \003(\01320.google.clou" + + "d.migrationcenter.v1.OpenFileDetails\"V\n\017" + + "OpenFileDetails\022\017\n\007command\030\001 \001(\t\022\014\n\004user" + + "\030\002 \001(\t\022\021\n\tfile_type\030\003 \001(\t\022\021\n\tfile_path\030\004" + + " \001(\t\"\307\003\n\017PlatformDetails\022P\n\016vmware_detai" + + "ls\030\001 \001(\01326.google.cloud.migrationcenter." + + "v1.VmwarePlatformDetailsH\000\022Q\n\017aws_ec2_de" + + "tails\030\002 \001(\01326.google.cloud.migrationcent" + + "er.v1.AwsEc2PlatformDetailsH\000\022S\n\020azure_v" + + "m_details\030\003 \001(\01327.google.cloud.migration" + + "center.v1.AzureVmPlatformDetailsH\000\022R\n\017ge" + + "neric_details\030\004 \001(\01327.google.cloud.migra" + + "tioncenter.v1.GenericPlatformDetailsH\000\022T" + + "\n\020physical_details\030\005 \001(\01328.google.cloud." + + "migrationcenter.v1.PhysicalPlatformDetai" + + "lsH\000B\020\n\016vendor_details\"\227\001\n\025VmwarePlatfor" + + "mDetails\022\027\n\017vcenter_version\030\001 \001(\t\022\023\n\013esx" + + "_version\030\002 \001(\t\022\014\n\004osid\030\003 \001(\t\022\026\n\016vcenter_" + + "folder\030\004 \001(\t\022\023\n\013vcenter_uri\030\005 \001(\t\022\025\n\rvce" + + "nter_vm_id\030\006 \001(\t\"E\n\025AwsEc2PlatformDetail" + + "s\022\032\n\022machine_type_label\030\001 \001(\t\022\020\n\010locatio" + + "n\030\002 \001(\t\"b\n\026AzureVmPlatformDetails\022\032\n\022mac" + + "hine_type_label\030\001 \001(\t\022\020\n\010location\030\002 \001(\t\022" + + "\032\n\022provisioning_state\030\003 \001(\t\"*\n\026GenericPl" + + "atformDetails\022\020\n\010location\030\001 \001(\t\"+\n\027Physi" + + "calPlatformDetails\022\020\n\010location\030\001 \001(\t\"0\n\021" + + "MemoryUsageSample\022\033\n\023utilized_percentage" + + "\030\001 \001(\002\"-\n\016CpuUsageSample\022\033\n\023utilized_per" + + "centage\030\001 \001(\002\"M\n\022NetworkUsageSample\022\033\n\023a" + + "verage_ingress_bps\030\001 \001(\002\022\032\n\022average_egre" + + "ss_bps\030\002 \001(\002\"\'\n\017DiskUsageSample\022\024\n\014avera" + + "ge_iops\030\001 \001(\002\"\314\002\n\021PerformanceSample\022/\n\013s" + + "ample_time\030\001 \001(\0132\032.google.protobuf.Times" + + "tamp\022B\n\006memory\030\002 \001(\01322.google.cloud.migr" + + "ationcenter.v1.MemoryUsageSample\022<\n\003cpu\030" + + "\003 \001(\0132/.google.cloud.migrationcenter.v1." + + "CpuUsageSample\022D\n\007network\030\004 \001(\01323.google" + + ".cloud.migrationcenter.v1.NetworkUsageSa" + + "mple\022>\n\004disk\030\005 \001(\01320.google.cloud.migrat" + + "ioncenter.v1.DiskUsageSample\"\201\001\n\024AssetPe" + + "rformanceData\022i\n!daily_resource_usage_ag" + + "gregations\030\001 \003(\0132>.google.cloud.migratio" + + "ncenter.v1.DailyResourceUsageAggregation" + + "\"\347\007\n\035DailyResourceUsageAggregation\022\037\n\004da" + + "te\030\001 \001(\0132\021.google.type.Date\022O\n\003cpu\030\002 \001(\013" + + "2B.google.cloud.migrationcenter.v1.Daily" + + "ResourceUsageAggregation.CPU\022U\n\006memory\030\003" + + " \001(\0132E.google.cloud.migrationcenter.v1.D" + + "ailyResourceUsageAggregation.Memory\022W\n\007n" + + "etwork\030\004 \001(\0132F.google.cloud.migrationcen" + + "ter.v1.DailyResourceUsageAggregation.Net" + + "work\022Q\n\004disk\030\005 \001(\0132C.google.cloud.migrat" + + "ioncenter.v1.DailyResourceUsageAggregati" + + "on.Disk\032W\n\005Stats\022\017\n\007average\030\001 \001(\002\022\016\n\006med" + + "ian\030\002 \001(\002\022\037\n\027nintey_fifth_percentile\030\003 \001" + + "(\002\022\014\n\004peak\030\004 \001(\002\032k\n\003CPU\022d\n\026utilization_p" + + "ercentage\030\001 \001(\0132D.google.cloud.migration" + + "center.v1.DailyResourceUsageAggregation." + + "Stats\032n\n\006Memory\022d\n\026utilization_percentag" + + "e\030\001 \001(\0132D.google.cloud.migrationcenter.v" + + "1.DailyResourceUsageAggregation.Stats\032\276\001" + + "\n\007Network\022Y\n\013ingress_bps\030\001 \001(\0132D.google." + + "cloud.migrationcenter.v1.DailyResourceUs" + + "ageAggregation.Stats\022X\n\negress_bps\030\002 \001(\013" + + "2D.google.cloud.migrationcenter.v1.Daily" + + "ResourceUsageAggregation.Stats\032Z\n\004Disk\022R" + + "\n\004iops\030\001 \001(\0132D.google.cloud.migrationcen" + + "ter.v1.DailyResourceUsageAggregation.Sta" + + "ts\"\206\001\n\013InsightList\022@\n\010insights\030\001 \003(\0132(.g" + + "oogle.cloud.migrationcenter.v1.InsightB\004" + + "\342A\001\003\0225\n\013update_time\030\002 \001(\0132\032.google.proto" + + "buf.TimestampB\004\342A\001\003\"j\n\007Insight\022T\n\021migrat" + + "ion_insight\030\001 \001(\01321.google.cloud.migrati" + + "oncenter.v1.MigrationInsightB\004\342A\001\003H\000B\t\n\007" + + "insight\"\317\001\n\020MigrationInsight\022A\n\003fit\030\001 \001(" + + "\0132..google.cloud.migrationcenter.v1.FitD" + + "escriptorB\004\342A\001\003\022d\n\025compute_engine_target" + + "\030\n \001(\0132=.google.cloud.migrationcenter.v1" + + ".ComputeEngineMigrationTargetB\004\342A\001\003H\000B\022\n" + + "\020migration_target\"l\n\034ComputeEngineMigrat" + + "ionTarget\022L\n\005shape\030\001 \001(\0132=.google.cloud." + + "migrationcenter.v1.ComputeEngineShapeDes" + + "criptor\"\254\001\n\rFitDescriptor\022J\n\tfit_level\030\001" + + " \001(\01627.google.cloud.migrationcenter.v1.F" + + "itDescriptor.FitLevel\"O\n\010FitLevel\022\031\n\025FIT" + + "_LEVEL_UNSPECIFIED\020\000\022\007\n\003FIT\020\001\022\n\n\006NO_FIT\020" + + "\002\022\023\n\017REQUIRES_EFFORT\020\003\"\220\001\n\034ComputeEngine" + + "ShapeDescriptor\022\021\n\tmemory_mb\030\001 \001(\005\022\033\n\023ph" + + "ysical_core_count\030\002 \001(\005\022\032\n\022logical_core_" + + "count\030\003 \001(\005\022\016\n\006series\030\004 \001(\t\022\024\n\014machine_t" + + "ype\030\005 \001(\t\"\224\003\n\013Aggregation\022\r\n\005field\030\001 \001(\t" + + "\022C\n\005count\030\002 \001(\01322.google.cloud.migration" + + "center.v1.Aggregation.CountH\000\022?\n\003sum\030\003 \001" + + "(\01320.google.cloud.migrationcenter.v1.Agg" + + "regation.SumH\000\022K\n\thistogram\030\004 \001(\01326.goog" + + "le.cloud.migrationcenter.v1.Aggregation." + + "HistogramH\000\022K\n\tfrequency\030\005 \001(\01326.google." + + "cloud.migrationcenter.v1.Aggregation.Fre" + + "quencyH\000\032\007\n\005Count\032\005\n\003Sum\032!\n\tHistogram\022\024\n" + + "\014lower_bounds\030\001 \003(\001\032\013\n\tFrequencyB\026\n\024aggr" + + "egation_function\"\320\005\n\021AggregationResult\022\r" + + "\n\005field\030\001 \001(\t\022I\n\005count\030\002 \001(\01328.google.cl" + + "oud.migrationcenter.v1.AggregationResult" + + ".CountH\000\022E\n\003sum\030\003 \001(\01326.google.cloud.mig" + + "rationcenter.v1.AggregationResult.SumH\000\022" + + "Q\n\thistogram\030\004 \001(\0132<.google.cloud.migrat" + + "ioncenter.v1.AggregationResult.Histogram" + + "H\000\022Q\n\tfrequency\030\005 \001(\0132<.google.cloud.mig" + + "rationcenter.v1.AggregationResult.Freque" + + "ncyH\000\032\026\n\005Count\022\r\n\005value\030\001 \001(\003\032\024\n\003Sum\022\r\n\005" + + "value\030\001 \001(\001\032\244\001\n\tHistogram\022T\n\007buckets\030\001 \003" + + "(\0132C.google.cloud.migrationcenter.v1.Agg" + + "regationResult.Histogram.Bucket\032A\n\006Bucke" + + "t\022\023\n\013lower_bound\030\001 \001(\001\022\023\n\013upper_bound\030\002 " + + "\001(\001\022\r\n\005count\030\003 \001(\003\032\224\001\n\tFrequency\022X\n\006valu" + + "es\030\001 \003(\0132H.google.cloud.migrationcenter." + + "v1.AggregationResult.Frequency.ValuesEnt" + + "ry\032-\n\013ValuesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\003:\0028\001B\010\n\006result\"\311\001\n\024FileValidationRe" + + "port\022\021\n\tfile_name\030\001 \001(\t\022C\n\nrow_errors\030\002 " + + "\003(\0132/.google.cloud.migrationcenter.v1.Im" + + "portRowError\022\026\n\016partial_report\030\003 \001(\010\022A\n\013" + + "file_errors\030\004 \003(\0132,.google.cloud.migrati" + + "oncenter.v1.ImportError\"\245\001\n\020ValidationRe" + + "port\022O\n\020file_validations\030\001 \003(\01325.google." + + "cloud.migrationcenter.v1.FileValidationR" + + "eport\022@\n\njob_errors\030\002 \003(\0132,.google.cloud" + + ".migrationcenter.v1.ImportError\"\221\001\n\017Exec" + + "utionReport\022\027\n\017frames_reported\030\001 \001(\005\022K\n\020" + + "execution_errors\030\002 \001(\01321.google.cloud.mi" + + "grationcenter.v1.ValidationReport\022\030\n\020tot" + + "al_rows_count\030\003 \001(\005\"\265\001\n\013ImportError\022\025\n\re" + + "rror_details\030\001 \001(\t\022G\n\010severity\030\002 \001(\01625.g" + + "oogle.cloud.migrationcenter.v1.ImportErr" + + "or.Severity\"F\n\010Severity\022\030\n\024SEVERITY_UNSP" + + "ECIFIED\020\000\022\t\n\005ERROR\020\001\022\013\n\007WARNING\020\002\022\010\n\004INF" + + "O\020\003\"\210\001\n\016ImportRowError\022\026\n\nrow_number\030\001 \001" + + "(\005B\002\030\001\022\017\n\007vm_name\030\002 \001(\t\022\017\n\007vm_uuid\030\003 \001(\t" + + "\022<\n\006errors\030\004 \003(\0132,.google.cloud.migratio" + + "ncenter.v1.ImportError\"\356\001\n\016UploadFileInf" + + "o\022\030\n\nsigned_uri\030\001 \001(\tB\004\342A\001\003\022S\n\007headers\030\002" + + " \003(\0132<.google.cloud.migrationcenter.v1.U" + + "ploadFileInfo.HeadersEntryB\004\342A\001\003\022=\n\023uri_" + + "expiration_time\030\003 \001(\0132\032.google.protobuf." + + "TimestampB\004\342A\001\003\032.\n\014HeadersEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"M\n\tAssetList\022@\n\t" + + "asset_ids\030\001 \003(\tB-\342A\001\002\372A&\n$migrationcente" + + "r.googleapis.com/Asset\"7\n\023FrameViolation" + + "Entry\022\r\n\005field\030\001 \001(\t\022\021\n\tviolation\030\002 \001(\t\"" + + "\367\002\n\031VirtualMachinePreferences\022N\n\022region_" + + "preferences\030\003 \001(\01322.google.cloud.migrati" + + "oncenter.v1.RegionPreferences\022H\n\017commitm" + + "ent_plan\030\004 \001(\0162/.google.cloud.migrationc" + + "enter.v1.CommitmentPlan\022a\n\034sizing_optimi" + + "zation_strategy\030\005 \001(\0162;.google.cloud.mig" + + "rationcenter.v1.SizingOptimizationStrate" + + "gy\022]\n\032compute_engine_preferences\030\006 \001(\01329" + + ".google.cloud.migrationcenter.v1.Compute" + + "EnginePreferences\"\260\001\n\030ComputeEnginePrefe" + + "rences\022P\n\023machine_preferences\030\002 \001(\01323.go" + + "ogle.cloud.migrationcenter.v1.MachinePre" + + "ferences\022B\n\014license_type\030\003 \001(\0162,.google." + + "cloud.migrationcenter.v1.LicenseType\"d\n\022" + + "MachinePreferences\022N\n\026allowed_machine_se" + + "ries\030\001 \003(\0132..google.cloud.migrationcente" + + "r.v1.MachineSeries\"\035\n\rMachineSeries\022\014\n\004c" + + "ode\030\001 \001(\t\".\n\021RegionPreferences\022\031\n\021prefer" + + "red_regions\030\001 \003(\t\"\311\001\n\010Settings\022\022\n\004name\030\001" + + " \001(\tB\004\342A\001\003\022I\n\016preference_set\030\002 \001(\tB1\372A.\n" + + ",migrationcenter.googleapis.com/Preferen" + + "ceSet:^\352A[\n\'migrationcenter.googleapis.c" + + "om/Settings\0220projects/{project}/location" + + "s/{location}/settings\"\375\023\n\rReportSummary\022" + + "\\\n\020all_assets_stats\030\001 \001(\0132B.google.cloud" + + ".migrationcenter.v1.ReportSummary.AssetA" + + "ggregateStats\022S\n\016group_findings\030\002 \003(\0132;." + + "google.cloud.migrationcenter.v1.ReportSu" + + "mmary.GroupFinding\032\217\001\n\tChartData\022W\n\013data" + + "_points\030\001 \003(\0132B.google.cloud.migrationce" + + "nter.v1.ReportSummary.ChartData.DataPoin" + + "t\032)\n\tDataPoint\022\r\n\005label\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\001\0322\n\024UtilizationChartData\022\014\n\004used\030\001 \001" + + "(\003\022\014\n\004free\030\002 \001(\003\032\262\001\n\022HistogramChartData\022" + + "Y\n\007buckets\030\001 \003(\0132H.google.cloud.migratio" + + "ncenter.v1.ReportSummary.HistogramChartD" + + "ata.Bucket\032A\n\006Bucket\022\023\n\013lower_bound\030\001 \001(" + + "\003\022\023\n\013upper_bound\030\002 \001(\003\022\r\n\005count\030\003 \001(\003\032\304\005" + + "\n\023AssetAggregateStats\022\032\n\022total_memory_by" + + "tes\030\001 \001(\003\022\033\n\023total_storage_bytes\030\002 \001(\003\022\023" + + "\n\013total_cores\030\003 \001(\003\022\024\n\014total_assets\030\004 \001(" + + "\003\022e\n\030memory_utilization_chart\030\005 \001(\0132C.go" + + "ogle.cloud.migrationcenter.v1.ReportSumm" + + "ary.UtilizationChartData\022f\n\031storage_util" + + "ization_chart\030\006 \001(\0132C.google.cloud.migra" + + "tioncenter.v1.ReportSummary.UtilizationC" + + "hartData\022R\n\020operating_system\030\007 \001(\01328.goo" + + "gle.cloud.migrationcenter.v1.ReportSumma" + + "ry.ChartData\022_\n\024core_count_histogram\030\010 \001" + + "(\0132A.google.cloud.migrationcenter.v1.Rep" + + "ortSummary.HistogramChartData\022a\n\026memory_" + + "bytes_histogram\030\t \001(\0132A.google.cloud.mig" + + "rationcenter.v1.ReportSummary.HistogramC" + + "hartData\022b\n\027storage_bytes_histogram\030\n \001(" + + "\0132A.google.cloud.migrationcenter.v1.Repo" + + "rtSummary.HistogramChartData\032\200\001\n\027Machine" + + "SeriesAllocation\022F\n\016machine_series\030\001 \001(\013" + + "2..google.cloud.migrationcenter.v1.Machi" + + "neSeries\022\035\n\025allocated_asset_count\030\002 \001(\003\032" + + "\217\002\n\024ComputeEngineFinding\022\031\n\021allocated_re" + + "gions\030\001 \003(\t\022\035\n\025allocated_asset_count\030\002 \001" + + "(\003\022j\n\032machine_series_allocations\030\003 \003(\0132F" + + ".google.cloud.migrationcenter.v1.ReportS" + + "ummary.MachineSeriesAllocation\022Q\n\024alloca" + + "ted_disk_types\030\004 \003(\01623.google.cloud.migr" + + "ationcenter.v1.PersistentDiskType\032\266\004\n\031Gr" + + "oupPreferenceSetFinding\022\024\n\014display_name\030", + "\001 \001(\t\022\023\n\013description\030\002 \001(\t\022W\n\023machine_pr" + + "eferences\030\003 \001(\0132:.google.cloud.migration" + + "center.v1.VirtualMachinePreferences\022.\n\022m" + + "onthly_cost_total\030\004 \001(\0132\022.google.type.Mo" + + "ney\0220\n\024monthly_cost_compute\030\005 \001(\0132\022.goog" + + "le.type.Money\0223\n\027monthly_cost_os_license" + + "\030\006 \001(\0132\022.google.type.Money\0227\n\033monthly_co" + + "st_network_egress\030\007 \001(\0132\022.google.type.Mo" + + "ney\0220\n\024monthly_cost_storage\030\010 \001(\0132\022.goog" + + "le.type.Money\022.\n\022monthly_cost_other\030\t \001(" + + "\0132\022.google.type.Money\022c\n\026compute_engine_" + + "finding\030\n \001(\0132C.google.cloud.migrationce" + + "nter.v1.ReportSummary.ComputeEngineFindi" + + "ng\032\250\002\n\014GroupFinding\022\024\n\014display_name\030\001 \001(" + + "\t\022\023\n\013description\030\002 \001(\t\022a\n\025asset_aggregat" + + "e_stats\030\003 \001(\0132B.google.cloud.migrationce" + + "nter.v1.ReportSummary.AssetAggregateStat" + + "s\022\037\n\027overlapping_asset_count\030\004 \001(\003\022i\n\027pr" + + "eference_set_findings\030\005 \003(\0132H.google.clo" + + "ud.migrationcenter.v1.ReportSummary.Grou" + + "pPreferenceSetFinding*R\n\tAssetView\022\032\n\026AS" + + "SET_VIEW_UNSPECIFIED\020\000\022\024\n\020ASSET_VIEW_BAS" + + "IC\020\001\022\023\n\017ASSET_VIEW_FULL\020\002*n\n\025OperatingSy" + + "stemFamily\022\025\n\021OS_FAMILY_UNKNOWN\020\000\022\025\n\021OS_" + + "FAMILY_WINDOWS\020\001\022\023\n\017OS_FAMILY_LINUX\020\002\022\022\n" + + "\016OS_FAMILY_UNIX\020\003*\363\001\n\017ImportJobFormat\022!\n" + + "\035IMPORT_JOB_FORMAT_UNSPECIFIED\020\000\022\"\n\036IMPO" + + "RT_JOB_FORMAT_RVTOOLS_XLSX\020\001\022!\n\035IMPORT_J" + + "OB_FORMAT_RVTOOLS_CSV\020\002\022&\n\"IMPORT_JOB_FO" + + "RMAT_EXPORTED_AWS_CSV\020\004\022(\n$IMPORT_JOB_FO" + + "RMAT_EXPORTED_AZURE_CSV\020\005\022$\n IMPORT_JOB_" + + "FORMAT_STRATOZONE_CSV\020\006*e\n\rImportJobView" + + "\022\037\n\033IMPORT_JOB_VIEW_UNSPECIFIED\020\000\022\031\n\025IMP" + + "ORT_JOB_VIEW_BASIC\020\001\022\030\n\024IMPORT_JOB_VIEW_" + + "FULL\020\002*i\n\016ErrorFrameView\022 \n\034ERROR_FRAME_" + + "VIEW_UNSPECIFIED\020\000\022\032\n\026ERROR_FRAME_VIEW_B" + + "ASIC\020\001\022\031\n\025ERROR_FRAME_VIEW_FULL\020\002*\236\001\n\022Pe" + + "rsistentDiskType\022$\n PERSISTENT_DISK_TYPE" + + "_UNSPECIFIED\020\000\022!\n\035PERSISTENT_DISK_TYPE_S" + + "TANDARD\020\001\022!\n\035PERSISTENT_DISK_TYPE_BALANC" + + "ED\020\002\022\034\n\030PERSISTENT_DISK_TYPE_SSD\020\003*n\n\013Li" + + "censeType\022\034\n\030LICENSE_TYPE_UNSPECIFIED\020\000\022" + + "\030\n\024LICENSE_TYPE_DEFAULT\020\001\022\'\n#LICENSE_TYP" + + "E_BRING_YOUR_OWN_LICENSE\020\002*\323\001\n\032SizingOpt" + + "imizationStrategy\022,\n(SIZING_OPTIMIZATION" + + "_STRATEGY_UNSPECIFIED\020\000\022/\n+SIZING_OPTIMI" + + "ZATION_STRATEGY_SAME_AS_SOURCE\020\001\022)\n%SIZI" + + "NG_OPTIMIZATION_STRATEGY_MODERATE\020\002\022+\n\'S" + + "IZING_OPTIMIZATION_STRATEGY_AGGRESSIVE\020\003" + + "*\212\001\n\016CommitmentPlan\022\037\n\033COMMITMENT_PLAN_U" + + "NSPECIFIED\020\000\022\030\n\024COMMITMENT_PLAN_NONE\020\001\022\034" + + "\n\030COMMITMENT_PLAN_ONE_YEAR\020\002\022\037\n\033COMMITME" + + "NT_PLAN_THREE_YEARS\020\003*p\n\nReportView\022\033\n\027R" + + "EPORT_VIEW_UNSPECIFIED\020\000\022\025\n\021REPORT_VIEW_" + + "BASIC\020\001\022\024\n\020REPORT_VIEW_FULL\020\002\022\030\n\024REPORT_" + + "VIEW_STANDARD\020\0032\254P\n\017MigrationCenter\022\262\001\n\n" + + "ListAssets\0222.google.cloud.migrationcente" + + "r.v1.ListAssetsRequest\0323.google.cloud.mi" + + "grationcenter.v1.ListAssetsResponse\";\332A\006" + + "parent\202\323\344\223\002,\022*/v1/{parent=projects/*/loc" + + "ations/*}/assets\022\237\001\n\010GetAsset\0220.google.c" + + "loud.migrationcenter.v1.GetAssetRequest\032" + + "&.google.cloud.migrationcenter.v1.Asset\"" + + "9\332A\004name\202\323\344\223\002,\022*/v1/{name=projects/*/loc" + + "ations/*/assets/*}\022\277\001\n\013UpdateAsset\0223.goo" + + "gle.cloud.migrationcenter.v1.UpdateAsset" + + "Request\032&.google.cloud.migrationcenter.v" + + "1.Asset\"S\332A\021asset,update_mask\202\323\344\223\002920/v1" + + "/{asset.name=projects/*/locations/*/asse" + + "ts/*}:\005asset\022\337\001\n\021BatchUpdateAssets\0229.goo" + + "gle.cloud.migrationcenter.v1.BatchUpdate" + + "AssetsRequest\032:.google.cloud.migrationce" + + "nter.v1.BatchUpdateAssetsResponse\"S\332A\017pa" + + "rent,requests\202\323\344\223\002;\"6/v1/{parent=project" + + "s/*/locations/*}/assets:batchUpdate:\001*\022\225" + + "\001\n\013DeleteAsset\0223.google.cloud.migrationc" + + "enter.v1.DeleteAssetRequest\032\026.google.pro" + + "tobuf.Empty\"9\332A\004name\202\323\344\223\002,**/v1/{name=pr" + + "ojects/*/locations/*/assets/*}\022\270\001\n\021Batch" + + "DeleteAssets\0229.google.cloud.migrationcen" + + "ter.v1.BatchDeleteAssetsRequest\032\026.google" + + ".protobuf.Empty\"P\332A\014parent,names\202\323\344\223\002;\"6" + + "/v1/{parent=projects/*/locations/*}/asse" + + "ts:batchDelete:\001*\022\330\001\n\021ReportAssetFrames\022" + + "9.google.cloud.migrationcenter.v1.Report" + + "AssetFramesRequest\032:.google.cloud.migrat" + + "ioncenter.v1.ReportAssetFramesResponse\"L" + + "\202\323\344\223\002F\".google.cloud.migrationcenter.v1." + + "AggregateAssetsValuesResponse\"E\202\323\344\223\002?\":/" + + "v1/{parent=projects/*/locations/*}/asset" + + "s:aggregateValues:\001*\022\361\001\n\017CreateImportJob" + + "\0227.google.cloud.migrationcenter.v1.Creat" + + "eImportJobRequest\032\035.google.longrunning.O" + + "peration\"\205\001\312A\036\n\tImportJob\022\021OperationMeta" + + "data\332A\037parent,import_job,import_job_id\202\323" + + "\344\223\002<\"./v1/{parent=projects/*/locations/*" + + "}/importJobs:\nimport_job\022\302\001\n\016ListImportJ" + + "obs\0226.google.cloud.migrationcenter.v1.Li" + + "stImportJobsRequest\0327.google.cloud.migra" + + "tioncenter.v1.ListImportJobsResponse\"?\332A" + + "\006parent\202\323\344\223\0020\022./v1/{parent=projects/*/lo" + + "cations/*}/importJobs\022\257\001\n\014GetImportJob\0224" + + ".google.cloud.migrationcenter.v1.GetImpo" + + "rtJobRequest\032*.google.cloud.migrationcen" + + "ter.v1.ImportJob\"=\332A\004name\202\323\344\223\0020\022./v1/{na" + + "me=projects/*/locations/*/importJobs/*}\022" + + "\325\001\n\017DeleteImportJob\0227.google.cloud.migra" + + "tioncenter.v1.DeleteImportJobRequest\032\035.g" + + "oogle.longrunning.Operation\"j\312A*\n\025google" + + ".protobuf.Empty\022\021OperationMetadata\332A\004nam" + + "e\202\323\344\223\0020*./v1/{name=projects/*/locations/" + + "*/importJobs/*}\022\363\001\n\017UpdateImportJob\0227.go" + + "ogle.cloud.migrationcenter.v1.UpdateImpo" + + "rtJobRequest\032\035.google.longrunning.Operat" + + "ion\"\207\001\312A\036\n\tImportJob\022\021OperationMetadata\332" + + "A\026import_job,update_mask\202\323\344\223\002G29/v1/{imp" + + "ort_job.name=projects/*/locations/*/impo" + + "rtJobs/*}:\nimport_job\022\345\001\n\021ValidateImport" + + "Job\0229.google.cloud.migrationcenter.v1.Va" + + "lidateImportJobRequest\032\035.google.longrunn" + + "ing.Operation\"v\312A*\n\025google.protobuf.Empt" + + "y\022\021OperationMetadata\332A\004name\202\323\344\223\002<\"7/v1/{" + + "name=projects/*/locations/*/importJobs/*" + + "}:validate:\001*\022\326\001\n\014RunImportJob\0224.google." + + "cloud.migrationcenter.v1.RunImportJobReq" + + "uest\032\035.google.longrunning.Operation\"q\312A*" + + "\n\025google.protobuf.Empty\022\021OperationMetada" + + "ta\332A\004name\202\323\344\223\0027\"2/v1/{name=projects/*/lo" + + "cations/*/importJobs/*}:run:\001*\022\320\001\n\021GetIm" + + "portDataFile\0229.google.cloud.migrationcen" + + "ter.v1.GetImportDataFileRequest\032/.google" + + ".cloud.migrationcenter.v1.ImportDataFile" + + "\"O\332A\004name\202\323\344\223\002B\022@/v1/{name=projects/*/lo" + + "cations/*/importJobs/*/importDataFiles/*" + + "}\022\343\001\n\023ListImportDataFiles\022;.google.cloud" + + ".migrationcenter.v1.ListImportDataFilesR" + + "equest\032<.google.cloud.migrationcenter.v1" + + ".ListImportDataFilesResponse\"Q\332A\006parent\202" + + "\323\344\223\002B\022@/v1/{parent=projects/*/locations/" + + "*/importJobs/*}/importDataFiles\022\244\002\n\024Crea" + + "teImportDataFile\022<.google.cloud.migratio" + + "ncenter.v1.CreateImportDataFileRequest\032\035" + + ".google.longrunning.Operation\"\256\001\312A#\n\016Imp" + + "ortDataFile\022\021OperationMetadata\332A+parent," + + "import_data_file,import_data_file_id\202\323\344\223" + + "\002T\"@/v1/{parent=projects/*/locations/*/i" + + "mportJobs/*}/importDataFiles:\020import_dat" + + "a_file\022\361\001\n\024DeleteImportDataFile\022<.google" + + ".cloud.migrationcenter.v1.DeleteImportDa" + + "taFileRequest\032\035.google.longrunning.Opera" + + "tion\"|\312A*\n\025google.protobuf.Empty\022\021Operat" + + "ionMetadata\332A\004name\202\323\344\223\002B*@/v1/{name=proj" + + "ects/*/locations/*/importJobs/*/importDa" + + "taFiles/*}\022\262\001\n\nListGroups\0222.google.cloud" + + ".migrationcenter.v1.ListGroupsRequest\0323." + + "google.cloud.migrationcenter.v1.ListGrou" + + "psResponse\";\332A\006parent\202\323\344\223\002,\022*/v1/{parent" + + "=projects/*/locations/*}/groups\022\237\001\n\010GetG" + + "roup\0220.google.cloud.migrationcenter.v1.G" + + "etGroupRequest\032&.google.cloud.migrationc" + + "enter.v1.Group\"9\332A\004name\202\323\344\223\002,\022*/v1/{name" + + "=projects/*/locations/*/groups/*}\022\321\001\n\013Cr" + + "eateGroup\0223.google.cloud.migrationcenter" + + ".v1.CreateGroupRequest\032\035.google.longrunn" + + "ing.Operation\"n\312A\032\n\005Group\022\021OperationMeta" + + "data\332A\025parent,group,group_id\202\323\344\223\0023\"*/v1/" + + "{parent=projects/*/locations/*}/groups:\005" + + "group\022\323\001\n\013UpdateGroup\0223.google.cloud.mig" + + "rationcenter.v1.UpdateGroupRequest\032\035.goo" + + "gle.longrunning.Operation\"p\312A\032\n\005Group\022\021O" + + "perationMetadata\332A\021group,update_mask\202\323\344\223" + + "\002920/v1/{group.name=projects/*/locations" + + "/*/groups/*}:\005group\022\311\001\n\013DeleteGroup\0223.go" + + "ogle.cloud.migrationcenter.v1.DeleteGrou" + + "pRequest\032\035.google.longrunning.Operation\"" + + "f\312A*\n\025google.protobuf.Empty\022\021OperationMe" + + "tadata\332A\004name\202\323\344\223\002,**/v1/{name=projects/" + + "*/locations/*/groups/*}\022\322\001\n\020AddAssetsToG" + + "roup\0228.google.cloud.migrationcenter.v1.A" + + "ddAssetsToGroupRequest\032\035.google.longrunn" + + "ing.Operation\"e\312A\032\n\005Group\022\021OperationMeta" + + "data\332A\005group\202\323\344\223\002:\"5/v1/{group=projects/" + + "*/locations/*/groups/*}:addAssets:\001*\022\337\001\n" + + "\025RemoveAssetsFromGroup\022=.google.cloud.mi" + + "grationcenter.v1.RemoveAssetsFromGroupRe" + + "quest\032\035.google.longrunning.Operation\"h\312A" + + "\032\n\005Group\022\021OperationMetadata\332A\005group\202\323\344\223\002" + + "=\"8/v1/{group=projects/*/locations/*/gro" + + "ups/*}:removeAssets:\001*\022\320\001\n\017ListErrorFram" + + "es\0227.google.cloud.migrationcenter.v1.Lis" + + "tErrorFramesRequest\0328.google.cloud.migra" + + "tioncenter.v1.ListErrorFramesResponse\"J\332" + + "A\006parent\202\323\344\223\002;\0229/v1/{parent=projects/*/l" + + "ocations/*/sources/*}/errorFrames\022\275\001\n\rGe" + + "tErrorFrame\0225.google.cloud.migrationcent" + + "er.v1.GetErrorFrameRequest\032+.google.clou" + + "d.migrationcenter.v1.ErrorFrame\"H\332A\004name" + + "\202\323\344\223\002;\0229/v1/{name=projects/*/locations/*" + + "/sources/*/errorFrames/*}\022\266\001\n\013ListSource" + + "s\0223.google.cloud.migrationcenter.v1.List" + + "SourcesRequest\0324.google.cloud.migrationc" + + "enter.v1.ListSourcesResponse\"<\332A\006parent\202" + + "\323\344\223\002-\022+/v1/{parent=projects/*/locations/" + + "*}/sources\022\243\001\n\tGetSource\0221.google.cloud." + + "migrationcenter.v1.GetSourceRequest\032\'.go" + + "ogle.cloud.migrationcenter.v1.Source\":\332A" + + "\004name\202\323\344\223\002-\022+/v1/{name=projects/*/locati" + + "ons/*/sources/*}\022\330\001\n\014CreateSource\0224.goog" + + "le.cloud.migrationcenter.v1.CreateSource" + + "Request\032\035.google.longrunning.Operation\"s" + + "\312A\033\n\006Source\022\021OperationMetadata\332A\027parent," + + "source,source_id\202\323\344\223\0025\"+/v1/{parent=proj" + + "ects/*/locations/*}/sources:\006source\022\332\001\n\014" + + "UpdateSource\0224.google.cloud.migrationcen" + + "ter.v1.UpdateSourceRequest\032\035.google.long" + + "running.Operation\"u\312A\033\n\006Source\022\021Operatio" + + "nMetadata\332A\022source,update_mask\202\323\344\223\002<22/v" + + "1/{source.name=projects/*/locations/*/so" + + "urces/*}:\006source\022\314\001\n\014DeleteSource\0224.goog" + + "le.cloud.migrationcenter.v1.DeleteSource" + + "Request\032\035.google.longrunning.Operation\"g" + + "\312A*\n\025google.protobuf.Empty\022\021OperationMet" + + "adata\332A\004name\202\323\344\223\002-*+/v1/{name=projects/*" + + "/locations/*/sources/*}\022\322\001\n\022ListPreferen" + + "ceSets\022:.google.cloud.migrationcenter.v1" + + ".ListPreferenceSetsRequest\032;.google.clou" + + "d.migrationcenter.v1.ListPreferenceSetsR" + + "esponse\"C\332A\006parent\202\323\344\223\0024\0222/v1/{parent=pr" + + "ojects/*/locations/*}/preferenceSets\022\277\001\n" + + "\020GetPreferenceSet\0228.google.cloud.migrati" + + "oncenter.v1.GetPreferenceSetRequest\032..go" + + "ogle.cloud.migrationcenter.v1.Preference" + + "Set\"A\332A\004name\202\323\344\223\0024\0222/v1/{name=projects/*" + + "/locations/*/preferenceSets/*}\022\215\002\n\023Creat" + + "ePreferenceSet\022;.google.cloud.migrationc" + + "enter.v1.CreatePreferenceSetRequest\032\035.go" + + "ogle.longrunning.Operation\"\231\001\312A\"\n\rPrefer" + + "enceSet\022\021OperationMetadata\332A\'parent,pref" + + "erence_set,preference_set_id\202\323\344\223\002D\"2/v1/" + + "{parent=projects/*/locations/*}/preferen" + + "ceSets:\016preference_set\022\217\002\n\023UpdatePrefere" + + "nceSet\022;.google.cloud.migrationcenter.v1" + + ".UpdatePreferenceSetRequest\032\035.google.lon" + + "grunning.Operation\"\233\001\312A\"\n\rPreferenceSet\022" + + "\021OperationMetadata\332A\032preference_set,upda" + + "te_mask\202\323\344\223\002S2A/v1/{preference_set.name=" + + "projects/*/locations/*/preferenceSets/*}" + + ":\016preference_set\022\341\001\n\023DeletePreferenceSet" + + "\022;.google.cloud.migrationcenter.v1.Delet" + + "ePreferenceSetRequest\032\035.google.longrunni" + + "ng.Operation\"n\312A*\n\025google.protobuf.Empty" + + "\022\021OperationMetadata\332A\004name\202\323\344\223\0024*2/v1/{n" + + "ame=projects/*/locations/*/preferenceSet" + + "s/*}\022\250\001\n\013GetSettings\0223.google.cloud.migr" + + "ationcenter.v1.GetSettingsRequest\032).goog" + + "le.cloud.migrationcenter.v1.Settings\"9\332A" + + "\004name\202\323\344\223\002,\022*/v1/{name=projects/*/locati" + + "ons/*/settings}\022\345\001\n\016UpdateSettings\0226.goo" + + "gle.cloud.migrationcenter.v1.UpdateSetti" + + "ngsRequest\032\035.google.longrunning.Operatio" + + "n\"|\312A\035\n\010Settings\022\021OperationMetadata\332A\024se" + + "ttings,update_mask\202\323\344\223\002?23/v1/{settings." + + "name=projects/*/locations/*/settings}:\010s" + + "ettings\022\206\002\n\022CreateReportConfig\022:.google." + + "cloud.migrationcenter.v1.CreateReportCon" + + "figRequest\032\035.google.longrunning.Operatio" + + "n\"\224\001\312A!\n\014ReportConfig\022\021OperationMetadata" + + "\332A%parent,report_config,report_config_id" + + "\202\323\344\223\002B\"1/v1/{parent=projects/*/locations" + + "/*}/reportConfigs:\rreport_config\022\273\001\n\017Get" + + "ReportConfig\0227.google.cloud.migrationcen" + + "ter.v1.GetReportConfigRequest\032-.google.c" + + "loud.migrationcenter.v1.ReportConfig\"@\332A" + + "\004name\202\323\344\223\0023\0221/v1/{name=projects/*/locati" + + "ons/*/reportConfigs/*}\022\316\001\n\021ListReportCon" + + "figs\0229.google.cloud.migrationcenter.v1.L" + + "istReportConfigsRequest\032:.google.cloud.m" + + "igrationcenter.v1.ListReportConfigsRespo" + + "nse\"B\332A\006parent\202\323\344\223\0023\0221/v1/{parent=projec" + + "ts/*/locations/*}/reportConfigs\022\336\001\n\022Dele" + + "teReportConfig\022:.google.cloud.migrationc" + + "enter.v1.DeleteReportConfigRequest\032\035.goo" + + "gle.longrunning.Operation\"m\312A*\n\025google.p" + + "rotobuf.Empty\022\021OperationMetadata\332A\004name\202" + + "\323\344\223\0023*1/v1/{name=projects/*/locations/*/" + + "reportConfigs/*}\022\351\001\n\014CreateReport\0224.goog" + + "le.cloud.migrationcenter.v1.CreateReport" + + "Request\032\035.google.longrunning.Operation\"\203" + + "\001\312A\033\n\006Report\022\021OperationMetadata\332A\027parent" + + ",report,report_id\202\323\344\223\002E\";/v1/{parent=pro" + + "jects/*/locations/*/reportConfigs/*}/rep" + + "orts:\006report\022\263\001\n\tGetReport\0221.google.clou" + + "d.migrationcenter.v1.GetReportRequest\032\'." + + "google.cloud.migrationcenter.v1.Report\"J" + + "\332A\004name\202\323\344\223\002=\022;/v1/{name=projects/*/loca" + + "tions/*/reportConfigs/*/reports/*}\022\306\001\n\013L" + + "istReports\0223.google.cloud.migrationcente" + + "r.v1.ListReportsRequest\0324.google.cloud.m" + + "igrationcenter.v1.ListReportsResponse\"L\332" + + "A\006parent\202\323\344\223\002=\022;/v1/{parent=projects/*/l" + + "ocations/*/reportConfigs/*}/reports\022\334\001\n\014" + + "DeleteReport\0224.google.cloud.migrationcen" + + "ter.v1.DeleteReportRequest\032\035.google.long" + + "running.Operation\"w\312A*\n\025google.protobuf." + + "Empty\022\021OperationMetadata\332A\004name\202\323\344\223\002=*;/" + + "v1/{name=projects/*/locations/*/reportCo" + + "nfigs/*/reports/*}\032R\312A\036migrationcenter.g" + + "oogleapis.com\322A.https://www.googleapis.c" + + "om/auth/cloud-platformB\365\001\n#com.google.cl" + + "oud.migrationcenter.v1B\024MigrationCenterP" + + "rotoP\001ZMcloud.google.com/go/migrationcen" + + "ter/apiv1/migrationcenterpb;migrationcen" + + "terpb\252\002\037Google.Cloud.MigrationCenter.V1\312" + + "\002\037Google\\Cloud\\MigrationCenter\\V1\352\002\"Goog" + + "le::Cloud::MigrationCenter::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), + com.google.type.MoneyProto.getDescriptor(), + }); + internal_static_google_cloud_migrationcenter_v1_Asset_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_migrationcenter_v1_Asset_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Asset_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Attributes", + "MachineDetails", + "InsightList", + "PerformanceData", + "Sources", + "AssignedGroups", + "AssetDetails", + }); + internal_static_google_cloud_migrationcenter_v1_Asset_LabelsEntry_descriptor = + internal_static_google_cloud_migrationcenter_v1_Asset_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_migrationcenter_v1_Asset_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Asset_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_migrationcenter_v1_Asset_AttributesEntry_descriptor = + internal_static_google_cloud_migrationcenter_v1_Asset_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_migrationcenter_v1_Asset_AttributesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Asset_AttributesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_migrationcenter_v1_PreferenceSet_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_migrationcenter_v1_PreferenceSet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_PreferenceSet_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "DisplayName", + "Description", + "VirtualMachinePreferences", + }); + internal_static_google_cloud_migrationcenter_v1_ImportJob_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_migrationcenter_v1_ImportJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ImportJob_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "CreateTime", + "UpdateTime", + "CompleteTime", + "State", + "Labels", + "AssetSource", + "ValidationReport", + "ExecutionReport", + "Report", + }); + internal_static_google_cloud_migrationcenter_v1_ImportJob_LabelsEntry_descriptor = + internal_static_google_cloud_migrationcenter_v1_ImportJob_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_ImportJob_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ImportJob_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_migrationcenter_v1_ImportDataFile_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_migrationcenter_v1_ImportDataFile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ImportDataFile_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Format", "CreateTime", "State", "UploadFileInfo", "FileInfo", + }); + internal_static_google_cloud_migrationcenter_v1_Group_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_migrationcenter_v1_Group_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Group_descriptor, + new java.lang.String[] { + "Name", "CreateTime", "UpdateTime", "Labels", "DisplayName", "Description", + }); + internal_static_google_cloud_migrationcenter_v1_Group_LabelsEntry_descriptor = + internal_static_google_cloud_migrationcenter_v1_Group_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_migrationcenter_v1_Group_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Group_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_migrationcenter_v1_ErrorFrame_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_migrationcenter_v1_ErrorFrame_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ErrorFrame_descriptor, + new java.lang.String[] { + "Name", "Violations", "OriginalFrame", "IngestionTime", + }); + internal_static_google_cloud_migrationcenter_v1_Source_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_migrationcenter_v1_Source_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Source_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "DisplayName", + "Description", + "Type", + "Priority", + "Managed", + "PendingFrameCount", + "ErrorFrameCount", + "State", + }); + internal_static_google_cloud_migrationcenter_v1_ReportConfig_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_migrationcenter_v1_ReportConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportConfig_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "DisplayName", + "Description", + "GroupPreferencesetAssignments", + }); + internal_static_google_cloud_migrationcenter_v1_ReportConfig_GroupPreferenceSetAssignment_descriptor = + internal_static_google_cloud_migrationcenter_v1_ReportConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_ReportConfig_GroupPreferenceSetAssignment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportConfig_GroupPreferenceSetAssignment_descriptor, + new java.lang.String[] { + "Group", "PreferenceSet", + }); + internal_static_google_cloud_migrationcenter_v1_Report_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_migrationcenter_v1_Report_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Report_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "DisplayName", + "Description", + "Type", + "State", + "Summary", + }); + internal_static_google_cloud_migrationcenter_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_migrationcenter_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + internal_static_google_cloud_migrationcenter_v1_ListAssetsRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_migrationcenter_v1_ListAssetsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListAssetsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", "View", + }); + internal_static_google_cloud_migrationcenter_v1_ListAssetsResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_migrationcenter_v1_ListAssetsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListAssetsResponse_descriptor, + new java.lang.String[] { + "Assets", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_migrationcenter_v1_GetAssetRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_migrationcenter_v1_GetAssetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GetAssetRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_migrationcenter_v1_UpdateAssetRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_migrationcenter_v1_UpdateAssetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_UpdateAssetRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Asset", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsRequest_descriptor, + new java.lang.String[] { + "Parent", "Requests", + }); + internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_BatchUpdateAssetsResponse_descriptor, + new java.lang.String[] { + "Assets", + }); + internal_static_google_cloud_migrationcenter_v1_DeleteAssetRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_migrationcenter_v1_DeleteAssetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DeleteAssetRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_BatchDeleteAssetsRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_migrationcenter_v1_BatchDeleteAssetsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_BatchDeleteAssetsRequest_descriptor, + new java.lang.String[] { + "Parent", "Names", "AllowMissing", + }); + internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesRequest_descriptor, + new java.lang.String[] { + "Parent", "Frames", "Source", + }); + internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesRequest_descriptor, + new java.lang.String[] { + "Parent", "Aggregations", "Filter", + }); + internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AggregateAssetsValuesResponse_descriptor, + new java.lang.String[] { + "Results", + }); + internal_static_google_cloud_migrationcenter_v1_CreateImportJobRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_migrationcenter_v1_CreateImportJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_CreateImportJobRequest_descriptor, + new java.lang.String[] { + "Parent", "ImportJobId", "ImportJob", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_ListImportJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_migrationcenter_v1_ListImportJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListImportJobsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", "View", + }); + internal_static_google_cloud_migrationcenter_v1_ListImportJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_migrationcenter_v1_ListImportJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListImportJobsResponse_descriptor, + new java.lang.String[] { + "ImportJobs", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_migrationcenter_v1_GetImportJobRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_migrationcenter_v1_GetImportJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GetImportJobRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_migrationcenter_v1_DeleteImportJobRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_migrationcenter_v1_DeleteImportJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DeleteImportJobRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Force", + }); + internal_static_google_cloud_migrationcenter_v1_UpdateImportJobRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_migrationcenter_v1_UpdateImportJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_UpdateImportJobRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "ImportJob", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_ValidateImportJobRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_migrationcenter_v1_ValidateImportJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ValidateImportJobRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_RunImportJobRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_migrationcenter_v1_RunImportJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_RunImportJobRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_GetImportDataFileRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_migrationcenter_v1_GetImportDataFileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GetImportDataFileRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesResponse_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListImportDataFilesResponse_descriptor, + new java.lang.String[] { + "ImportDataFiles", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_migrationcenter_v1_CreateImportDataFileRequest_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_migrationcenter_v1_CreateImportDataFileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_CreateImportDataFileRequest_descriptor, + new java.lang.String[] { + "Parent", "ImportDataFileId", "ImportDataFile", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_DeleteImportDataFileRequest_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_cloud_migrationcenter_v1_DeleteImportDataFileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DeleteImportDataFileRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_ListGroupsRequest_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_cloud_migrationcenter_v1_ListGroupsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListGroupsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_migrationcenter_v1_ListGroupsResponse_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_cloud_migrationcenter_v1_ListGroupsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListGroupsResponse_descriptor, + new java.lang.String[] { + "Groups", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_migrationcenter_v1_GetGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_cloud_migrationcenter_v1_GetGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GetGroupRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_migrationcenter_v1_CreateGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_cloud_migrationcenter_v1_CreateGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_CreateGroupRequest_descriptor, + new java.lang.String[] { + "Parent", "GroupId", "Group", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_UpdateGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_google_cloud_migrationcenter_v1_UpdateGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_UpdateGroupRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Group", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_DeleteGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_google_cloud_migrationcenter_v1_DeleteGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DeleteGroupRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_AddAssetsToGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_cloud_migrationcenter_v1_AddAssetsToGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AddAssetsToGroupRequest_descriptor, + new java.lang.String[] { + "Group", "RequestId", "Assets", "AllowExisting", + }); + internal_static_google_cloud_migrationcenter_v1_RemoveAssetsFromGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_cloud_migrationcenter_v1_RemoveAssetsFromGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_RemoveAssetsFromGroupRequest_descriptor, + new java.lang.String[] { + "Group", "RequestId", "Assets", "AllowMissing", + }); + internal_static_google_cloud_migrationcenter_v1_ListErrorFramesRequest_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_google_cloud_migrationcenter_v1_ListErrorFramesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListErrorFramesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "View", + }); + internal_static_google_cloud_migrationcenter_v1_ListErrorFramesResponse_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_google_cloud_migrationcenter_v1_ListErrorFramesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListErrorFramesResponse_descriptor, + new java.lang.String[] { + "ErrorFrames", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_migrationcenter_v1_GetErrorFrameRequest_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_google_cloud_migrationcenter_v1_GetErrorFrameRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GetErrorFrameRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_migrationcenter_v1_ListSourcesRequest_descriptor = + getDescriptor().getMessageTypes().get(46); + internal_static_google_cloud_migrationcenter_v1_ListSourcesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListSourcesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_migrationcenter_v1_ListSourcesResponse_descriptor = + getDescriptor().getMessageTypes().get(47); + internal_static_google_cloud_migrationcenter_v1_ListSourcesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListSourcesResponse_descriptor, + new java.lang.String[] { + "Sources", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_migrationcenter_v1_GetSourceRequest_descriptor = + getDescriptor().getMessageTypes().get(48); + internal_static_google_cloud_migrationcenter_v1_GetSourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GetSourceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_migrationcenter_v1_CreateSourceRequest_descriptor = + getDescriptor().getMessageTypes().get(49); + internal_static_google_cloud_migrationcenter_v1_CreateSourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_CreateSourceRequest_descriptor, + new java.lang.String[] { + "Parent", "SourceId", "Source", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_UpdateSourceRequest_descriptor = + getDescriptor().getMessageTypes().get(50); + internal_static_google_cloud_migrationcenter_v1_UpdateSourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_UpdateSourceRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Source", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_DeleteSourceRequest_descriptor = + getDescriptor().getMessageTypes().get(51); + internal_static_google_cloud_migrationcenter_v1_DeleteSourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DeleteSourceRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsRequest_descriptor = + getDescriptor().getMessageTypes().get(52); + internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "OrderBy", + }); + internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsResponse_descriptor = + getDescriptor().getMessageTypes().get(53); + internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListPreferenceSetsResponse_descriptor, + new java.lang.String[] { + "PreferenceSets", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_migrationcenter_v1_GetPreferenceSetRequest_descriptor = + getDescriptor().getMessageTypes().get(54); + internal_static_google_cloud_migrationcenter_v1_GetPreferenceSetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GetPreferenceSetRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_migrationcenter_v1_CreatePreferenceSetRequest_descriptor = + getDescriptor().getMessageTypes().get(55); + internal_static_google_cloud_migrationcenter_v1_CreatePreferenceSetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_CreatePreferenceSetRequest_descriptor, + new java.lang.String[] { + "Parent", "PreferenceSetId", "PreferenceSet", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_UpdatePreferenceSetRequest_descriptor = + getDescriptor().getMessageTypes().get(56); + internal_static_google_cloud_migrationcenter_v1_UpdatePreferenceSetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_UpdatePreferenceSetRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "PreferenceSet", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_DeletePreferenceSetRequest_descriptor = + getDescriptor().getMessageTypes().get(57); + internal_static_google_cloud_migrationcenter_v1_DeletePreferenceSetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DeletePreferenceSetRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_GetSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(58); + internal_static_google_cloud_migrationcenter_v1_GetSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GetSettingsRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_migrationcenter_v1_UpdateSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(59); + internal_static_google_cloud_migrationcenter_v1_UpdateSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_UpdateSettingsRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Settings", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_CreateReportConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(60); + internal_static_google_cloud_migrationcenter_v1_CreateReportConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_CreateReportConfigRequest_descriptor, + new java.lang.String[] { + "Parent", "ReportConfigId", "ReportConfig", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_DeleteReportConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(61); + internal_static_google_cloud_migrationcenter_v1_DeleteReportConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DeleteReportConfigRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Force", + }); + internal_static_google_cloud_migrationcenter_v1_GetReportRequest_descriptor = + getDescriptor().getMessageTypes().get(62); + internal_static_google_cloud_migrationcenter_v1_GetReportRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GetReportRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_migrationcenter_v1_ListReportsRequest_descriptor = + getDescriptor().getMessageTypes().get(63); + internal_static_google_cloud_migrationcenter_v1_ListReportsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListReportsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", "View", + }); + internal_static_google_cloud_migrationcenter_v1_ListReportsResponse_descriptor = + getDescriptor().getMessageTypes().get(64); + internal_static_google_cloud_migrationcenter_v1_ListReportsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListReportsResponse_descriptor, + new java.lang.String[] { + "Reports", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_migrationcenter_v1_DeleteReportRequest_descriptor = + getDescriptor().getMessageTypes().get(65); + internal_static_google_cloud_migrationcenter_v1_DeleteReportRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DeleteReportRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_GetReportConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(66); + internal_static_google_cloud_migrationcenter_v1_GetReportConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GetReportConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_migrationcenter_v1_ListReportConfigsRequest_descriptor = + getDescriptor().getMessageTypes().get(67); + internal_static_google_cloud_migrationcenter_v1_ListReportConfigsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListReportConfigsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_migrationcenter_v1_ListReportConfigsResponse_descriptor = + getDescriptor().getMessageTypes().get(68); + internal_static_google_cloud_migrationcenter_v1_ListReportConfigsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ListReportConfigsResponse_descriptor, + new java.lang.String[] { + "ReportConfigs", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_migrationcenter_v1_CreateReportRequest_descriptor = + getDescriptor().getMessageTypes().get(69); + internal_static_google_cloud_migrationcenter_v1_CreateReportRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_CreateReportRequest_descriptor, + new java.lang.String[] { + "Parent", "ReportId", "Report", "RequestId", + }); + internal_static_google_cloud_migrationcenter_v1_Frames_descriptor = + getDescriptor().getMessageTypes().get(70); + internal_static_google_cloud_migrationcenter_v1_Frames_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Frames_descriptor, + new java.lang.String[] { + "FramesData", + }); + internal_static_google_cloud_migrationcenter_v1_AssetFrame_descriptor = + getDescriptor().getMessageTypes().get(71); + internal_static_google_cloud_migrationcenter_v1_AssetFrame_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AssetFrame_descriptor, + new java.lang.String[] { + "MachineDetails", + "ReportTime", + "Labels", + "Attributes", + "PerformanceSamples", + "TraceToken", + "FrameData", + }); + internal_static_google_cloud_migrationcenter_v1_AssetFrame_LabelsEntry_descriptor = + internal_static_google_cloud_migrationcenter_v1_AssetFrame_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_AssetFrame_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AssetFrame_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_migrationcenter_v1_AssetFrame_AttributesEntry_descriptor = + internal_static_google_cloud_migrationcenter_v1_AssetFrame_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_migrationcenter_v1_AssetFrame_AttributesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AssetFrame_AttributesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_migrationcenter_v1_MachineDetails_descriptor = + getDescriptor().getMessageTypes().get(72); + internal_static_google_cloud_migrationcenter_v1_MachineDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_MachineDetails_descriptor, + new java.lang.String[] { + "Uuid", + "MachineName", + "CreateTime", + "CoreCount", + "MemoryMb", + "PowerState", + "Architecture", + "GuestOs", + "Network", + "Disks", + "Platform", + }); + internal_static_google_cloud_migrationcenter_v1_MachineArchitectureDetails_descriptor = + getDescriptor().getMessageTypes().get(73); + internal_static_google_cloud_migrationcenter_v1_MachineArchitectureDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_MachineArchitectureDetails_descriptor, + new java.lang.String[] { + "CpuArchitecture", + "CpuName", + "Vendor", + "CpuThreadCount", + "CpuSocketCount", + "Bios", + "FirmwareType", + "Hyperthreading", + }); + internal_static_google_cloud_migrationcenter_v1_BiosDetails_descriptor = + getDescriptor().getMessageTypes().get(74); + internal_static_google_cloud_migrationcenter_v1_BiosDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_BiosDetails_descriptor, + new java.lang.String[] { + "BiosName", "Id", "Manufacturer", "Version", "ReleaseDate", "SmbiosUuid", + }); + internal_static_google_cloud_migrationcenter_v1_MachineNetworkDetails_descriptor = + getDescriptor().getMessageTypes().get(75); + internal_static_google_cloud_migrationcenter_v1_MachineNetworkDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_MachineNetworkDetails_descriptor, + new java.lang.String[] { + "PrimaryIpAddress", "PublicIpAddress", "PrimaryMacAddress", "Adapters", + }); + internal_static_google_cloud_migrationcenter_v1_NetworkAdapterList_descriptor = + getDescriptor().getMessageTypes().get(76); + internal_static_google_cloud_migrationcenter_v1_NetworkAdapterList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_NetworkAdapterList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_NetworkAdapterDetails_descriptor = + getDescriptor().getMessageTypes().get(77); + internal_static_google_cloud_migrationcenter_v1_NetworkAdapterDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_NetworkAdapterDetails_descriptor, + new java.lang.String[] { + "AdapterType", "MacAddress", "Addresses", + }); + internal_static_google_cloud_migrationcenter_v1_NetworkAddressList_descriptor = + getDescriptor().getMessageTypes().get(78); + internal_static_google_cloud_migrationcenter_v1_NetworkAddressList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_NetworkAddressList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_NetworkAddress_descriptor = + getDescriptor().getMessageTypes().get(79); + internal_static_google_cloud_migrationcenter_v1_NetworkAddress_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_NetworkAddress_descriptor, + new java.lang.String[] { + "IpAddress", "SubnetMask", "Bcast", "Fqdn", "Assignment", + }); + internal_static_google_cloud_migrationcenter_v1_MachineDiskDetails_descriptor = + getDescriptor().getMessageTypes().get(80); + internal_static_google_cloud_migrationcenter_v1_MachineDiskDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_MachineDiskDetails_descriptor, + new java.lang.String[] { + "TotalCapacityBytes", "TotalFreeBytes", "Disks", + }); + internal_static_google_cloud_migrationcenter_v1_DiskEntryList_descriptor = + getDescriptor().getMessageTypes().get(81); + internal_static_google_cloud_migrationcenter_v1_DiskEntryList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DiskEntryList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_DiskEntry_descriptor = + getDescriptor().getMessageTypes().get(82); + internal_static_google_cloud_migrationcenter_v1_DiskEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DiskEntry_descriptor, + new java.lang.String[] { + "CapacityBytes", + "FreeBytes", + "DiskLabel", + "DiskLabelType", + "InterfaceType", + "Partitions", + "HwAddress", + "Vmware", + "PlatformSpecific", + }); + internal_static_google_cloud_migrationcenter_v1_DiskPartitionList_descriptor = + getDescriptor().getMessageTypes().get(83); + internal_static_google_cloud_migrationcenter_v1_DiskPartitionList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DiskPartitionList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_DiskPartition_descriptor = + getDescriptor().getMessageTypes().get(84); + internal_static_google_cloud_migrationcenter_v1_DiskPartition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DiskPartition_descriptor, + new java.lang.String[] { + "Type", + "FileSystem", + "MountPoint", + "CapacityBytes", + "FreeBytes", + "Uuid", + "SubPartitions", + }); + internal_static_google_cloud_migrationcenter_v1_VmwareDiskConfig_descriptor = + getDescriptor().getMessageTypes().get(85); + internal_static_google_cloud_migrationcenter_v1_VmwareDiskConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_VmwareDiskConfig_descriptor, + new java.lang.String[] { + "BackingType", "Shared", "VmdkMode", "RdmCompatibility", + }); + internal_static_google_cloud_migrationcenter_v1_GuestOsDetails_descriptor = + getDescriptor().getMessageTypes().get(86); + internal_static_google_cloud_migrationcenter_v1_GuestOsDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GuestOsDetails_descriptor, + new java.lang.String[] { + "OsName", "Family", "Version", "Config", "Runtime", + }); + internal_static_google_cloud_migrationcenter_v1_GuestConfigDetails_descriptor = + getDescriptor().getMessageTypes().get(87); + internal_static_google_cloud_migrationcenter_v1_GuestConfigDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GuestConfigDetails_descriptor, + new java.lang.String[] { + "Issue", "Fstab", "Hosts", "NfsExports", "SelinuxMode", + }); + internal_static_google_cloud_migrationcenter_v1_FstabEntryList_descriptor = + getDescriptor().getMessageTypes().get(88); + internal_static_google_cloud_migrationcenter_v1_FstabEntryList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_FstabEntryList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_FstabEntry_descriptor = + getDescriptor().getMessageTypes().get(89); + internal_static_google_cloud_migrationcenter_v1_FstabEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_FstabEntry_descriptor, + new java.lang.String[] { + "Spec", "File", "Vfstype", "Mntops", "Freq", "Passno", + }); + internal_static_google_cloud_migrationcenter_v1_HostsEntryList_descriptor = + getDescriptor().getMessageTypes().get(90); + internal_static_google_cloud_migrationcenter_v1_HostsEntryList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_HostsEntryList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_HostsEntry_descriptor = + getDescriptor().getMessageTypes().get(91); + internal_static_google_cloud_migrationcenter_v1_HostsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_HostsEntry_descriptor, + new java.lang.String[] { + "Ip", "HostNames", + }); + internal_static_google_cloud_migrationcenter_v1_NfsExportList_descriptor = + getDescriptor().getMessageTypes().get(92); + internal_static_google_cloud_migrationcenter_v1_NfsExportList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_NfsExportList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_NfsExport_descriptor = + getDescriptor().getMessageTypes().get(93); + internal_static_google_cloud_migrationcenter_v1_NfsExport_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_NfsExport_descriptor, + new java.lang.String[] { + "ExportDirectory", "Hosts", + }); + internal_static_google_cloud_migrationcenter_v1_GuestRuntimeDetails_descriptor = + getDescriptor().getMessageTypes().get(94); + internal_static_google_cloud_migrationcenter_v1_GuestRuntimeDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GuestRuntimeDetails_descriptor, + new java.lang.String[] { + "Services", + "Processes", + "Network", + "LastBootTime", + "Domain", + "MachineName", + "InstalledApps", + "OpenFileList", + }); + internal_static_google_cloud_migrationcenter_v1_RunningServiceList_descriptor = + getDescriptor().getMessageTypes().get(95); + internal_static_google_cloud_migrationcenter_v1_RunningServiceList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_RunningServiceList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_RunningService_descriptor = + getDescriptor().getMessageTypes().get(96); + internal_static_google_cloud_migrationcenter_v1_RunningService_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_RunningService_descriptor, + new java.lang.String[] { + "ServiceName", "State", "StartMode", "ExePath", "Cmdline", "Pid", + }); + internal_static_google_cloud_migrationcenter_v1_RunningProcessList_descriptor = + getDescriptor().getMessageTypes().get(97); + internal_static_google_cloud_migrationcenter_v1_RunningProcessList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_RunningProcessList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_RunningProcess_descriptor = + getDescriptor().getMessageTypes().get(98); + internal_static_google_cloud_migrationcenter_v1_RunningProcess_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_RunningProcess_descriptor, + new java.lang.String[] { + "Pid", "ExePath", "Cmdline", "User", "Attributes", + }); + internal_static_google_cloud_migrationcenter_v1_RunningProcess_AttributesEntry_descriptor = + internal_static_google_cloud_migrationcenter_v1_RunningProcess_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_RunningProcess_AttributesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_RunningProcess_AttributesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_migrationcenter_v1_RuntimeNetworkInfo_descriptor = + getDescriptor().getMessageTypes().get(99); + internal_static_google_cloud_migrationcenter_v1_RuntimeNetworkInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_RuntimeNetworkInfo_descriptor, + new java.lang.String[] { + "ScanTime", "Connections", + }); + internal_static_google_cloud_migrationcenter_v1_NetworkConnectionList_descriptor = + getDescriptor().getMessageTypes().get(100); + internal_static_google_cloud_migrationcenter_v1_NetworkConnectionList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_NetworkConnectionList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_NetworkConnection_descriptor = + getDescriptor().getMessageTypes().get(101); + internal_static_google_cloud_migrationcenter_v1_NetworkConnection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_NetworkConnection_descriptor, + new java.lang.String[] { + "Protocol", + "LocalIpAddress", + "LocalPort", + "RemoteIpAddress", + "RemotePort", + "State", + "Pid", + "ProcessName", + }); + internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplicationList_descriptor = + getDescriptor().getMessageTypes().get(102); + internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplicationList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplicationList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplication_descriptor = + getDescriptor().getMessageTypes().get(103); + internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplication_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GuestInstalledApplication_descriptor, + new java.lang.String[] { + "ApplicationName", "Vendor", "InstallTime", "Path", "Version", + }); + internal_static_google_cloud_migrationcenter_v1_OpenFileList_descriptor = + getDescriptor().getMessageTypes().get(104); + internal_static_google_cloud_migrationcenter_v1_OpenFileList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_OpenFileList_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_migrationcenter_v1_OpenFileDetails_descriptor = + getDescriptor().getMessageTypes().get(105); + internal_static_google_cloud_migrationcenter_v1_OpenFileDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_OpenFileDetails_descriptor, + new java.lang.String[] { + "Command", "User", "FileType", "FilePath", + }); + internal_static_google_cloud_migrationcenter_v1_PlatformDetails_descriptor = + getDescriptor().getMessageTypes().get(106); + internal_static_google_cloud_migrationcenter_v1_PlatformDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_PlatformDetails_descriptor, + new java.lang.String[] { + "VmwareDetails", + "AwsEc2Details", + "AzureVmDetails", + "GenericDetails", + "PhysicalDetails", + "VendorDetails", + }); + internal_static_google_cloud_migrationcenter_v1_VmwarePlatformDetails_descriptor = + getDescriptor().getMessageTypes().get(107); + internal_static_google_cloud_migrationcenter_v1_VmwarePlatformDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_VmwarePlatformDetails_descriptor, + new java.lang.String[] { + "VcenterVersion", "EsxVersion", "Osid", "VcenterFolder", "VcenterUri", "VcenterVmId", + }); + internal_static_google_cloud_migrationcenter_v1_AwsEc2PlatformDetails_descriptor = + getDescriptor().getMessageTypes().get(108); + internal_static_google_cloud_migrationcenter_v1_AwsEc2PlatformDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AwsEc2PlatformDetails_descriptor, + new java.lang.String[] { + "MachineTypeLabel", "Location", + }); + internal_static_google_cloud_migrationcenter_v1_AzureVmPlatformDetails_descriptor = + getDescriptor().getMessageTypes().get(109); + internal_static_google_cloud_migrationcenter_v1_AzureVmPlatformDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AzureVmPlatformDetails_descriptor, + new java.lang.String[] { + "MachineTypeLabel", "Location", "ProvisioningState", + }); + internal_static_google_cloud_migrationcenter_v1_GenericPlatformDetails_descriptor = + getDescriptor().getMessageTypes().get(110); + internal_static_google_cloud_migrationcenter_v1_GenericPlatformDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_GenericPlatformDetails_descriptor, + new java.lang.String[] { + "Location", + }); + internal_static_google_cloud_migrationcenter_v1_PhysicalPlatformDetails_descriptor = + getDescriptor().getMessageTypes().get(111); + internal_static_google_cloud_migrationcenter_v1_PhysicalPlatformDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_PhysicalPlatformDetails_descriptor, + new java.lang.String[] { + "Location", + }); + internal_static_google_cloud_migrationcenter_v1_MemoryUsageSample_descriptor = + getDescriptor().getMessageTypes().get(112); + internal_static_google_cloud_migrationcenter_v1_MemoryUsageSample_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_MemoryUsageSample_descriptor, + new java.lang.String[] { + "UtilizedPercentage", + }); + internal_static_google_cloud_migrationcenter_v1_CpuUsageSample_descriptor = + getDescriptor().getMessageTypes().get(113); + internal_static_google_cloud_migrationcenter_v1_CpuUsageSample_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_CpuUsageSample_descriptor, + new java.lang.String[] { + "UtilizedPercentage", + }); + internal_static_google_cloud_migrationcenter_v1_NetworkUsageSample_descriptor = + getDescriptor().getMessageTypes().get(114); + internal_static_google_cloud_migrationcenter_v1_NetworkUsageSample_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_NetworkUsageSample_descriptor, + new java.lang.String[] { + "AverageIngressBps", "AverageEgressBps", + }); + internal_static_google_cloud_migrationcenter_v1_DiskUsageSample_descriptor = + getDescriptor().getMessageTypes().get(115); + internal_static_google_cloud_migrationcenter_v1_DiskUsageSample_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DiskUsageSample_descriptor, + new java.lang.String[] { + "AverageIops", + }); + internal_static_google_cloud_migrationcenter_v1_PerformanceSample_descriptor = + getDescriptor().getMessageTypes().get(116); + internal_static_google_cloud_migrationcenter_v1_PerformanceSample_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_PerformanceSample_descriptor, + new java.lang.String[] { + "SampleTime", "Memory", "Cpu", "Network", "Disk", + }); + internal_static_google_cloud_migrationcenter_v1_AssetPerformanceData_descriptor = + getDescriptor().getMessageTypes().get(117); + internal_static_google_cloud_migrationcenter_v1_AssetPerformanceData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AssetPerformanceData_descriptor, + new java.lang.String[] { + "DailyResourceUsageAggregations", + }); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_descriptor = + getDescriptor().getMessageTypes().get(118); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_descriptor, + new java.lang.String[] { + "Date", "Cpu", "Memory", "Network", "Disk", + }); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Stats_descriptor = + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Stats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Stats_descriptor, + new java.lang.String[] { + "Average", "Median", "NinteyFifthPercentile", "Peak", + }); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_CPU_descriptor = + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_CPU_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_CPU_descriptor, + new java.lang.String[] { + "UtilizationPercentage", + }); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Memory_descriptor = + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Memory_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Memory_descriptor, + new java.lang.String[] { + "UtilizationPercentage", + }); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Network_descriptor = + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Network_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Network_descriptor, + new java.lang.String[] { + "IngressBps", "EgressBps", + }); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Disk_descriptor = + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Disk_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_DailyResourceUsageAggregation_Disk_descriptor, + new java.lang.String[] { + "Iops", + }); + internal_static_google_cloud_migrationcenter_v1_InsightList_descriptor = + getDescriptor().getMessageTypes().get(119); + internal_static_google_cloud_migrationcenter_v1_InsightList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_InsightList_descriptor, + new java.lang.String[] { + "Insights", "UpdateTime", + }); + internal_static_google_cloud_migrationcenter_v1_Insight_descriptor = + getDescriptor().getMessageTypes().get(120); + internal_static_google_cloud_migrationcenter_v1_Insight_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Insight_descriptor, + new java.lang.String[] { + "MigrationInsight", "Insight", + }); + internal_static_google_cloud_migrationcenter_v1_MigrationInsight_descriptor = + getDescriptor().getMessageTypes().get(121); + internal_static_google_cloud_migrationcenter_v1_MigrationInsight_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_MigrationInsight_descriptor, + new java.lang.String[] { + "Fit", "ComputeEngineTarget", "MigrationTarget", + }); + internal_static_google_cloud_migrationcenter_v1_ComputeEngineMigrationTarget_descriptor = + getDescriptor().getMessageTypes().get(122); + internal_static_google_cloud_migrationcenter_v1_ComputeEngineMigrationTarget_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ComputeEngineMigrationTarget_descriptor, + new java.lang.String[] { + "Shape", + }); + internal_static_google_cloud_migrationcenter_v1_FitDescriptor_descriptor = + getDescriptor().getMessageTypes().get(123); + internal_static_google_cloud_migrationcenter_v1_FitDescriptor_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_FitDescriptor_descriptor, + new java.lang.String[] { + "FitLevel", + }); + internal_static_google_cloud_migrationcenter_v1_ComputeEngineShapeDescriptor_descriptor = + getDescriptor().getMessageTypes().get(124); + internal_static_google_cloud_migrationcenter_v1_ComputeEngineShapeDescriptor_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ComputeEngineShapeDescriptor_descriptor, + new java.lang.String[] { + "MemoryMb", "PhysicalCoreCount", "LogicalCoreCount", "Series", "MachineType", + }); + internal_static_google_cloud_migrationcenter_v1_Aggregation_descriptor = + getDescriptor().getMessageTypes().get(125); + internal_static_google_cloud_migrationcenter_v1_Aggregation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Aggregation_descriptor, + new java.lang.String[] { + "Field", "Count", "Sum", "Histogram", "Frequency", "AggregationFunction", + }); + internal_static_google_cloud_migrationcenter_v1_Aggregation_Count_descriptor = + internal_static_google_cloud_migrationcenter_v1_Aggregation_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_Aggregation_Count_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Aggregation_Count_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_migrationcenter_v1_Aggregation_Sum_descriptor = + internal_static_google_cloud_migrationcenter_v1_Aggregation_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_migrationcenter_v1_Aggregation_Sum_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Aggregation_Sum_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_migrationcenter_v1_Aggregation_Histogram_descriptor = + internal_static_google_cloud_migrationcenter_v1_Aggregation_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_migrationcenter_v1_Aggregation_Histogram_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Aggregation_Histogram_descriptor, + new java.lang.String[] { + "LowerBounds", + }); + internal_static_google_cloud_migrationcenter_v1_Aggregation_Frequency_descriptor = + internal_static_google_cloud_migrationcenter_v1_Aggregation_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_migrationcenter_v1_Aggregation_Frequency_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Aggregation_Frequency_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_descriptor = + getDescriptor().getMessageTypes().get(126); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AggregationResult_descriptor, + new java.lang.String[] { + "Field", "Count", "Sum", "Histogram", "Frequency", "Result", + }); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Count_descriptor = + internal_static_google_cloud_migrationcenter_v1_AggregationResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Count_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Count_descriptor, + new java.lang.String[] { + "Value", + }); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Sum_descriptor = + internal_static_google_cloud_migrationcenter_v1_AggregationResult_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Sum_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Sum_descriptor, + new java.lang.String[] { + "Value", + }); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_descriptor = + internal_static_google_cloud_migrationcenter_v1_AggregationResult_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_descriptor, + new java.lang.String[] { + "Buckets", + }); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_Bucket_descriptor = + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_Bucket_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Histogram_Bucket_descriptor, + new java.lang.String[] { + "LowerBound", "UpperBound", "Count", + }); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_descriptor = + internal_static_google_cloud_migrationcenter_v1_AggregationResult_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_ValuesEntry_descriptor = + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_ValuesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AggregationResult_Frequency_ValuesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_migrationcenter_v1_FileValidationReport_descriptor = + getDescriptor().getMessageTypes().get(127); + internal_static_google_cloud_migrationcenter_v1_FileValidationReport_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_FileValidationReport_descriptor, + new java.lang.String[] { + "FileName", "RowErrors", "PartialReport", "FileErrors", + }); + internal_static_google_cloud_migrationcenter_v1_ValidationReport_descriptor = + getDescriptor().getMessageTypes().get(128); + internal_static_google_cloud_migrationcenter_v1_ValidationReport_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ValidationReport_descriptor, + new java.lang.String[] { + "FileValidations", "JobErrors", + }); + internal_static_google_cloud_migrationcenter_v1_ExecutionReport_descriptor = + getDescriptor().getMessageTypes().get(129); + internal_static_google_cloud_migrationcenter_v1_ExecutionReport_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ExecutionReport_descriptor, + new java.lang.String[] { + "FramesReported", "ExecutionErrors", "TotalRowsCount", + }); + internal_static_google_cloud_migrationcenter_v1_ImportError_descriptor = + getDescriptor().getMessageTypes().get(130); + internal_static_google_cloud_migrationcenter_v1_ImportError_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ImportError_descriptor, + new java.lang.String[] { + "ErrorDetails", "Severity", + }); + internal_static_google_cloud_migrationcenter_v1_ImportRowError_descriptor = + getDescriptor().getMessageTypes().get(131); + internal_static_google_cloud_migrationcenter_v1_ImportRowError_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ImportRowError_descriptor, + new java.lang.String[] { + "RowNumber", "VmName", "VmUuid", "Errors", + }); + internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_descriptor = + getDescriptor().getMessageTypes().get(132); + internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_descriptor, + new java.lang.String[] { + "SignedUri", "Headers", "UriExpirationTime", + }); + internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_HeadersEntry_descriptor = + internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_HeadersEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_HeadersEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_migrationcenter_v1_AssetList_descriptor = + getDescriptor().getMessageTypes().get(133); + internal_static_google_cloud_migrationcenter_v1_AssetList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_AssetList_descriptor, + new java.lang.String[] { + "AssetIds", + }); + internal_static_google_cloud_migrationcenter_v1_FrameViolationEntry_descriptor = + getDescriptor().getMessageTypes().get(134); + internal_static_google_cloud_migrationcenter_v1_FrameViolationEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_FrameViolationEntry_descriptor, + new java.lang.String[] { + "Field", "Violation", + }); + internal_static_google_cloud_migrationcenter_v1_VirtualMachinePreferences_descriptor = + getDescriptor().getMessageTypes().get(135); + internal_static_google_cloud_migrationcenter_v1_VirtualMachinePreferences_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_VirtualMachinePreferences_descriptor, + new java.lang.String[] { + "RegionPreferences", + "CommitmentPlan", + "SizingOptimizationStrategy", + "ComputeEnginePreferences", + }); + internal_static_google_cloud_migrationcenter_v1_ComputeEnginePreferences_descriptor = + getDescriptor().getMessageTypes().get(136); + internal_static_google_cloud_migrationcenter_v1_ComputeEnginePreferences_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ComputeEnginePreferences_descriptor, + new java.lang.String[] { + "MachinePreferences", "LicenseType", + }); + internal_static_google_cloud_migrationcenter_v1_MachinePreferences_descriptor = + getDescriptor().getMessageTypes().get(137); + internal_static_google_cloud_migrationcenter_v1_MachinePreferences_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_MachinePreferences_descriptor, + new java.lang.String[] { + "AllowedMachineSeries", + }); + internal_static_google_cloud_migrationcenter_v1_MachineSeries_descriptor = + getDescriptor().getMessageTypes().get(138); + internal_static_google_cloud_migrationcenter_v1_MachineSeries_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_MachineSeries_descriptor, + new java.lang.String[] { + "Code", + }); + internal_static_google_cloud_migrationcenter_v1_RegionPreferences_descriptor = + getDescriptor().getMessageTypes().get(139); + internal_static_google_cloud_migrationcenter_v1_RegionPreferences_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_RegionPreferences_descriptor, + new java.lang.String[] { + "PreferredRegions", + }); + internal_static_google_cloud_migrationcenter_v1_Settings_descriptor = + getDescriptor().getMessageTypes().get(140); + internal_static_google_cloud_migrationcenter_v1_Settings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_Settings_descriptor, + new java.lang.String[] { + "Name", "PreferenceSet", + }); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor = + getDescriptor().getMessageTypes().get(141); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor, + new java.lang.String[] { + "AllAssetsStats", "GroupFindings", + }); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_descriptor = + internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_descriptor, + new java.lang.String[] { + "DataPoints", + }); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_DataPoint_descriptor = + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_DataPoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_DataPoint_descriptor, + new java.lang.String[] { + "Label", "Value", + }); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_UtilizationChartData_descriptor = + internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_UtilizationChartData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportSummary_UtilizationChartData_descriptor, + new java.lang.String[] { + "Used", "Free", + }); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_descriptor = + internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_descriptor, + new java.lang.String[] { + "Buckets", + }); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_Bucket_descriptor = + internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_Bucket_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_Bucket_descriptor, + new java.lang.String[] { + "LowerBound", "UpperBound", "Count", + }); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_AssetAggregateStats_descriptor = + internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_AssetAggregateStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportSummary_AssetAggregateStats_descriptor, + new java.lang.String[] { + "TotalMemoryBytes", + "TotalStorageBytes", + "TotalCores", + "TotalAssets", + "MemoryUtilizationChart", + "StorageUtilizationChart", + "OperatingSystem", + "CoreCountHistogram", + "MemoryBytesHistogram", + "StorageBytesHistogram", + }); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_MachineSeriesAllocation_descriptor = + internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_MachineSeriesAllocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportSummary_MachineSeriesAllocation_descriptor, + new java.lang.String[] { + "MachineSeries", "AllocatedAssetCount", + }); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ComputeEngineFinding_descriptor = + internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ComputeEngineFinding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportSummary_ComputeEngineFinding_descriptor, + new java.lang.String[] { + "AllocatedRegions", + "AllocatedAssetCount", + "MachineSeriesAllocations", + "AllocatedDiskTypes", + }); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupPreferenceSetFinding_descriptor = + internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor + .getNestedTypes() + .get(6); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupPreferenceSetFinding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupPreferenceSetFinding_descriptor, + new java.lang.String[] { + "DisplayName", + "Description", + "MachinePreferences", + "MonthlyCostTotal", + "MonthlyCostCompute", + "MonthlyCostOsLicense", + "MonthlyCostNetworkEgress", + "MonthlyCostStorage", + "MonthlyCostOther", + "ComputeEngineFinding", + }); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupFinding_descriptor = + internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor + .getNestedTypes() + .get(7); + internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupFinding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupFinding_descriptor, + new java.lang.String[] { + "DisplayName", + "Description", + "AssetAggregateStats", + "OverlappingAssetCount", + "PreferenceSetFindings", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + com.google.type.MoneyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationInsight.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationInsight.java new file mode 100644 index 000000000000..609f250f6d4f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationInsight.java @@ -0,0 +1,1159 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * An insight about potential migrations for an asset.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MigrationInsight} + */ +public final class MigrationInsight extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.MigrationInsight) + MigrationInsightOrBuilder { + private static final long serialVersionUID = 0L; + // Use MigrationInsight.newBuilder() to construct. + private MigrationInsight(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MigrationInsight() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MigrationInsight(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MigrationInsight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MigrationInsight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MigrationInsight.class, + com.google.cloud.migrationcenter.v1.MigrationInsight.Builder.class); + } + + private int migrationTargetCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object migrationTarget_; + + public enum MigrationTargetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + COMPUTE_ENGINE_TARGET(10), + MIGRATIONTARGET_NOT_SET(0); + private final int value; + + private MigrationTargetCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MigrationTargetCase valueOf(int value) { + return forNumber(value); + } + + public static MigrationTargetCase forNumber(int value) { + switch (value) { + case 10: + return COMPUTE_ENGINE_TARGET; + case 0: + return MIGRATIONTARGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MigrationTargetCase getMigrationTargetCase() { + return MigrationTargetCase.forNumber(migrationTargetCase_); + } + + public static final int FIT_FIELD_NUMBER = 1; + private com.google.cloud.migrationcenter.v1.FitDescriptor fit_; + /** + * + * + *
+   * Output only. Description of how well the asset this insight is associated
+   * with fits the proposed migration.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the fit field is set. + */ + @java.lang.Override + public boolean hasFit() { + return fit_ != null; + } + /** + * + * + *
+   * Output only. Description of how well the asset this insight is associated
+   * with fits the proposed migration.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fit. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FitDescriptor getFit() { + return fit_ == null + ? com.google.cloud.migrationcenter.v1.FitDescriptor.getDefaultInstance() + : fit_; + } + /** + * + * + *
+   * Output only. Description of how well the asset this insight is associated
+   * with fits the proposed migration.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FitDescriptorOrBuilder getFitOrBuilder() { + return fit_ == null + ? com.google.cloud.migrationcenter.v1.FitDescriptor.getDefaultInstance() + : fit_; + } + + public static final int COMPUTE_ENGINE_TARGET_FIELD_NUMBER = 10; + /** + * + * + *
+   * Output only. A Google Compute Engine target.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the computeEngineTarget field is set. + */ + @java.lang.Override + public boolean hasComputeEngineTarget() { + return migrationTargetCase_ == 10; + } + /** + * + * + *
+   * Output only. A Google Compute Engine target.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The computeEngineTarget. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget getComputeEngineTarget() { + if (migrationTargetCase_ == 10) { + return (com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) migrationTarget_; + } + return com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. A Google Compute Engine target.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTargetOrBuilder + getComputeEngineTargetOrBuilder() { + if (migrationTargetCase_ == 10) { + return (com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) migrationTarget_; + } + return com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (fit_ != null) { + output.writeMessage(1, getFit()); + } + if (migrationTargetCase_ == 10) { + output.writeMessage( + 10, (com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) migrationTarget_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fit_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFit()); + } + if (migrationTargetCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, + (com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) migrationTarget_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.MigrationInsight)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.MigrationInsight other = + (com.google.cloud.migrationcenter.v1.MigrationInsight) obj; + + if (hasFit() != other.hasFit()) return false; + if (hasFit()) { + if (!getFit().equals(other.getFit())) return false; + } + if (!getMigrationTargetCase().equals(other.getMigrationTargetCase())) return false; + switch (migrationTargetCase_) { + case 10: + if (!getComputeEngineTarget().equals(other.getComputeEngineTarget())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFit()) { + hash = (37 * hash) + FIT_FIELD_NUMBER; + hash = (53 * hash) + getFit().hashCode(); + } + switch (migrationTargetCase_) { + case 10: + hash = (37 * hash) + COMPUTE_ENGINE_TARGET_FIELD_NUMBER; + hash = (53 * hash) + getComputeEngineTarget().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.MigrationInsight prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An insight about potential migrations for an asset.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.MigrationInsight} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.MigrationInsight) + com.google.cloud.migrationcenter.v1.MigrationInsightOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MigrationInsight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MigrationInsight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.MigrationInsight.class, + com.google.cloud.migrationcenter.v1.MigrationInsight.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.MigrationInsight.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fit_ = null; + if (fitBuilder_ != null) { + fitBuilder_.dispose(); + fitBuilder_ = null; + } + if (computeEngineTargetBuilder_ != null) { + computeEngineTargetBuilder_.clear(); + } + migrationTargetCase_ = 0; + migrationTarget_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_MigrationInsight_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MigrationInsight getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.MigrationInsight.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MigrationInsight build() { + com.google.cloud.migrationcenter.v1.MigrationInsight result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MigrationInsight buildPartial() { + com.google.cloud.migrationcenter.v1.MigrationInsight result = + new com.google.cloud.migrationcenter.v1.MigrationInsight(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.MigrationInsight result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fit_ = fitBuilder_ == null ? fit_ : fitBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.cloud.migrationcenter.v1.MigrationInsight result) { + result.migrationTargetCase_ = migrationTargetCase_; + result.migrationTarget_ = this.migrationTarget_; + if (migrationTargetCase_ == 10 && computeEngineTargetBuilder_ != null) { + result.migrationTarget_ = computeEngineTargetBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.MigrationInsight) { + return mergeFrom((com.google.cloud.migrationcenter.v1.MigrationInsight) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.MigrationInsight other) { + if (other == com.google.cloud.migrationcenter.v1.MigrationInsight.getDefaultInstance()) + return this; + if (other.hasFit()) { + mergeFit(other.getFit()); + } + switch (other.getMigrationTargetCase()) { + case COMPUTE_ENGINE_TARGET: + { + mergeComputeEngineTarget(other.getComputeEngineTarget()); + break; + } + case MIGRATIONTARGET_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFitFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 82: + { + input.readMessage( + getComputeEngineTargetFieldBuilder().getBuilder(), extensionRegistry); + migrationTargetCase_ = 10; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int migrationTargetCase_ = 0; + private java.lang.Object migrationTarget_; + + public MigrationTargetCase getMigrationTargetCase() { + return MigrationTargetCase.forNumber(migrationTargetCase_); + } + + public Builder clearMigrationTarget() { + migrationTargetCase_ = 0; + migrationTarget_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.cloud.migrationcenter.v1.FitDescriptor fit_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FitDescriptor, + com.google.cloud.migrationcenter.v1.FitDescriptor.Builder, + com.google.cloud.migrationcenter.v1.FitDescriptorOrBuilder> + fitBuilder_; + /** + * + * + *
+     * Output only. Description of how well the asset this insight is associated
+     * with fits the proposed migration.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the fit field is set. + */ + public boolean hasFit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Output only. Description of how well the asset this insight is associated
+     * with fits the proposed migration.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fit. + */ + public com.google.cloud.migrationcenter.v1.FitDescriptor getFit() { + if (fitBuilder_ == null) { + return fit_ == null + ? com.google.cloud.migrationcenter.v1.FitDescriptor.getDefaultInstance() + : fit_; + } else { + return fitBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Description of how well the asset this insight is associated
+     * with fits the proposed migration.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFit(com.google.cloud.migrationcenter.v1.FitDescriptor value) { + if (fitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fit_ = value; + } else { + fitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Description of how well the asset this insight is associated
+     * with fits the proposed migration.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFit( + com.google.cloud.migrationcenter.v1.FitDescriptor.Builder builderForValue) { + if (fitBuilder_ == null) { + fit_ = builderForValue.build(); + } else { + fitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Description of how well the asset this insight is associated
+     * with fits the proposed migration.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeFit(com.google.cloud.migrationcenter.v1.FitDescriptor value) { + if (fitBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && fit_ != null + && fit_ != com.google.cloud.migrationcenter.v1.FitDescriptor.getDefaultInstance()) { + getFitBuilder().mergeFrom(value); + } else { + fit_ = value; + } + } else { + fitBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Description of how well the asset this insight is associated
+     * with fits the proposed migration.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearFit() { + bitField0_ = (bitField0_ & ~0x00000001); + fit_ = null; + if (fitBuilder_ != null) { + fitBuilder_.dispose(); + fitBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Description of how well the asset this insight is associated
+     * with fits the proposed migration.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.FitDescriptor.Builder getFitBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Description of how well the asset this insight is associated
+     * with fits the proposed migration.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.FitDescriptorOrBuilder getFitOrBuilder() { + if (fitBuilder_ != null) { + return fitBuilder_.getMessageOrBuilder(); + } else { + return fit_ == null + ? com.google.cloud.migrationcenter.v1.FitDescriptor.getDefaultInstance() + : fit_; + } + } + /** + * + * + *
+     * Output only. Description of how well the asset this insight is associated
+     * with fits the proposed migration.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FitDescriptor, + com.google.cloud.migrationcenter.v1.FitDescriptor.Builder, + com.google.cloud.migrationcenter.v1.FitDescriptorOrBuilder> + getFitFieldBuilder() { + if (fitBuilder_ == null) { + fitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FitDescriptor, + com.google.cloud.migrationcenter.v1.FitDescriptor.Builder, + com.google.cloud.migrationcenter.v1.FitDescriptorOrBuilder>( + getFit(), getParentForChildren(), isClean()); + fit_ = null; + } + return fitBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget, + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.Builder, + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTargetOrBuilder> + computeEngineTargetBuilder_; + /** + * + * + *
+     * Output only. A Google Compute Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the computeEngineTarget field is set. + */ + @java.lang.Override + public boolean hasComputeEngineTarget() { + return migrationTargetCase_ == 10; + } + /** + * + * + *
+     * Output only. A Google Compute Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The computeEngineTarget. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget + getComputeEngineTarget() { + if (computeEngineTargetBuilder_ == null) { + if (migrationTargetCase_ == 10) { + return (com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) + migrationTarget_; + } + return com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget + .getDefaultInstance(); + } else { + if (migrationTargetCase_ == 10) { + return computeEngineTargetBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. A Google Compute Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setComputeEngineTarget( + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget value) { + if (computeEngineTargetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + migrationTarget_ = value; + onChanged(); + } else { + computeEngineTargetBuilder_.setMessage(value); + } + migrationTargetCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. A Google Compute Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setComputeEngineTarget( + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.Builder builderForValue) { + if (computeEngineTargetBuilder_ == null) { + migrationTarget_ = builderForValue.build(); + onChanged(); + } else { + computeEngineTargetBuilder_.setMessage(builderForValue.build()); + } + migrationTargetCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. A Google Compute Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeComputeEngineTarget( + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget value) { + if (computeEngineTargetBuilder_ == null) { + if (migrationTargetCase_ == 10 + && migrationTarget_ + != com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget + .getDefaultInstance()) { + migrationTarget_ = + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.newBuilder( + (com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) + migrationTarget_) + .mergeFrom(value) + .buildPartial(); + } else { + migrationTarget_ = value; + } + onChanged(); + } else { + if (migrationTargetCase_ == 10) { + computeEngineTargetBuilder_.mergeFrom(value); + } else { + computeEngineTargetBuilder_.setMessage(value); + } + } + migrationTargetCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. A Google Compute Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearComputeEngineTarget() { + if (computeEngineTargetBuilder_ == null) { + if (migrationTargetCase_ == 10) { + migrationTargetCase_ = 0; + migrationTarget_ = null; + onChanged(); + } + } else { + if (migrationTargetCase_ == 10) { + migrationTargetCase_ = 0; + migrationTarget_ = null; + } + computeEngineTargetBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. A Google Compute Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.Builder + getComputeEngineTargetBuilder() { + return getComputeEngineTargetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. A Google Compute Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTargetOrBuilder + getComputeEngineTargetOrBuilder() { + if ((migrationTargetCase_ == 10) && (computeEngineTargetBuilder_ != null)) { + return computeEngineTargetBuilder_.getMessageOrBuilder(); + } else { + if (migrationTargetCase_ == 10) { + return (com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) + migrationTarget_; + } + return com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. A Google Compute Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget, + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.Builder, + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTargetOrBuilder> + getComputeEngineTargetFieldBuilder() { + if (computeEngineTargetBuilder_ == null) { + if (!(migrationTargetCase_ == 10)) { + migrationTarget_ = + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.getDefaultInstance(); + } + computeEngineTargetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget, + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget.Builder, + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTargetOrBuilder>( + (com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget) migrationTarget_, + getParentForChildren(), + isClean()); + migrationTarget_ = null; + } + migrationTargetCase_ = 10; + onChanged(); + return computeEngineTargetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.MigrationInsight) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.MigrationInsight) + private static final com.google.cloud.migrationcenter.v1.MigrationInsight DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.MigrationInsight(); + } + + public static com.google.cloud.migrationcenter.v1.MigrationInsight getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MigrationInsight parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MigrationInsight getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationInsightOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationInsightOrBuilder.java new file mode 100644 index 000000000000..932b3abecb65 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/MigrationInsightOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface MigrationInsightOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.MigrationInsight) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Description of how well the asset this insight is associated
+   * with fits the proposed migration.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the fit field is set. + */ + boolean hasFit(); + /** + * + * + *
+   * Output only. Description of how well the asset this insight is associated
+   * with fits the proposed migration.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fit. + */ + com.google.cloud.migrationcenter.v1.FitDescriptor getFit(); + /** + * + * + *
+   * Output only. Description of how well the asset this insight is associated
+   * with fits the proposed migration.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.FitDescriptorOrBuilder getFitOrBuilder(); + + /** + * + * + *
+   * Output only. A Google Compute Engine target.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the computeEngineTarget field is set. + */ + boolean hasComputeEngineTarget(); + /** + * + * + *
+   * Output only. A Google Compute Engine target.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The computeEngineTarget. + */ + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget getComputeEngineTarget(); + /** + * + * + *
+   * Output only. A Google Compute Engine target.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.ComputeEngineMigrationTargetOrBuilder + getComputeEngineTargetOrBuilder(); + + com.google.cloud.migrationcenter.v1.MigrationInsight.MigrationTargetCase getMigrationTargetCase(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterDetails.java new file mode 100644 index 000000000000..e94a8452ae7e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterDetails.java @@ -0,0 +1,1073 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Details of network adapter.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkAdapterDetails} + */ +public final class NetworkAdapterDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.NetworkAdapterDetails) + NetworkAdapterDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkAdapterDetails.newBuilder() to construct. + private NetworkAdapterDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkAdapterDetails() { + adapterType_ = ""; + macAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkAdapterDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAdapterDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAdapterDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.class, + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.Builder.class); + } + + public static final int ADAPTER_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object adapterType_ = ""; + /** + * + * + *
+   * Network adapter type (e.g. VMXNET3).
+   * 
+ * + * string adapter_type = 1; + * + * @return The adapterType. + */ + @java.lang.Override + public java.lang.String getAdapterType() { + java.lang.Object ref = adapterType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + adapterType_ = s; + return s; + } + } + /** + * + * + *
+   * Network adapter type (e.g. VMXNET3).
+   * 
+ * + * string adapter_type = 1; + * + * @return The bytes for adapterType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdapterTypeBytes() { + java.lang.Object ref = adapterType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + adapterType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MAC_ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object macAddress_ = ""; + /** + * + * + *
+   * MAC address.
+   * 
+ * + * string mac_address = 2; + * + * @return The macAddress. + */ + @java.lang.Override + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + macAddress_ = s; + return s; + } + } + /** + * + * + *
+   * MAC address.
+   * 
+ * + * string mac_address = 2; + * + * @return The bytes for macAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESSES_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.NetworkAddressList addresses_; + /** + * + * + *
+   * NetworkAddressList
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + * + * @return Whether the addresses field is set. + */ + @java.lang.Override + public boolean hasAddresses() { + return addresses_ != null; + } + /** + * + * + *
+   * NetworkAddressList
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + * + * @return The addresses. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddressList getAddresses() { + return addresses_ == null + ? com.google.cloud.migrationcenter.v1.NetworkAddressList.getDefaultInstance() + : addresses_; + } + /** + * + * + *
+   * NetworkAddressList
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddressListOrBuilder getAddressesOrBuilder() { + return addresses_ == null + ? com.google.cloud.migrationcenter.v1.NetworkAddressList.getDefaultInstance() + : addresses_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(adapterType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, adapterType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(macAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, macAddress_); + } + if (addresses_ != null) { + output.writeMessage(3, getAddresses()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(adapterType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, adapterType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(macAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, macAddress_); + } + if (addresses_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAddresses()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.NetworkAdapterDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails other = + (com.google.cloud.migrationcenter.v1.NetworkAdapterDetails) obj; + + if (!getAdapterType().equals(other.getAdapterType())) return false; + if (!getMacAddress().equals(other.getMacAddress())) return false; + if (hasAddresses() != other.hasAddresses()) return false; + if (hasAddresses()) { + if (!getAddresses().equals(other.getAddresses())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADAPTER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAdapterType().hashCode(); + hash = (37 * hash) + MAC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getMacAddress().hashCode(); + if (hasAddresses()) { + hash = (37 * hash) + ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + getAddresses().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of network adapter.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkAdapterDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.NetworkAdapterDetails) + com.google.cloud.migrationcenter.v1.NetworkAdapterDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAdapterDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAdapterDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.class, + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + adapterType_ = ""; + macAddress_ = ""; + addresses_ = null; + if (addressesBuilder_ != null) { + addressesBuilder_.dispose(); + addressesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAdapterDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterDetails build() { + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterDetails buildPartial() { + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails result = + new com.google.cloud.migrationcenter.v1.NetworkAdapterDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.NetworkAdapterDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.adapterType_ = adapterType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.macAddress_ = macAddress_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.addresses_ = addressesBuilder_ == null ? addresses_ : addressesBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.NetworkAdapterDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.NetworkAdapterDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.NetworkAdapterDetails other) { + if (other == com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.getDefaultInstance()) + return this; + if (!other.getAdapterType().isEmpty()) { + adapterType_ = other.adapterType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMacAddress().isEmpty()) { + macAddress_ = other.macAddress_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAddresses()) { + mergeAddresses(other.getAddresses()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + adapterType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + macAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getAddressesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object adapterType_ = ""; + /** + * + * + *
+     * Network adapter type (e.g. VMXNET3).
+     * 
+ * + * string adapter_type = 1; + * + * @return The adapterType. + */ + public java.lang.String getAdapterType() { + java.lang.Object ref = adapterType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + adapterType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Network adapter type (e.g. VMXNET3).
+     * 
+ * + * string adapter_type = 1; + * + * @return The bytes for adapterType. + */ + public com.google.protobuf.ByteString getAdapterTypeBytes() { + java.lang.Object ref = adapterType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + adapterType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Network adapter type (e.g. VMXNET3).
+     * 
+ * + * string adapter_type = 1; + * + * @param value The adapterType to set. + * @return This builder for chaining. + */ + public Builder setAdapterType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + adapterType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Network adapter type (e.g. VMXNET3).
+     * 
+ * + * string adapter_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearAdapterType() { + adapterType_ = getDefaultInstance().getAdapterType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Network adapter type (e.g. VMXNET3).
+     * 
+ * + * string adapter_type = 1; + * + * @param value The bytes for adapterType to set. + * @return This builder for chaining. + */ + public Builder setAdapterTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + adapterType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object macAddress_ = ""; + /** + * + * + *
+     * MAC address.
+     * 
+ * + * string mac_address = 2; + * + * @return The macAddress. + */ + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + macAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * MAC address.
+     * 
+ * + * string mac_address = 2; + * + * @return The bytes for macAddress. + */ + public com.google.protobuf.ByteString getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * MAC address.
+     * 
+ * + * string mac_address = 2; + * + * @param value The macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + macAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * MAC address.
+     * 
+ * + * string mac_address = 2; + * + * @return This builder for chaining. + */ + public Builder clearMacAddress() { + macAddress_ = getDefaultInstance().getMacAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * MAC address.
+     * 
+ * + * string mac_address = 2; + * + * @param value The bytes for macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + macAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.NetworkAddressList addresses_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAddressList, + com.google.cloud.migrationcenter.v1.NetworkAddressList.Builder, + com.google.cloud.migrationcenter.v1.NetworkAddressListOrBuilder> + addressesBuilder_; + /** + * + * + *
+     * NetworkAddressList
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + * + * @return Whether the addresses field is set. + */ + public boolean hasAddresses() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * NetworkAddressList
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + * + * @return The addresses. + */ + public com.google.cloud.migrationcenter.v1.NetworkAddressList getAddresses() { + if (addressesBuilder_ == null) { + return addresses_ == null + ? com.google.cloud.migrationcenter.v1.NetworkAddressList.getDefaultInstance() + : addresses_; + } else { + return addressesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * NetworkAddressList
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + */ + public Builder setAddresses(com.google.cloud.migrationcenter.v1.NetworkAddressList value) { + if (addressesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + addresses_ = value; + } else { + addressesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * NetworkAddressList
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + */ + public Builder setAddresses( + com.google.cloud.migrationcenter.v1.NetworkAddressList.Builder builderForValue) { + if (addressesBuilder_ == null) { + addresses_ = builderForValue.build(); + } else { + addressesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * NetworkAddressList
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + */ + public Builder mergeAddresses(com.google.cloud.migrationcenter.v1.NetworkAddressList value) { + if (addressesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && addresses_ != null + && addresses_ + != com.google.cloud.migrationcenter.v1.NetworkAddressList.getDefaultInstance()) { + getAddressesBuilder().mergeFrom(value); + } else { + addresses_ = value; + } + } else { + addressesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * NetworkAddressList
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + */ + public Builder clearAddresses() { + bitField0_ = (bitField0_ & ~0x00000004); + addresses_ = null; + if (addressesBuilder_ != null) { + addressesBuilder_.dispose(); + addressesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * NetworkAddressList
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + */ + public com.google.cloud.migrationcenter.v1.NetworkAddressList.Builder getAddressesBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAddressesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * NetworkAddressList
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + */ + public com.google.cloud.migrationcenter.v1.NetworkAddressListOrBuilder getAddressesOrBuilder() { + if (addressesBuilder_ != null) { + return addressesBuilder_.getMessageOrBuilder(); + } else { + return addresses_ == null + ? com.google.cloud.migrationcenter.v1.NetworkAddressList.getDefaultInstance() + : addresses_; + } + } + /** + * + * + *
+     * NetworkAddressList
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAddressList, + com.google.cloud.migrationcenter.v1.NetworkAddressList.Builder, + com.google.cloud.migrationcenter.v1.NetworkAddressListOrBuilder> + getAddressesFieldBuilder() { + if (addressesBuilder_ == null) { + addressesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAddressList, + com.google.cloud.migrationcenter.v1.NetworkAddressList.Builder, + com.google.cloud.migrationcenter.v1.NetworkAddressListOrBuilder>( + getAddresses(), getParentForChildren(), isClean()); + addresses_ = null; + } + return addressesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.NetworkAdapterDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.NetworkAdapterDetails) + private static final com.google.cloud.migrationcenter.v1.NetworkAdapterDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.NetworkAdapterDetails(); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkAdapterDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterDetailsOrBuilder.java new file mode 100644 index 000000000000..5e57397b9b2a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterDetailsOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface NetworkAdapterDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.NetworkAdapterDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Network adapter type (e.g. VMXNET3).
+   * 
+ * + * string adapter_type = 1; + * + * @return The adapterType. + */ + java.lang.String getAdapterType(); + /** + * + * + *
+   * Network adapter type (e.g. VMXNET3).
+   * 
+ * + * string adapter_type = 1; + * + * @return The bytes for adapterType. + */ + com.google.protobuf.ByteString getAdapterTypeBytes(); + + /** + * + * + *
+   * MAC address.
+   * 
+ * + * string mac_address = 2; + * + * @return The macAddress. + */ + java.lang.String getMacAddress(); + /** + * + * + *
+   * MAC address.
+   * 
+ * + * string mac_address = 2; + * + * @return The bytes for macAddress. + */ + com.google.protobuf.ByteString getMacAddressBytes(); + + /** + * + * + *
+   * NetworkAddressList
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + * + * @return Whether the addresses field is set. + */ + boolean hasAddresses(); + /** + * + * + *
+   * NetworkAddressList
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + * + * @return The addresses. + */ + com.google.cloud.migrationcenter.v1.NetworkAddressList getAddresses(); + /** + * + * + *
+   * NetworkAddressList
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + */ + com.google.cloud.migrationcenter.v1.NetworkAddressListOrBuilder getAddressesOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterList.java new file mode 100644 index 000000000000..6d860c3ddc81 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterList.java @@ -0,0 +1,956 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * List of network adapters.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkAdapterList} + */ +public final class NetworkAdapterList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.NetworkAdapterList) + NetworkAdapterListOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkAdapterList.newBuilder() to construct. + private NetworkAdapterList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkAdapterList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkAdapterList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAdapterList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAdapterList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkAdapterList.class, + com.google.cloud.migrationcenter.v1.NetworkAdapterList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * Network adapter entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Network adapter entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.migrationcenter.v1.NetworkAdapterDetailsOrBuilder> + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Network adapter entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Network adapter entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterDetails getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Network adapter entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterDetailsOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.NetworkAdapterList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.NetworkAdapterList other = + (com.google.cloud.migrationcenter.v1.NetworkAdapterList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.NetworkAdapterList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List of network adapters.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkAdapterList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.NetworkAdapterList) + com.google.cloud.migrationcenter.v1.NetworkAdapterListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAdapterList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAdapterList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkAdapterList.class, + com.google.cloud.migrationcenter.v1.NetworkAdapterList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.NetworkAdapterList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAdapterList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.NetworkAdapterList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterList build() { + com.google.cloud.migrationcenter.v1.NetworkAdapterList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterList buildPartial() { + com.google.cloud.migrationcenter.v1.NetworkAdapterList result = + new com.google.cloud.migrationcenter.v1.NetworkAdapterList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.NetworkAdapterList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.NetworkAdapterList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.NetworkAdapterList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.NetworkAdapterList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.NetworkAdapterList other) { + if (other == com.google.cloud.migrationcenter.v1.NetworkAdapterList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails m = + input.readMessage( + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.parser(), + extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList( + entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails, + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.Builder, + com.google.cloud.migrationcenter.v1.NetworkAdapterDetailsOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public java.util.List + getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkAdapterDetails getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.NetworkAdapterDetails value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public Builder setEntries( + int index, + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.NetworkAdapterDetails value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.NetworkAdapterDetails value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public Builder addEntries( + int index, + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable + values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.Builder getEntriesBuilder( + int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkAdapterDetailsOrBuilder getEntriesOrBuilder( + int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public java.util.List< + ? extends com.google.cloud.migrationcenter.v1.NetworkAdapterDetailsOrBuilder> + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder( + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.getDefaultInstance()); + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.Builder addEntriesBuilder( + int index) { + return getEntriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.getDefaultInstance()); + } + /** + * + * + *
+     * Network adapter entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails, + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.Builder, + com.google.cloud.migrationcenter.v1.NetworkAdapterDetailsOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails, + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails.Builder, + com.google.cloud.migrationcenter.v1.NetworkAdapterDetailsOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.NetworkAdapterList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.NetworkAdapterList) + private static final com.google.cloud.migrationcenter.v1.NetworkAdapterList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.NetworkAdapterList(); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAdapterList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkAdapterList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAdapterList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterListOrBuilder.java new file mode 100644 index 000000000000..331eaec38de1 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAdapterListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface NetworkAdapterListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.NetworkAdapterList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Network adapter entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Network adapter entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + com.google.cloud.migrationcenter.v1.NetworkAdapterDetails getEntries(int index); + /** + * + * + *
+   * Network adapter entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Network adapter entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Network adapter entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + com.google.cloud.migrationcenter.v1.NetworkAdapterDetailsOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddress.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddress.java new file mode 100644 index 000000000000..3703712d32c9 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddress.java @@ -0,0 +1,1497 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Details of network address.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkAddress} + */ +public final class NetworkAddress extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.NetworkAddress) + NetworkAddressOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkAddress.newBuilder() to construct. + private NetworkAddress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkAddress() { + ipAddress_ = ""; + subnetMask_ = ""; + bcast_ = ""; + fqdn_ = ""; + assignment_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkAddress(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAddress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAddress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkAddress.class, + com.google.cloud.migrationcenter.v1.NetworkAddress.Builder.class); + } + + /** + * + * + *
+   * Network address assignment.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment} + */ + public enum AddressAssignment implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unknown (default value).
+     * 
+ * + * ADDRESS_ASSIGNMENT_UNSPECIFIED = 0; + */ + ADDRESS_ASSIGNMENT_UNSPECIFIED(0), + /** + * + * + *
+     * Staticly assigned IP.
+     * 
+ * + * ADDRESS_ASSIGNMENT_STATIC = 1; + */ + ADDRESS_ASSIGNMENT_STATIC(1), + /** + * + * + *
+     * Dynamically assigned IP (DHCP).
+     * 
+ * + * ADDRESS_ASSIGNMENT_DHCP = 2; + */ + ADDRESS_ASSIGNMENT_DHCP(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unknown (default value).
+     * 
+ * + * ADDRESS_ASSIGNMENT_UNSPECIFIED = 0; + */ + public static final int ADDRESS_ASSIGNMENT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Staticly assigned IP.
+     * 
+ * + * ADDRESS_ASSIGNMENT_STATIC = 1; + */ + public static final int ADDRESS_ASSIGNMENT_STATIC_VALUE = 1; + /** + * + * + *
+     * Dynamically assigned IP (DHCP).
+     * 
+ * + * ADDRESS_ASSIGNMENT_DHCP = 2; + */ + public static final int ADDRESS_ASSIGNMENT_DHCP_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AddressAssignment valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AddressAssignment forNumber(int value) { + switch (value) { + case 0: + return ADDRESS_ASSIGNMENT_UNSPECIFIED; + case 1: + return ADDRESS_ASSIGNMENT_STATIC; + case 2: + return ADDRESS_ASSIGNMENT_DHCP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AddressAssignment findValueByNumber(int number) { + return AddressAssignment.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.NetworkAddress.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AddressAssignment[] VALUES = values(); + + public static AddressAssignment valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AddressAssignment(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment) + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipAddress_ = ""; + /** + * + * + *
+   * Assigned or configured IP Address.
+   * 
+ * + * string ip_address = 1; + * + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } + } + /** + * + * + *
+   * Assigned or configured IP Address.
+   * 
+ * + * string ip_address = 1; + * + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNET_MASK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object subnetMask_ = ""; + /** + * + * + *
+   * Subnet mask.
+   * 
+ * + * string subnet_mask = 2; + * + * @return The subnetMask. + */ + @java.lang.Override + public java.lang.String getSubnetMask() { + java.lang.Object ref = subnetMask_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetMask_ = s; + return s; + } + } + /** + * + * + *
+   * Subnet mask.
+   * 
+ * + * string subnet_mask = 2; + * + * @return The bytes for subnetMask. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetMaskBytes() { + java.lang.Object ref = subnetMask_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetMask_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BCAST_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object bcast_ = ""; + /** + * + * + *
+   * Broadcast address.
+   * 
+ * + * string bcast = 3; + * + * @return The bcast. + */ + @java.lang.Override + public java.lang.String getBcast() { + java.lang.Object ref = bcast_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bcast_ = s; + return s; + } + } + /** + * + * + *
+   * Broadcast address.
+   * 
+ * + * string bcast = 3; + * + * @return The bytes for bcast. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBcastBytes() { + java.lang.Object ref = bcast_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bcast_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FQDN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object fqdn_ = ""; + /** + * + * + *
+   * Fully qualified domain name.
+   * 
+ * + * string fqdn = 4; + * + * @return The fqdn. + */ + @java.lang.Override + public java.lang.String getFqdn() { + java.lang.Object ref = fqdn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqdn_ = s; + return s; + } + } + /** + * + * + *
+   * Fully qualified domain name.
+   * 
+ * + * string fqdn = 4; + * + * @return The bytes for fqdn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFqdnBytes() { + java.lang.Object ref = fqdn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fqdn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSIGNMENT_FIELD_NUMBER = 5; + private int assignment_ = 0; + /** + * + * + *
+   * Whether DHCP is used to assign addresses.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + * + * @return The enum numeric value on the wire for assignment. + */ + @java.lang.Override + public int getAssignmentValue() { + return assignment_; + } + /** + * + * + *
+   * Whether DHCP is used to assign addresses.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + * + * @return The assignment. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment getAssignment() { + com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment result = + com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment.forNumber(assignment_); + return result == null + ? com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetMask_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subnetMask_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bcast_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, bcast_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqdn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, fqdn_); + } + if (assignment_ + != com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment + .ADDRESS_ASSIGNMENT_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, assignment_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetMask_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subnetMask_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bcast_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, bcast_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqdn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, fqdn_); + } + if (assignment_ + != com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment + .ADDRESS_ASSIGNMENT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, assignment_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.NetworkAddress)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.NetworkAddress other = + (com.google.cloud.migrationcenter.v1.NetworkAddress) obj; + + if (!getIpAddress().equals(other.getIpAddress())) return false; + if (!getSubnetMask().equals(other.getSubnetMask())) return false; + if (!getBcast().equals(other.getBcast())) return false; + if (!getFqdn().equals(other.getFqdn())) return false; + if (assignment_ != other.assignment_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + SUBNET_MASK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetMask().hashCode(); + hash = (37 * hash) + BCAST_FIELD_NUMBER; + hash = (53 * hash) + getBcast().hashCode(); + hash = (37 * hash) + FQDN_FIELD_NUMBER; + hash = (53 * hash) + getFqdn().hashCode(); + hash = (37 * hash) + ASSIGNMENT_FIELD_NUMBER; + hash = (53 * hash) + assignment_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.NetworkAddress prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of network address.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkAddress} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.NetworkAddress) + com.google.cloud.migrationcenter.v1.NetworkAddressOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAddress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAddress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkAddress.class, + com.google.cloud.migrationcenter.v1.NetworkAddress.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.NetworkAddress.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ipAddress_ = ""; + subnetMask_ = ""; + bcast_ = ""; + fqdn_ = ""; + assignment_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAddress_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddress getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.NetworkAddress.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddress build() { + com.google.cloud.migrationcenter.v1.NetworkAddress result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddress buildPartial() { + com.google.cloud.migrationcenter.v1.NetworkAddress result = + new com.google.cloud.migrationcenter.v1.NetworkAddress(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.NetworkAddress result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ipAddress_ = ipAddress_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subnetMask_ = subnetMask_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.bcast_ = bcast_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.fqdn_ = fqdn_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.assignment_ = assignment_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.NetworkAddress) { + return mergeFrom((com.google.cloud.migrationcenter.v1.NetworkAddress) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.NetworkAddress other) { + if (other == com.google.cloud.migrationcenter.v1.NetworkAddress.getDefaultInstance()) + return this; + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSubnetMask().isEmpty()) { + subnetMask_ = other.subnetMask_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBcast().isEmpty()) { + bcast_ = other.bcast_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFqdn().isEmpty()) { + fqdn_ = other.fqdn_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.assignment_ != 0) { + setAssignmentValue(other.getAssignmentValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + subnetMask_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + bcast_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + fqdn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + assignment_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object ipAddress_ = ""; + /** + * + * + *
+     * Assigned or configured IP Address.
+     * 
+ * + * string ip_address = 1; + * + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Assigned or configured IP Address.
+     * 
+ * + * string ip_address = 1; + * + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Assigned or configured IP Address.
+     * 
+ * + * string ip_address = 1; + * + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Assigned or configured IP Address.
+     * 
+ * + * string ip_address = 1; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Assigned or configured IP Address.
+     * 
+ * + * string ip_address = 1; + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object subnetMask_ = ""; + /** + * + * + *
+     * Subnet mask.
+     * 
+ * + * string subnet_mask = 2; + * + * @return The subnetMask. + */ + public java.lang.String getSubnetMask() { + java.lang.Object ref = subnetMask_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetMask_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Subnet mask.
+     * 
+ * + * string subnet_mask = 2; + * + * @return The bytes for subnetMask. + */ + public com.google.protobuf.ByteString getSubnetMaskBytes() { + java.lang.Object ref = subnetMask_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetMask_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Subnet mask.
+     * 
+ * + * string subnet_mask = 2; + * + * @param value The subnetMask to set. + * @return This builder for chaining. + */ + public Builder setSubnetMask(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subnetMask_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Subnet mask.
+     * 
+ * + * string subnet_mask = 2; + * + * @return This builder for chaining. + */ + public Builder clearSubnetMask() { + subnetMask_ = getDefaultInstance().getSubnetMask(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Subnet mask.
+     * 
+ * + * string subnet_mask = 2; + * + * @param value The bytes for subnetMask to set. + * @return This builder for chaining. + */ + public Builder setSubnetMaskBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subnetMask_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object bcast_ = ""; + /** + * + * + *
+     * Broadcast address.
+     * 
+ * + * string bcast = 3; + * + * @return The bcast. + */ + public java.lang.String getBcast() { + java.lang.Object ref = bcast_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bcast_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Broadcast address.
+     * 
+ * + * string bcast = 3; + * + * @return The bytes for bcast. + */ + public com.google.protobuf.ByteString getBcastBytes() { + java.lang.Object ref = bcast_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bcast_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Broadcast address.
+     * 
+ * + * string bcast = 3; + * + * @param value The bcast to set. + * @return This builder for chaining. + */ + public Builder setBcast(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bcast_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Broadcast address.
+     * 
+ * + * string bcast = 3; + * + * @return This builder for chaining. + */ + public Builder clearBcast() { + bcast_ = getDefaultInstance().getBcast(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Broadcast address.
+     * 
+ * + * string bcast = 3; + * + * @param value The bytes for bcast to set. + * @return This builder for chaining. + */ + public Builder setBcastBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + bcast_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object fqdn_ = ""; + /** + * + * + *
+     * Fully qualified domain name.
+     * 
+ * + * string fqdn = 4; + * + * @return The fqdn. + */ + public java.lang.String getFqdn() { + java.lang.Object ref = fqdn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqdn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Fully qualified domain name.
+     * 
+ * + * string fqdn = 4; + * + * @return The bytes for fqdn. + */ + public com.google.protobuf.ByteString getFqdnBytes() { + java.lang.Object ref = fqdn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fqdn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Fully qualified domain name.
+     * 
+ * + * string fqdn = 4; + * + * @param value The fqdn to set. + * @return This builder for chaining. + */ + public Builder setFqdn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fqdn_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Fully qualified domain name.
+     * 
+ * + * string fqdn = 4; + * + * @return This builder for chaining. + */ + public Builder clearFqdn() { + fqdn_ = getDefaultInstance().getFqdn(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Fully qualified domain name.
+     * 
+ * + * string fqdn = 4; + * + * @param value The bytes for fqdn to set. + * @return This builder for chaining. + */ + public Builder setFqdnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fqdn_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int assignment_ = 0; + /** + * + * + *
+     * Whether DHCP is used to assign addresses.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + * + * + * @return The enum numeric value on the wire for assignment. + */ + @java.lang.Override + public int getAssignmentValue() { + return assignment_; + } + /** + * + * + *
+     * Whether DHCP is used to assign addresses.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + * + * + * @param value The enum numeric value on the wire for assignment to set. + * @return This builder for chaining. + */ + public Builder setAssignmentValue(int value) { + assignment_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether DHCP is used to assign addresses.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + * + * + * @return The assignment. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment getAssignment() { + com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment result = + com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment.forNumber( + assignment_); + return result == null + ? com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Whether DHCP is used to assign addresses.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + * + * + * @param value The assignment to set. + * @return This builder for chaining. + */ + public Builder setAssignment( + com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + assignment_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Whether DHCP is used to assign addresses.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearAssignment() { + bitField0_ = (bitField0_ & ~0x00000010); + assignment_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.NetworkAddress) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.NetworkAddress) + private static final com.google.cloud.migrationcenter.v1.NetworkAddress DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.NetworkAddress(); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddress getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkAddress parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddress getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressList.java new file mode 100644 index 000000000000..e7bc49771042 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressList.java @@ -0,0 +1,942 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * List of allocated/assigned network addresses.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkAddressList} + */ +public final class NetworkAddressList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.NetworkAddressList) + NetworkAddressListOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkAddressList.newBuilder() to construct. + private NetworkAddressList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkAddressList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkAddressList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAddressList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAddressList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkAddressList.class, + com.google.cloud.migrationcenter.v1.NetworkAddressList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * Network address entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Network address entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Network address entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Network address entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddress getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Network address entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddressOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.NetworkAddressList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.NetworkAddressList other = + (com.google.cloud.migrationcenter.v1.NetworkAddressList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.NetworkAddressList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List of allocated/assigned network addresses.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkAddressList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.NetworkAddressList) + com.google.cloud.migrationcenter.v1.NetworkAddressListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAddressList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAddressList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkAddressList.class, + com.google.cloud.migrationcenter.v1.NetworkAddressList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.NetworkAddressList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkAddressList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddressList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.NetworkAddressList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddressList build() { + com.google.cloud.migrationcenter.v1.NetworkAddressList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddressList buildPartial() { + com.google.cloud.migrationcenter.v1.NetworkAddressList result = + new com.google.cloud.migrationcenter.v1.NetworkAddressList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.NetworkAddressList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.NetworkAddressList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.NetworkAddressList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.NetworkAddressList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.NetworkAddressList other) { + if (other == com.google.cloud.migrationcenter.v1.NetworkAddressList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.NetworkAddress m = + input.readMessage( + com.google.cloud.migrationcenter.v1.NetworkAddress.parser(), + extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAddress, + com.google.cloud.migrationcenter.v1.NetworkAddress.Builder, + com.google.cloud.migrationcenter.v1.NetworkAddressOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkAddress getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public Builder setEntries(int index, com.google.cloud.migrationcenter.v1.NetworkAddress value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.NetworkAddress.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.NetworkAddress value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public Builder addEntries(int index, com.google.cloud.migrationcenter.v1.NetworkAddress value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.NetworkAddress.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.NetworkAddress.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkAddress.Builder getEntriesBuilder(int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkAddressOrBuilder getEntriesOrBuilder( + int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkAddress.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.NetworkAddress.getDefaultInstance()); + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkAddress.Builder addEntriesBuilder(int index) { + return getEntriesFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.NetworkAddress.getDefaultInstance()); + } + /** + * + * + *
+     * Network address entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAddress, + com.google.cloud.migrationcenter.v1.NetworkAddress.Builder, + com.google.cloud.migrationcenter.v1.NetworkAddressOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkAddress, + com.google.cloud.migrationcenter.v1.NetworkAddress.Builder, + com.google.cloud.migrationcenter.v1.NetworkAddressOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.NetworkAddressList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.NetworkAddressList) + private static final com.google.cloud.migrationcenter.v1.NetworkAddressList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.NetworkAddressList(); + } + + public static com.google.cloud.migrationcenter.v1.NetworkAddressList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkAddressList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkAddressList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressListOrBuilder.java new file mode 100644 index 000000000000..cbbe877e54bb --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface NetworkAddressListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.NetworkAddressList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Network address entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Network address entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + com.google.cloud.migrationcenter.v1.NetworkAddress getEntries(int index); + /** + * + * + *
+   * Network address entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Network address entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Network address entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + com.google.cloud.migrationcenter.v1.NetworkAddressOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressOrBuilder.java new file mode 100644 index 000000000000..84c7ee69bb7c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkAddressOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface NetworkAddressOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.NetworkAddress) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Assigned or configured IP Address.
+   * 
+ * + * string ip_address = 1; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+   * Assigned or configured IP Address.
+   * 
+ * + * string ip_address = 1; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+   * Subnet mask.
+   * 
+ * + * string subnet_mask = 2; + * + * @return The subnetMask. + */ + java.lang.String getSubnetMask(); + /** + * + * + *
+   * Subnet mask.
+   * 
+ * + * string subnet_mask = 2; + * + * @return The bytes for subnetMask. + */ + com.google.protobuf.ByteString getSubnetMaskBytes(); + + /** + * + * + *
+   * Broadcast address.
+   * 
+ * + * string bcast = 3; + * + * @return The bcast. + */ + java.lang.String getBcast(); + /** + * + * + *
+   * Broadcast address.
+   * 
+ * + * string bcast = 3; + * + * @return The bytes for bcast. + */ + com.google.protobuf.ByteString getBcastBytes(); + + /** + * + * + *
+   * Fully qualified domain name.
+   * 
+ * + * string fqdn = 4; + * + * @return The fqdn. + */ + java.lang.String getFqdn(); + /** + * + * + *
+   * Fully qualified domain name.
+   * 
+ * + * string fqdn = 4; + * + * @return The bytes for fqdn. + */ + com.google.protobuf.ByteString getFqdnBytes(); + + /** + * + * + *
+   * Whether DHCP is used to assign addresses.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + * + * @return The enum numeric value on the wire for assignment. + */ + int getAssignmentValue(); + /** + * + * + *
+   * Whether DHCP is used to assign addresses.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + * + * @return The assignment. + */ + com.google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment getAssignment(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnection.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnection.java new file mode 100644 index 000000000000..da1f2adb0e85 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnection.java @@ -0,0 +1,1815 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** Protobuf type {@code google.cloud.migrationcenter.v1.NetworkConnection} */ +public final class NetworkConnection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.NetworkConnection) + NetworkConnectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkConnection.newBuilder() to construct. + private NetworkConnection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkConnection() { + protocol_ = ""; + localIpAddress_ = ""; + remoteIpAddress_ = ""; + state_ = 0; + processName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkConnection(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkConnection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkConnection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkConnection.class, + com.google.cloud.migrationcenter.v1.NetworkConnection.Builder.class); + } + + /** + * + * + *
+   * Network connection state.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.NetworkConnection.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Connection state is unknown or unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The connection is being opened.
+     * 
+ * + * OPENING = 1; + */ + OPENING(1), + /** + * + * + *
+     * The connection is open.
+     * 
+ * + * OPEN = 2; + */ + OPEN(2), + /** + * + * + *
+     * Listening for incoming connections.
+     * 
+ * + * LISTEN = 3; + */ + LISTEN(3), + /** + * + * + *
+     * The connection is being closed.
+     * 
+ * + * CLOSING = 4; + */ + CLOSING(4), + /** + * + * + *
+     * The connection is closed.
+     * 
+ * + * CLOSED = 5; + */ + CLOSED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Connection state is unknown or unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The connection is being opened.
+     * 
+ * + * OPENING = 1; + */ + public static final int OPENING_VALUE = 1; + /** + * + * + *
+     * The connection is open.
+     * 
+ * + * OPEN = 2; + */ + public static final int OPEN_VALUE = 2; + /** + * + * + *
+     * Listening for incoming connections.
+     * 
+ * + * LISTEN = 3; + */ + public static final int LISTEN_VALUE = 3; + /** + * + * + *
+     * The connection is being closed.
+     * 
+ * + * CLOSING = 4; + */ + public static final int CLOSING_VALUE = 4; + /** + * + * + *
+     * The connection is closed.
+     * 
+ * + * CLOSED = 5; + */ + public static final int CLOSED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return OPENING; + case 2: + return OPEN; + case 3: + return LISTEN; + case 4: + return CLOSING; + case 5: + return CLOSED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.NetworkConnection.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.NetworkConnection.State) + } + + public static final int PROTOCOL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object protocol_ = ""; + /** + * + * + *
+   * Connection protocol (e.g. TCP/UDP).
+   * 
+ * + * string protocol = 1; + * + * @return The protocol. + */ + @java.lang.Override + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } + } + /** + * + * + *
+   * Connection protocol (e.g. TCP/UDP).
+   * 
+ * + * string protocol = 1; + * + * @return The bytes for protocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCAL_IP_ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object localIpAddress_ = ""; + /** + * + * + *
+   * Local IP address.
+   * 
+ * + * string local_ip_address = 2; + * + * @return The localIpAddress. + */ + @java.lang.Override + public java.lang.String getLocalIpAddress() { + java.lang.Object ref = localIpAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + localIpAddress_ = s; + return s; + } + } + /** + * + * + *
+   * Local IP address.
+   * 
+ * + * string local_ip_address = 2; + * + * @return The bytes for localIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocalIpAddressBytes() { + java.lang.Object ref = localIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + localIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCAL_PORT_FIELD_NUMBER = 3; + private int localPort_ = 0; + /** + * + * + *
+   * Local port.
+   * 
+ * + * int32 local_port = 3; + * + * @return The localPort. + */ + @java.lang.Override + public int getLocalPort() { + return localPort_; + } + + public static final int REMOTE_IP_ADDRESS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object remoteIpAddress_ = ""; + /** + * + * + *
+   * Remote IP address.
+   * 
+ * + * string remote_ip_address = 4; + * + * @return The remoteIpAddress. + */ + @java.lang.Override + public java.lang.String getRemoteIpAddress() { + java.lang.Object ref = remoteIpAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteIpAddress_ = s; + return s; + } + } + /** + * + * + *
+   * Remote IP address.
+   * 
+ * + * string remote_ip_address = 4; + * + * @return The bytes for remoteIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRemoteIpAddressBytes() { + java.lang.Object ref = remoteIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMOTE_PORT_FIELD_NUMBER = 5; + private int remotePort_ = 0; + /** + * + * + *
+   * Remote port.
+   * 
+ * + * int32 remote_port = 5; + * + * @return The remotePort. + */ + @java.lang.Override + public int getRemotePort() { + return remotePort_; + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_ = 0; + /** + * + * + *
+   * Network connection state.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Network connection state.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnection.State getState() { + com.google.cloud.migrationcenter.v1.NetworkConnection.State result = + com.google.cloud.migrationcenter.v1.NetworkConnection.State.forNumber(state_); + return result == null + ? com.google.cloud.migrationcenter.v1.NetworkConnection.State.UNRECOGNIZED + : result; + } + + public static final int PID_FIELD_NUMBER = 7; + private long pid_ = 0L; + /** + * + * + *
+   * Process ID.
+   * 
+ * + * int64 pid = 7; + * + * @return The pid. + */ + @java.lang.Override + public long getPid() { + return pid_; + } + + public static final int PROCESS_NAME_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object processName_ = ""; + /** + * + * + *
+   * Process or service name.
+   * 
+ * + * string process_name = 8; + * + * @return The processName. + */ + @java.lang.Override + public java.lang.String getProcessName() { + java.lang.Object ref = processName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + processName_ = s; + return s; + } + } + /** + * + * + *
+   * Process or service name.
+   * 
+ * + * string process_name = 8; + * + * @return The bytes for processName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProcessNameBytes() { + java.lang.Object ref = processName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, protocol_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localIpAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, localIpAddress_); + } + if (localPort_ != 0) { + output.writeInt32(3, localPort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remoteIpAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, remoteIpAddress_); + } + if (remotePort_ != 0) { + output.writeInt32(5, remotePort_); + } + if (state_ + != com.google.cloud.migrationcenter.v1.NetworkConnection.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, state_); + } + if (pid_ != 0L) { + output.writeInt64(7, pid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, processName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, protocol_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localIpAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, localIpAddress_); + } + if (localPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, localPort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remoteIpAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, remoteIpAddress_); + } + if (remotePort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, remotePort_); + } + if (state_ + != com.google.cloud.migrationcenter.v1.NetworkConnection.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (pid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, pid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, processName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.NetworkConnection)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.NetworkConnection other = + (com.google.cloud.migrationcenter.v1.NetworkConnection) obj; + + if (!getProtocol().equals(other.getProtocol())) return false; + if (!getLocalIpAddress().equals(other.getLocalIpAddress())) return false; + if (getLocalPort() != other.getLocalPort()) return false; + if (!getRemoteIpAddress().equals(other.getRemoteIpAddress())) return false; + if (getRemotePort() != other.getRemotePort()) return false; + if (state_ != other.state_) return false; + if (getPid() != other.getPid()) return false; + if (!getProcessName().equals(other.getProcessName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + hash = (37 * hash) + LOCAL_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getLocalIpAddress().hashCode(); + hash = (37 * hash) + LOCAL_PORT_FIELD_NUMBER; + hash = (53 * hash) + getLocalPort(); + hash = (37 * hash) + REMOTE_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getRemoteIpAddress().hashCode(); + hash = (37 * hash) + REMOTE_PORT_FIELD_NUMBER; + hash = (53 * hash) + getRemotePort(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + PID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPid()); + hash = (37 * hash) + PROCESS_NAME_FIELD_NUMBER; + hash = (53 * hash) + getProcessName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.NetworkConnection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.migrationcenter.v1.NetworkConnection} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.NetworkConnection) + com.google.cloud.migrationcenter.v1.NetworkConnectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkConnection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkConnection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkConnection.class, + com.google.cloud.migrationcenter.v1.NetworkConnection.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.NetworkConnection.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + protocol_ = ""; + localIpAddress_ = ""; + localPort_ = 0; + remoteIpAddress_ = ""; + remotePort_ = 0; + state_ = 0; + pid_ = 0L; + processName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkConnection_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnection getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.NetworkConnection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnection build() { + com.google.cloud.migrationcenter.v1.NetworkConnection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnection buildPartial() { + com.google.cloud.migrationcenter.v1.NetworkConnection result = + new com.google.cloud.migrationcenter.v1.NetworkConnection(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.NetworkConnection result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.protocol_ = protocol_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.localIpAddress_ = localIpAddress_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.localPort_ = localPort_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.remoteIpAddress_ = remoteIpAddress_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remotePort_ = remotePort_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.pid_ = pid_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.processName_ = processName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.NetworkConnection) { + return mergeFrom((com.google.cloud.migrationcenter.v1.NetworkConnection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.NetworkConnection other) { + if (other == com.google.cloud.migrationcenter.v1.NetworkConnection.getDefaultInstance()) + return this; + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLocalIpAddress().isEmpty()) { + localIpAddress_ = other.localIpAddress_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getLocalPort() != 0) { + setLocalPort(other.getLocalPort()); + } + if (!other.getRemoteIpAddress().isEmpty()) { + remoteIpAddress_ = other.remoteIpAddress_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getRemotePort() != 0) { + setRemotePort(other.getRemotePort()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getPid() != 0L) { + setPid(other.getPid()); + } + if (!other.getProcessName().isEmpty()) { + processName_ = other.processName_; + bitField0_ |= 0x00000080; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + protocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + localIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + localPort_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + remoteIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + remotePort_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + pid_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + processName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object protocol_ = ""; + /** + * + * + *
+     * Connection protocol (e.g. TCP/UDP).
+     * 
+ * + * string protocol = 1; + * + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Connection protocol (e.g. TCP/UDP).
+     * 
+ * + * string protocol = 1; + * + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Connection protocol (e.g. TCP/UDP).
+     * 
+ * + * string protocol = 1; + * + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + protocol_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Connection protocol (e.g. TCP/UDP).
+     * 
+ * + * string protocol = 1; + * + * @return This builder for chaining. + */ + public Builder clearProtocol() { + protocol_ = getDefaultInstance().getProtocol(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Connection protocol (e.g. TCP/UDP).
+     * 
+ * + * string protocol = 1; + * + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + protocol_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object localIpAddress_ = ""; + /** + * + * + *
+     * Local IP address.
+     * 
+ * + * string local_ip_address = 2; + * + * @return The localIpAddress. + */ + public java.lang.String getLocalIpAddress() { + java.lang.Object ref = localIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + localIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Local IP address.
+     * 
+ * + * string local_ip_address = 2; + * + * @return The bytes for localIpAddress. + */ + public com.google.protobuf.ByteString getLocalIpAddressBytes() { + java.lang.Object ref = localIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + localIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Local IP address.
+     * 
+ * + * string local_ip_address = 2; + * + * @param value The localIpAddress to set. + * @return This builder for chaining. + */ + public Builder setLocalIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + localIpAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Local IP address.
+     * 
+ * + * string local_ip_address = 2; + * + * @return This builder for chaining. + */ + public Builder clearLocalIpAddress() { + localIpAddress_ = getDefaultInstance().getLocalIpAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Local IP address.
+     * 
+ * + * string local_ip_address = 2; + * + * @param value The bytes for localIpAddress to set. + * @return This builder for chaining. + */ + public Builder setLocalIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + localIpAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int localPort_; + /** + * + * + *
+     * Local port.
+     * 
+ * + * int32 local_port = 3; + * + * @return The localPort. + */ + @java.lang.Override + public int getLocalPort() { + return localPort_; + } + /** + * + * + *
+     * Local port.
+     * 
+ * + * int32 local_port = 3; + * + * @param value The localPort to set. + * @return This builder for chaining. + */ + public Builder setLocalPort(int value) { + + localPort_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Local port.
+     * 
+ * + * int32 local_port = 3; + * + * @return This builder for chaining. + */ + public Builder clearLocalPort() { + bitField0_ = (bitField0_ & ~0x00000004); + localPort_ = 0; + onChanged(); + return this; + } + + private java.lang.Object remoteIpAddress_ = ""; + /** + * + * + *
+     * Remote IP address.
+     * 
+ * + * string remote_ip_address = 4; + * + * @return The remoteIpAddress. + */ + public java.lang.String getRemoteIpAddress() { + java.lang.Object ref = remoteIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Remote IP address.
+     * 
+ * + * string remote_ip_address = 4; + * + * @return The bytes for remoteIpAddress. + */ + public com.google.protobuf.ByteString getRemoteIpAddressBytes() { + java.lang.Object ref = remoteIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Remote IP address.
+     * 
+ * + * string remote_ip_address = 4; + * + * @param value The remoteIpAddress to set. + * @return This builder for chaining. + */ + public Builder setRemoteIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + remoteIpAddress_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Remote IP address.
+     * 
+ * + * string remote_ip_address = 4; + * + * @return This builder for chaining. + */ + public Builder clearRemoteIpAddress() { + remoteIpAddress_ = getDefaultInstance().getRemoteIpAddress(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Remote IP address.
+     * 
+ * + * string remote_ip_address = 4; + * + * @param value The bytes for remoteIpAddress to set. + * @return This builder for chaining. + */ + public Builder setRemoteIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + remoteIpAddress_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int remotePort_; + /** + * + * + *
+     * Remote port.
+     * 
+ * + * int32 remote_port = 5; + * + * @return The remotePort. + */ + @java.lang.Override + public int getRemotePort() { + return remotePort_; + } + /** + * + * + *
+     * Remote port.
+     * 
+ * + * int32 remote_port = 5; + * + * @param value The remotePort to set. + * @return This builder for chaining. + */ + public Builder setRemotePort(int value) { + + remotePort_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Remote port.
+     * 
+ * + * int32 remote_port = 5; + * + * @return This builder for chaining. + */ + public Builder clearRemotePort() { + bitField0_ = (bitField0_ & ~0x00000010); + remotePort_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Network connection state.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Network connection state.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Network connection state.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnection.State getState() { + com.google.cloud.migrationcenter.v1.NetworkConnection.State result = + com.google.cloud.migrationcenter.v1.NetworkConnection.State.forNumber(state_); + return result == null + ? com.google.cloud.migrationcenter.v1.NetworkConnection.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Network connection state.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.migrationcenter.v1.NetworkConnection.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Network connection state.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private long pid_; + /** + * + * + *
+     * Process ID.
+     * 
+ * + * int64 pid = 7; + * + * @return The pid. + */ + @java.lang.Override + public long getPid() { + return pid_; + } + /** + * + * + *
+     * Process ID.
+     * 
+ * + * int64 pid = 7; + * + * @param value The pid to set. + * @return This builder for chaining. + */ + public Builder setPid(long value) { + + pid_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Process ID.
+     * 
+ * + * int64 pid = 7; + * + * @return This builder for chaining. + */ + public Builder clearPid() { + bitField0_ = (bitField0_ & ~0x00000040); + pid_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object processName_ = ""; + /** + * + * + *
+     * Process or service name.
+     * 
+ * + * string process_name = 8; + * + * @return The processName. + */ + public java.lang.String getProcessName() { + java.lang.Object ref = processName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + processName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Process or service name.
+     * 
+ * + * string process_name = 8; + * + * @return The bytes for processName. + */ + public com.google.protobuf.ByteString getProcessNameBytes() { + java.lang.Object ref = processName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Process or service name.
+     * 
+ * + * string process_name = 8; + * + * @param value The processName to set. + * @return This builder for chaining. + */ + public Builder setProcessName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + processName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Process or service name.
+     * 
+ * + * string process_name = 8; + * + * @return This builder for chaining. + */ + public Builder clearProcessName() { + processName_ = getDefaultInstance().getProcessName(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Process or service name.
+     * 
+ * + * string process_name = 8; + * + * @param value The bytes for processName to set. + * @return This builder for chaining. + */ + public Builder setProcessNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + processName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.NetworkConnection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.NetworkConnection) + private static final com.google.cloud.migrationcenter.v1.NetworkConnection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.NetworkConnection(); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkConnection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionList.java new file mode 100644 index 000000000000..af23073aac87 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionList.java @@ -0,0 +1,948 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Network connection list.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkConnectionList} + */ +public final class NetworkConnectionList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.NetworkConnectionList) + NetworkConnectionListOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkConnectionList.newBuilder() to construct. + private NetworkConnectionList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkConnectionList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkConnectionList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkConnectionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkConnectionList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkConnectionList.class, + com.google.cloud.migrationcenter.v1.NetworkConnectionList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * Network connection entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Network connection entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Network connection entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Network connection entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnection getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Network connection entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnectionOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.NetworkConnectionList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.NetworkConnectionList other = + (com.google.cloud.migrationcenter.v1.NetworkConnectionList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.NetworkConnectionList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Network connection list.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkConnectionList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.NetworkConnectionList) + com.google.cloud.migrationcenter.v1.NetworkConnectionListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkConnectionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkConnectionList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkConnectionList.class, + com.google.cloud.migrationcenter.v1.NetworkConnectionList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.NetworkConnectionList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkConnectionList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnectionList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.NetworkConnectionList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnectionList build() { + com.google.cloud.migrationcenter.v1.NetworkConnectionList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnectionList buildPartial() { + com.google.cloud.migrationcenter.v1.NetworkConnectionList result = + new com.google.cloud.migrationcenter.v1.NetworkConnectionList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.NetworkConnectionList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.NetworkConnectionList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.NetworkConnectionList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.NetworkConnectionList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.NetworkConnectionList other) { + if (other == com.google.cloud.migrationcenter.v1.NetworkConnectionList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.NetworkConnection m = + input.readMessage( + com.google.cloud.migrationcenter.v1.NetworkConnection.parser(), + extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList( + entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkConnection, + com.google.cloud.migrationcenter.v1.NetworkConnection.Builder, + com.google.cloud.migrationcenter.v1.NetworkConnectionOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkConnection getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.NetworkConnection value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.NetworkConnection.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.NetworkConnection value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.NetworkConnection value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.NetworkConnection.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.NetworkConnection.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable + values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkConnection.Builder getEntriesBuilder( + int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkConnectionOrBuilder getEntriesOrBuilder( + int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkConnection.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.NetworkConnection.getDefaultInstance()); + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NetworkConnection.Builder addEntriesBuilder( + int index) { + return getEntriesFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.NetworkConnection.getDefaultInstance()); + } + /** + * + * + *
+     * Network connection entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkConnection, + com.google.cloud.migrationcenter.v1.NetworkConnection.Builder, + com.google.cloud.migrationcenter.v1.NetworkConnectionOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkConnection, + com.google.cloud.migrationcenter.v1.NetworkConnection.Builder, + com.google.cloud.migrationcenter.v1.NetworkConnectionOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.NetworkConnectionList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.NetworkConnectionList) + private static final com.google.cloud.migrationcenter.v1.NetworkConnectionList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.NetworkConnectionList(); + } + + public static com.google.cloud.migrationcenter.v1.NetworkConnectionList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkConnectionList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnectionList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionListOrBuilder.java new file mode 100644 index 000000000000..787a09668185 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface NetworkConnectionListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.NetworkConnectionList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Network connection entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Network connection entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + com.google.cloud.migrationcenter.v1.NetworkConnection getEntries(int index); + /** + * + * + *
+   * Network connection entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Network connection entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Network connection entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + com.google.cloud.migrationcenter.v1.NetworkConnectionOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionOrBuilder.java new file mode 100644 index 000000000000..3537424053b6 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkConnectionOrBuilder.java @@ -0,0 +1,189 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface NetworkConnectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.NetworkConnection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Connection protocol (e.g. TCP/UDP).
+   * 
+ * + * string protocol = 1; + * + * @return The protocol. + */ + java.lang.String getProtocol(); + /** + * + * + *
+   * Connection protocol (e.g. TCP/UDP).
+   * 
+ * + * string protocol = 1; + * + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString getProtocolBytes(); + + /** + * + * + *
+   * Local IP address.
+   * 
+ * + * string local_ip_address = 2; + * + * @return The localIpAddress. + */ + java.lang.String getLocalIpAddress(); + /** + * + * + *
+   * Local IP address.
+   * 
+ * + * string local_ip_address = 2; + * + * @return The bytes for localIpAddress. + */ + com.google.protobuf.ByteString getLocalIpAddressBytes(); + + /** + * + * + *
+   * Local port.
+   * 
+ * + * int32 local_port = 3; + * + * @return The localPort. + */ + int getLocalPort(); + + /** + * + * + *
+   * Remote IP address.
+   * 
+ * + * string remote_ip_address = 4; + * + * @return The remoteIpAddress. + */ + java.lang.String getRemoteIpAddress(); + /** + * + * + *
+   * Remote IP address.
+   * 
+ * + * string remote_ip_address = 4; + * + * @return The bytes for remoteIpAddress. + */ + com.google.protobuf.ByteString getRemoteIpAddressBytes(); + + /** + * + * + *
+   * Remote port.
+   * 
+ * + * int32 remote_port = 5; + * + * @return The remotePort. + */ + int getRemotePort(); + + /** + * + * + *
+   * Network connection state.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Network connection state.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + * + * @return The state. + */ + com.google.cloud.migrationcenter.v1.NetworkConnection.State getState(); + + /** + * + * + *
+   * Process ID.
+   * 
+ * + * int64 pid = 7; + * + * @return The pid. + */ + long getPid(); + + /** + * + * + *
+   * Process or service name.
+   * 
+ * + * string process_name = 8; + * + * @return The processName. + */ + java.lang.String getProcessName(); + /** + * + * + *
+   * Process or service name.
+   * 
+ * + * string process_name = 8; + * + * @return The bytes for processName. + */ + com.google.protobuf.ByteString getProcessNameBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkUsageSample.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkUsageSample.java new file mode 100644 index 000000000000..ff8d4ba6144e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkUsageSample.java @@ -0,0 +1,638 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Network usage sample. Values are across all network interfaces.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkUsageSample} + */ +public final class NetworkUsageSample extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.NetworkUsageSample) + NetworkUsageSampleOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkUsageSample.newBuilder() to construct. + private NetworkUsageSample(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkUsageSample() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkUsageSample(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkUsageSample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkUsageSample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkUsageSample.class, + com.google.cloud.migrationcenter.v1.NetworkUsageSample.Builder.class); + } + + public static final int AVERAGE_INGRESS_BPS_FIELD_NUMBER = 1; + private float averageIngressBps_ = 0F; + /** + * + * + *
+   * Average network ingress in B/s sampled over a short window.
+   * Must be non-negative.
+   * 
+ * + * float average_ingress_bps = 1; + * + * @return The averageIngressBps. + */ + @java.lang.Override + public float getAverageIngressBps() { + return averageIngressBps_; + } + + public static final int AVERAGE_EGRESS_BPS_FIELD_NUMBER = 2; + private float averageEgressBps_ = 0F; + /** + * + * + *
+   * Average network egress in B/s sampled over a short window.
+   * Must be non-negative.
+   * 
+ * + * float average_egress_bps = 2; + * + * @return The averageEgressBps. + */ + @java.lang.Override + public float getAverageEgressBps() { + return averageEgressBps_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(averageIngressBps_) != 0) { + output.writeFloat(1, averageIngressBps_); + } + if (java.lang.Float.floatToRawIntBits(averageEgressBps_) != 0) { + output.writeFloat(2, averageEgressBps_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(averageIngressBps_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, averageIngressBps_); + } + if (java.lang.Float.floatToRawIntBits(averageEgressBps_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, averageEgressBps_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.NetworkUsageSample)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.NetworkUsageSample other = + (com.google.cloud.migrationcenter.v1.NetworkUsageSample) obj; + + if (java.lang.Float.floatToIntBits(getAverageIngressBps()) + != java.lang.Float.floatToIntBits(other.getAverageIngressBps())) return false; + if (java.lang.Float.floatToIntBits(getAverageEgressBps()) + != java.lang.Float.floatToIntBits(other.getAverageEgressBps())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AVERAGE_INGRESS_BPS_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getAverageIngressBps()); + hash = (37 * hash) + AVERAGE_EGRESS_BPS_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getAverageEgressBps()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.NetworkUsageSample prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Network usage sample. Values are across all network interfaces.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NetworkUsageSample} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.NetworkUsageSample) + com.google.cloud.migrationcenter.v1.NetworkUsageSampleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkUsageSample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkUsageSample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NetworkUsageSample.class, + com.google.cloud.migrationcenter.v1.NetworkUsageSample.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.NetworkUsageSample.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + averageIngressBps_ = 0F; + averageEgressBps_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NetworkUsageSample_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkUsageSample getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.NetworkUsageSample.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkUsageSample build() { + com.google.cloud.migrationcenter.v1.NetworkUsageSample result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkUsageSample buildPartial() { + com.google.cloud.migrationcenter.v1.NetworkUsageSample result = + new com.google.cloud.migrationcenter.v1.NetworkUsageSample(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.NetworkUsageSample result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.averageIngressBps_ = averageIngressBps_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.averageEgressBps_ = averageEgressBps_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.NetworkUsageSample) { + return mergeFrom((com.google.cloud.migrationcenter.v1.NetworkUsageSample) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.NetworkUsageSample other) { + if (other == com.google.cloud.migrationcenter.v1.NetworkUsageSample.getDefaultInstance()) + return this; + if (other.getAverageIngressBps() != 0F) { + setAverageIngressBps(other.getAverageIngressBps()); + } + if (other.getAverageEgressBps() != 0F) { + setAverageEgressBps(other.getAverageEgressBps()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + averageIngressBps_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: + { + averageEgressBps_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float averageIngressBps_; + /** + * + * + *
+     * Average network ingress in B/s sampled over a short window.
+     * Must be non-negative.
+     * 
+ * + * float average_ingress_bps = 1; + * + * @return The averageIngressBps. + */ + @java.lang.Override + public float getAverageIngressBps() { + return averageIngressBps_; + } + /** + * + * + *
+     * Average network ingress in B/s sampled over a short window.
+     * Must be non-negative.
+     * 
+ * + * float average_ingress_bps = 1; + * + * @param value The averageIngressBps to set. + * @return This builder for chaining. + */ + public Builder setAverageIngressBps(float value) { + + averageIngressBps_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Average network ingress in B/s sampled over a short window.
+     * Must be non-negative.
+     * 
+ * + * float average_ingress_bps = 1; + * + * @return This builder for chaining. + */ + public Builder clearAverageIngressBps() { + bitField0_ = (bitField0_ & ~0x00000001); + averageIngressBps_ = 0F; + onChanged(); + return this; + } + + private float averageEgressBps_; + /** + * + * + *
+     * Average network egress in B/s sampled over a short window.
+     * Must be non-negative.
+     * 
+ * + * float average_egress_bps = 2; + * + * @return The averageEgressBps. + */ + @java.lang.Override + public float getAverageEgressBps() { + return averageEgressBps_; + } + /** + * + * + *
+     * Average network egress in B/s sampled over a short window.
+     * Must be non-negative.
+     * 
+ * + * float average_egress_bps = 2; + * + * @param value The averageEgressBps to set. + * @return This builder for chaining. + */ + public Builder setAverageEgressBps(float value) { + + averageEgressBps_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Average network egress in B/s sampled over a short window.
+     * Must be non-negative.
+     * 
+ * + * float average_egress_bps = 2; + * + * @return This builder for chaining. + */ + public Builder clearAverageEgressBps() { + bitField0_ = (bitField0_ & ~0x00000002); + averageEgressBps_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.NetworkUsageSample) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.NetworkUsageSample) + private static final com.google.cloud.migrationcenter.v1.NetworkUsageSample DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.NetworkUsageSample(); + } + + public static com.google.cloud.migrationcenter.v1.NetworkUsageSample getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkUsageSample parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkUsageSample getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkUsageSampleOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkUsageSampleOrBuilder.java new file mode 100644 index 000000000000..f9544c0c1d2c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NetworkUsageSampleOrBuilder.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface NetworkUsageSampleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.NetworkUsageSample) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Average network ingress in B/s sampled over a short window.
+   * Must be non-negative.
+   * 
+ * + * float average_ingress_bps = 1; + * + * @return The averageIngressBps. + */ + float getAverageIngressBps(); + + /** + * + * + *
+   * Average network egress in B/s sampled over a short window.
+   * Must be non-negative.
+   * 
+ * + * float average_egress_bps = 2; + * + * @return The averageEgressBps. + */ + float getAverageEgressBps(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExport.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExport.java new file mode 100644 index 000000000000..737abd758dce --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExport.java @@ -0,0 +1,900 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * NFS export.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NfsExport} + */ +public final class NfsExport extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.NfsExport) + NfsExportOrBuilder { + private static final long serialVersionUID = 0L; + // Use NfsExport.newBuilder() to construct. + private NfsExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NfsExport() { + exportDirectory_ = ""; + hosts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NfsExport(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NfsExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NfsExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NfsExport.class, + com.google.cloud.migrationcenter.v1.NfsExport.Builder.class); + } + + public static final int EXPORT_DIRECTORY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object exportDirectory_ = ""; + /** + * + * + *
+   * The directory being exported.
+   * 
+ * + * string export_directory = 1; + * + * @return The exportDirectory. + */ + @java.lang.Override + public java.lang.String getExportDirectory() { + java.lang.Object ref = exportDirectory_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + exportDirectory_ = s; + return s; + } + } + /** + * + * + *
+   * The directory being exported.
+   * 
+ * + * string export_directory = 1; + * + * @return The bytes for exportDirectory. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExportDirectoryBytes() { + java.lang.Object ref = exportDirectory_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + exportDirectory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOSTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList hosts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The hosts or networks to which the export is being shared.
+   * 
+ * + * repeated string hosts = 2; + * + * @return A list containing the hosts. + */ + public com.google.protobuf.ProtocolStringList getHostsList() { + return hosts_; + } + /** + * + * + *
+   * The hosts or networks to which the export is being shared.
+   * 
+ * + * repeated string hosts = 2; + * + * @return The count of hosts. + */ + public int getHostsCount() { + return hosts_.size(); + } + /** + * + * + *
+   * The hosts or networks to which the export is being shared.
+   * 
+ * + * repeated string hosts = 2; + * + * @param index The index of the element to return. + * @return The hosts at the given index. + */ + public java.lang.String getHosts(int index) { + return hosts_.get(index); + } + /** + * + * + *
+   * The hosts or networks to which the export is being shared.
+   * 
+ * + * repeated string hosts = 2; + * + * @param index The index of the value to return. + * @return The bytes of the hosts at the given index. + */ + public com.google.protobuf.ByteString getHostsBytes(int index) { + return hosts_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exportDirectory_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, exportDirectory_); + } + for (int i = 0; i < hosts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hosts_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exportDirectory_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, exportDirectory_); + } + { + int dataSize = 0; + for (int i = 0; i < hosts_.size(); i++) { + dataSize += computeStringSizeNoTag(hosts_.getRaw(i)); + } + size += dataSize; + size += 1 * getHostsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.NfsExport)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.NfsExport other = + (com.google.cloud.migrationcenter.v1.NfsExport) obj; + + if (!getExportDirectory().equals(other.getExportDirectory())) return false; + if (!getHostsList().equals(other.getHostsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXPORT_DIRECTORY_FIELD_NUMBER; + hash = (53 * hash) + getExportDirectory().hashCode(); + if (getHostsCount() > 0) { + hash = (37 * hash) + HOSTS_FIELD_NUMBER; + hash = (53 * hash) + getHostsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.NfsExport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * NFS export.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NfsExport} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.NfsExport) + com.google.cloud.migrationcenter.v1.NfsExportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NfsExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NfsExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NfsExport.class, + com.google.cloud.migrationcenter.v1.NfsExport.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.NfsExport.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + exportDirectory_ = ""; + hosts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NfsExport_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExport getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.NfsExport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExport build() { + com.google.cloud.migrationcenter.v1.NfsExport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExport buildPartial() { + com.google.cloud.migrationcenter.v1.NfsExport result = + new com.google.cloud.migrationcenter.v1.NfsExport(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.NfsExport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.exportDirectory_ = exportDirectory_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + hosts_.makeImmutable(); + result.hosts_ = hosts_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.NfsExport) { + return mergeFrom((com.google.cloud.migrationcenter.v1.NfsExport) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.NfsExport other) { + if (other == com.google.cloud.migrationcenter.v1.NfsExport.getDefaultInstance()) return this; + if (!other.getExportDirectory().isEmpty()) { + exportDirectory_ = other.exportDirectory_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.hosts_.isEmpty()) { + if (hosts_.isEmpty()) { + hosts_ = other.hosts_; + bitField0_ |= 0x00000002; + } else { + ensureHostsIsMutable(); + hosts_.addAll(other.hosts_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + exportDirectory_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureHostsIsMutable(); + hosts_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object exportDirectory_ = ""; + /** + * + * + *
+     * The directory being exported.
+     * 
+ * + * string export_directory = 1; + * + * @return The exportDirectory. + */ + public java.lang.String getExportDirectory() { + java.lang.Object ref = exportDirectory_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + exportDirectory_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The directory being exported.
+     * 
+ * + * string export_directory = 1; + * + * @return The bytes for exportDirectory. + */ + public com.google.protobuf.ByteString getExportDirectoryBytes() { + java.lang.Object ref = exportDirectory_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + exportDirectory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The directory being exported.
+     * 
+ * + * string export_directory = 1; + * + * @param value The exportDirectory to set. + * @return This builder for chaining. + */ + public Builder setExportDirectory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + exportDirectory_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The directory being exported.
+     * 
+ * + * string export_directory = 1; + * + * @return This builder for chaining. + */ + public Builder clearExportDirectory() { + exportDirectory_ = getDefaultInstance().getExportDirectory(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The directory being exported.
+     * 
+ * + * string export_directory = 1; + * + * @param value The bytes for exportDirectory to set. + * @return This builder for chaining. + */ + public Builder setExportDirectoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + exportDirectory_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList hosts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureHostsIsMutable() { + if (!hosts_.isModifiable()) { + hosts_ = new com.google.protobuf.LazyStringArrayList(hosts_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * The hosts or networks to which the export is being shared.
+     * 
+ * + * repeated string hosts = 2; + * + * @return A list containing the hosts. + */ + public com.google.protobuf.ProtocolStringList getHostsList() { + hosts_.makeImmutable(); + return hosts_; + } + /** + * + * + *
+     * The hosts or networks to which the export is being shared.
+     * 
+ * + * repeated string hosts = 2; + * + * @return The count of hosts. + */ + public int getHostsCount() { + return hosts_.size(); + } + /** + * + * + *
+     * The hosts or networks to which the export is being shared.
+     * 
+ * + * repeated string hosts = 2; + * + * @param index The index of the element to return. + * @return The hosts at the given index. + */ + public java.lang.String getHosts(int index) { + return hosts_.get(index); + } + /** + * + * + *
+     * The hosts or networks to which the export is being shared.
+     * 
+ * + * repeated string hosts = 2; + * + * @param index The index of the value to return. + * @return The bytes of the hosts at the given index. + */ + public com.google.protobuf.ByteString getHostsBytes(int index) { + return hosts_.getByteString(index); + } + /** + * + * + *
+     * The hosts or networks to which the export is being shared.
+     * 
+ * + * repeated string hosts = 2; + * + * @param index The index to set the value at. + * @param value The hosts to set. + * @return This builder for chaining. + */ + public Builder setHosts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHostsIsMutable(); + hosts_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The hosts or networks to which the export is being shared.
+     * 
+ * + * repeated string hosts = 2; + * + * @param value The hosts to add. + * @return This builder for chaining. + */ + public Builder addHosts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHostsIsMutable(); + hosts_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The hosts or networks to which the export is being shared.
+     * 
+ * + * repeated string hosts = 2; + * + * @param values The hosts to add. + * @return This builder for chaining. + */ + public Builder addAllHosts(java.lang.Iterable values) { + ensureHostsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, hosts_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The hosts or networks to which the export is being shared.
+     * 
+ * + * repeated string hosts = 2; + * + * @return This builder for chaining. + */ + public Builder clearHosts() { + hosts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The hosts or networks to which the export is being shared.
+     * 
+ * + * repeated string hosts = 2; + * + * @param value The bytes of the hosts to add. + * @return This builder for chaining. + */ + public Builder addHostsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHostsIsMutable(); + hosts_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.NfsExport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.NfsExport) + private static final com.google.cloud.migrationcenter.v1.NfsExport DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.NfsExport(); + } + + public static com.google.cloud.migrationcenter.v1.NfsExport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NfsExport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportList.java new file mode 100644 index 000000000000..b01650b2044f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportList.java @@ -0,0 +1,936 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * NFS exports.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NfsExportList} + */ +public final class NfsExportList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.NfsExportList) + NfsExportListOrBuilder { + private static final long serialVersionUID = 0L; + // Use NfsExportList.newBuilder() to construct. + private NfsExportList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NfsExportList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NfsExportList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NfsExportList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NfsExportList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NfsExportList.class, + com.google.cloud.migrationcenter.v1.NfsExportList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * NFS export entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * NFS export entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * NFS export entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * NFS export entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExport getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * NFS export entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExportOrBuilder getEntriesOrBuilder(int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.NfsExportList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.NfsExportList other = + (com.google.cloud.migrationcenter.v1.NfsExportList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.NfsExportList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * NFS exports.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.NfsExportList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.NfsExportList) + com.google.cloud.migrationcenter.v1.NfsExportListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NfsExportList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NfsExportList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.NfsExportList.class, + com.google.cloud.migrationcenter.v1.NfsExportList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.NfsExportList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_NfsExportList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExportList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.NfsExportList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExportList build() { + com.google.cloud.migrationcenter.v1.NfsExportList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExportList buildPartial() { + com.google.cloud.migrationcenter.v1.NfsExportList result = + new com.google.cloud.migrationcenter.v1.NfsExportList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.NfsExportList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.NfsExportList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.NfsExportList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.NfsExportList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.NfsExportList other) { + if (other == com.google.cloud.migrationcenter.v1.NfsExportList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.NfsExport m = + input.readMessage( + com.google.cloud.migrationcenter.v1.NfsExport.parser(), extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NfsExport, + com.google.cloud.migrationcenter.v1.NfsExport.Builder, + com.google.cloud.migrationcenter.v1.NfsExportOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NfsExport getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public Builder setEntries(int index, com.google.cloud.migrationcenter.v1.NfsExport value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.NfsExport.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.NfsExport value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public Builder addEntries(int index, com.google.cloud.migrationcenter.v1.NfsExport value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.NfsExport.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.NfsExport.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NfsExport.Builder getEntriesBuilder(int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NfsExportOrBuilder getEntriesOrBuilder(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NfsExport.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.NfsExport.getDefaultInstance()); + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public com.google.cloud.migrationcenter.v1.NfsExport.Builder addEntriesBuilder(int index) { + return getEntriesFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.NfsExport.getDefaultInstance()); + } + /** + * + * + *
+     * NFS export entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NfsExport, + com.google.cloud.migrationcenter.v1.NfsExport.Builder, + com.google.cloud.migrationcenter.v1.NfsExportOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NfsExport, + com.google.cloud.migrationcenter.v1.NfsExport.Builder, + com.google.cloud.migrationcenter.v1.NfsExportOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.NfsExportList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.NfsExportList) + private static final com.google.cloud.migrationcenter.v1.NfsExportList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.NfsExportList(); + } + + public static com.google.cloud.migrationcenter.v1.NfsExportList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NfsExportList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NfsExportList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportListOrBuilder.java new file mode 100644 index 000000000000..65283c483fca --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface NfsExportListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.NfsExportList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * NFS export entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * NFS export entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + com.google.cloud.migrationcenter.v1.NfsExport getEntries(int index); + /** + * + * + *
+   * NFS export entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * NFS export entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * NFS export entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + com.google.cloud.migrationcenter.v1.NfsExportOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportOrBuilder.java new file mode 100644 index 000000000000..082243c58686 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/NfsExportOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface NfsExportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.NfsExport) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The directory being exported.
+   * 
+ * + * string export_directory = 1; + * + * @return The exportDirectory. + */ + java.lang.String getExportDirectory(); + /** + * + * + *
+   * The directory being exported.
+   * 
+ * + * string export_directory = 1; + * + * @return The bytes for exportDirectory. + */ + com.google.protobuf.ByteString getExportDirectoryBytes(); + + /** + * + * + *
+   * The hosts or networks to which the export is being shared.
+   * 
+ * + * repeated string hosts = 2; + * + * @return A list containing the hosts. + */ + java.util.List getHostsList(); + /** + * + * + *
+   * The hosts or networks to which the export is being shared.
+   * 
+ * + * repeated string hosts = 2; + * + * @return The count of hosts. + */ + int getHostsCount(); + /** + * + * + *
+   * The hosts or networks to which the export is being shared.
+   * 
+ * + * repeated string hosts = 2; + * + * @param index The index of the element to return. + * @return The hosts at the given index. + */ + java.lang.String getHosts(int index); + /** + * + * + *
+   * The hosts or networks to which the export is being shared.
+   * 
+ * + * repeated string hosts = 2; + * + * @param index The index of the value to return. + * @return The bytes of the hosts at the given index. + */ + com.google.protobuf.ByteString getHostsBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileDetails.java new file mode 100644 index 000000000000..638b7919c974 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileDetails.java @@ -0,0 +1,1170 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Open file Information.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.OpenFileDetails} + */ +public final class OpenFileDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.OpenFileDetails) + OpenFileDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use OpenFileDetails.newBuilder() to construct. + private OpenFileDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OpenFileDetails() { + command_ = ""; + user_ = ""; + fileType_ = ""; + filePath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpenFileDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OpenFileDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OpenFileDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.OpenFileDetails.class, + com.google.cloud.migrationcenter.v1.OpenFileDetails.Builder.class); + } + + public static final int COMMAND_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object command_ = ""; + /** + * + * + *
+   * Opened file command.
+   * 
+ * + * string command = 1; + * + * @return The command. + */ + @java.lang.Override + public java.lang.String getCommand() { + java.lang.Object ref = command_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + command_ = s; + return s; + } + } + /** + * + * + *
+   * Opened file command.
+   * 
+ * + * string command = 1; + * + * @return The bytes for command. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCommandBytes() { + java.lang.Object ref = command_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + command_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object user_ = ""; + /** + * + * + *
+   * Opened file user.
+   * 
+ * + * string user = 2; + * + * @return The user. + */ + @java.lang.Override + public java.lang.String getUser() { + java.lang.Object ref = user_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + user_ = s; + return s; + } + } + /** + * + * + *
+   * Opened file user.
+   * 
+ * + * string user = 2; + * + * @return The bytes for user. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserBytes() { + java.lang.Object ref = user_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + user_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object fileType_ = ""; + /** + * + * + *
+   * Opened file file type.
+   * 
+ * + * string file_type = 3; + * + * @return The fileType. + */ + @java.lang.Override + public java.lang.String getFileType() { + java.lang.Object ref = fileType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileType_ = s; + return s; + } + } + /** + * + * + *
+   * Opened file file type.
+   * 
+ * + * string file_type = 3; + * + * @return The bytes for fileType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFileTypeBytes() { + java.lang.Object ref = fileType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_PATH_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filePath_ = ""; + /** + * + * + *
+   * Opened file file path.
+   * 
+ * + * string file_path = 4; + * + * @return The filePath. + */ + @java.lang.Override + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filePath_ = s; + return s; + } + } + /** + * + * + *
+   * Opened file file path.
+   * 
+ * + * string file_path = 4; + * + * @return The bytes for filePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(command_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, command_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(user_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, user_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, fileType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filePath_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(command_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, command_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(user_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, user_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, fileType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filePath_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.OpenFileDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.OpenFileDetails other = + (com.google.cloud.migrationcenter.v1.OpenFileDetails) obj; + + if (!getCommand().equals(other.getCommand())) return false; + if (!getUser().equals(other.getUser())) return false; + if (!getFileType().equals(other.getFileType())) return false; + if (!getFilePath().equals(other.getFilePath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COMMAND_FIELD_NUMBER; + hash = (53 * hash) + getCommand().hashCode(); + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + hash = (37 * hash) + FILE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getFileType().hashCode(); + hash = (37 * hash) + FILE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFilePath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.OpenFileDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Open file Information.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.OpenFileDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.OpenFileDetails) + com.google.cloud.migrationcenter.v1.OpenFileDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OpenFileDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OpenFileDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.OpenFileDetails.class, + com.google.cloud.migrationcenter.v1.OpenFileDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.OpenFileDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + command_ = ""; + user_ = ""; + fileType_ = ""; + filePath_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OpenFileDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.OpenFileDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileDetails build() { + com.google.cloud.migrationcenter.v1.OpenFileDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileDetails buildPartial() { + com.google.cloud.migrationcenter.v1.OpenFileDetails result = + new com.google.cloud.migrationcenter.v1.OpenFileDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.OpenFileDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.command_ = command_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = user_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fileType_ = fileType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filePath_ = filePath_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.OpenFileDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.OpenFileDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.OpenFileDetails other) { + if (other == com.google.cloud.migrationcenter.v1.OpenFileDetails.getDefaultInstance()) + return this; + if (!other.getCommand().isEmpty()) { + command_ = other.command_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUser().isEmpty()) { + user_ = other.user_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getFileType().isEmpty()) { + fileType_ = other.fileType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilePath().isEmpty()) { + filePath_ = other.filePath_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + command_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + user_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + fileType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filePath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object command_ = ""; + /** + * + * + *
+     * Opened file command.
+     * 
+ * + * string command = 1; + * + * @return The command. + */ + public java.lang.String getCommand() { + java.lang.Object ref = command_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + command_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Opened file command.
+     * 
+ * + * string command = 1; + * + * @return The bytes for command. + */ + public com.google.protobuf.ByteString getCommandBytes() { + java.lang.Object ref = command_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + command_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Opened file command.
+     * 
+ * + * string command = 1; + * + * @param value The command to set. + * @return This builder for chaining. + */ + public Builder setCommand(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + command_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Opened file command.
+     * 
+ * + * string command = 1; + * + * @return This builder for chaining. + */ + public Builder clearCommand() { + command_ = getDefaultInstance().getCommand(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Opened file command.
+     * 
+ * + * string command = 1; + * + * @param value The bytes for command to set. + * @return This builder for chaining. + */ + public Builder setCommandBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + command_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object user_ = ""; + /** + * + * + *
+     * Opened file user.
+     * 
+ * + * string user = 2; + * + * @return The user. + */ + public java.lang.String getUser() { + java.lang.Object ref = user_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + user_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Opened file user.
+     * 
+ * + * string user = 2; + * + * @return The bytes for user. + */ + public com.google.protobuf.ByteString getUserBytes() { + java.lang.Object ref = user_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + user_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Opened file user.
+     * 
+ * + * string user = 2; + * + * @param value The user to set. + * @return This builder for chaining. + */ + public Builder setUser(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Opened file user.
+     * 
+ * + * string user = 2; + * + * @return This builder for chaining. + */ + public Builder clearUser() { + user_ = getDefaultInstance().getUser(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Opened file user.
+     * 
+ * + * string user = 2; + * + * @param value The bytes for user to set. + * @return This builder for chaining. + */ + public Builder setUserBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + user_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object fileType_ = ""; + /** + * + * + *
+     * Opened file file type.
+     * 
+ * + * string file_type = 3; + * + * @return The fileType. + */ + public java.lang.String getFileType() { + java.lang.Object ref = fileType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Opened file file type.
+     * 
+ * + * string file_type = 3; + * + * @return The bytes for fileType. + */ + public com.google.protobuf.ByteString getFileTypeBytes() { + java.lang.Object ref = fileType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Opened file file type.
+     * 
+ * + * string file_type = 3; + * + * @param value The fileType to set. + * @return This builder for chaining. + */ + public Builder setFileType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fileType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Opened file file type.
+     * 
+ * + * string file_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearFileType() { + fileType_ = getDefaultInstance().getFileType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Opened file file type.
+     * 
+ * + * string file_type = 3; + * + * @param value The bytes for fileType to set. + * @return This builder for chaining. + */ + public Builder setFileTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fileType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filePath_ = ""; + /** + * + * + *
+     * Opened file file path.
+     * 
+ * + * string file_path = 4; + * + * @return The filePath. + */ + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Opened file file path.
+     * 
+ * + * string file_path = 4; + * + * @return The bytes for filePath. + */ + public com.google.protobuf.ByteString getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Opened file file path.
+     * 
+ * + * string file_path = 4; + * + * @param value The filePath to set. + * @return This builder for chaining. + */ + public Builder setFilePath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filePath_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Opened file file path.
+     * 
+ * + * string file_path = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilePath() { + filePath_ = getDefaultInstance().getFilePath(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Opened file file path.
+     * 
+ * + * string file_path = 4; + * + * @param value The bytes for filePath to set. + * @return This builder for chaining. + */ + public Builder setFilePathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filePath_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.OpenFileDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.OpenFileDetails) + private static final com.google.cloud.migrationcenter.v1.OpenFileDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.OpenFileDetails(); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenFileDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileDetailsOrBuilder.java new file mode 100644 index 000000000000..aa912faef11e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileDetailsOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface OpenFileDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.OpenFileDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Opened file command.
+   * 
+ * + * string command = 1; + * + * @return The command. + */ + java.lang.String getCommand(); + /** + * + * + *
+   * Opened file command.
+   * 
+ * + * string command = 1; + * + * @return The bytes for command. + */ + com.google.protobuf.ByteString getCommandBytes(); + + /** + * + * + *
+   * Opened file user.
+   * 
+ * + * string user = 2; + * + * @return The user. + */ + java.lang.String getUser(); + /** + * + * + *
+   * Opened file user.
+   * 
+ * + * string user = 2; + * + * @return The bytes for user. + */ + com.google.protobuf.ByteString getUserBytes(); + + /** + * + * + *
+   * Opened file file type.
+   * 
+ * + * string file_type = 3; + * + * @return The fileType. + */ + java.lang.String getFileType(); + /** + * + * + *
+   * Opened file file type.
+   * 
+ * + * string file_type = 3; + * + * @return The bytes for fileType. + */ + com.google.protobuf.ByteString getFileTypeBytes(); + + /** + * + * + *
+   * Opened file file path.
+   * 
+ * + * string file_path = 4; + * + * @return The filePath. + */ + java.lang.String getFilePath(); + /** + * + * + *
+   * Opened file file path.
+   * 
+ * + * string file_path = 4; + * + * @return The bytes for filePath. + */ + com.google.protobuf.ByteString getFilePathBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileList.java new file mode 100644 index 000000000000..42edffd11b92 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileList.java @@ -0,0 +1,945 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Open file list.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.OpenFileList} + */ +public final class OpenFileList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.OpenFileList) + OpenFileListOrBuilder { + private static final long serialVersionUID = 0L; + // Use OpenFileList.newBuilder() to construct. + private OpenFileList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OpenFileList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpenFileList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OpenFileList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OpenFileList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.OpenFileList.class, + com.google.cloud.migrationcenter.v1.OpenFileList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * Open file details entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Open file details entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Open file details entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Open file details entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileDetails getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Open file details entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileDetailsOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.OpenFileList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.OpenFileList other = + (com.google.cloud.migrationcenter.v1.OpenFileList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.OpenFileList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Open file list.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.OpenFileList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.OpenFileList) + com.google.cloud.migrationcenter.v1.OpenFileListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OpenFileList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OpenFileList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.OpenFileList.class, + com.google.cloud.migrationcenter.v1.OpenFileList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.OpenFileList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OpenFileList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.OpenFileList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileList build() { + com.google.cloud.migrationcenter.v1.OpenFileList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileList buildPartial() { + com.google.cloud.migrationcenter.v1.OpenFileList result = + new com.google.cloud.migrationcenter.v1.OpenFileList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.OpenFileList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.OpenFileList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.OpenFileList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.OpenFileList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.OpenFileList other) { + if (other == com.google.cloud.migrationcenter.v1.OpenFileList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.OpenFileDetails m = + input.readMessage( + com.google.cloud.migrationcenter.v1.OpenFileDetails.parser(), + extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.OpenFileDetails, + com.google.cloud.migrationcenter.v1.OpenFileDetails.Builder, + com.google.cloud.migrationcenter.v1.OpenFileDetailsOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public com.google.cloud.migrationcenter.v1.OpenFileDetails getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.OpenFileDetails value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.OpenFileDetails.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.OpenFileDetails value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.OpenFileDetails value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.OpenFileDetails.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.OpenFileDetails.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public com.google.cloud.migrationcenter.v1.OpenFileDetails.Builder getEntriesBuilder( + int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public com.google.cloud.migrationcenter.v1.OpenFileDetailsOrBuilder getEntriesOrBuilder( + int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public com.google.cloud.migrationcenter.v1.OpenFileDetails.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.OpenFileDetails.getDefaultInstance()); + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public com.google.cloud.migrationcenter.v1.OpenFileDetails.Builder addEntriesBuilder( + int index) { + return getEntriesFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.OpenFileDetails.getDefaultInstance()); + } + /** + * + * + *
+     * Open file details entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.OpenFileDetails, + com.google.cloud.migrationcenter.v1.OpenFileDetails.Builder, + com.google.cloud.migrationcenter.v1.OpenFileDetailsOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.OpenFileDetails, + com.google.cloud.migrationcenter.v1.OpenFileDetails.Builder, + com.google.cloud.migrationcenter.v1.OpenFileDetailsOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.OpenFileList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.OpenFileList) + private static final com.google.cloud.migrationcenter.v1.OpenFileList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.OpenFileList(); + } + + public static com.google.cloud.migrationcenter.v1.OpenFileList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenFileList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OpenFileList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileListOrBuilder.java new file mode 100644 index 000000000000..033422653845 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OpenFileListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface OpenFileListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.OpenFileList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Open file details entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Open file details entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + com.google.cloud.migrationcenter.v1.OpenFileDetails getEntries(int index); + /** + * + * + *
+   * Open file details entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Open file details entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Open file details entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + com.google.cloud.migrationcenter.v1.OpenFileDetailsOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperatingSystemFamily.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperatingSystemFamily.java new file mode 100644 index 000000000000..c4525c124d38 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperatingSystemFamily.java @@ -0,0 +1,187 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Known categories of operating systems.
+ * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.OperatingSystemFamily} + */ +public enum OperatingSystemFamily implements com.google.protobuf.ProtocolMessageEnum { + /** OS_FAMILY_UNKNOWN = 0; */ + OS_FAMILY_UNKNOWN(0), + /** + * + * + *
+   * Microsoft Windows Server and Desktop.
+   * 
+ * + * OS_FAMILY_WINDOWS = 1; + */ + OS_FAMILY_WINDOWS(1), + /** + * + * + *
+   * Various Linux flavors.
+   * 
+ * + * OS_FAMILY_LINUX = 2; + */ + OS_FAMILY_LINUX(2), + /** + * + * + *
+   * Non-Linux Unix flavors.
+   * 
+ * + * OS_FAMILY_UNIX = 3; + */ + OS_FAMILY_UNIX(3), + UNRECOGNIZED(-1), + ; + + /** OS_FAMILY_UNKNOWN = 0; */ + public static final int OS_FAMILY_UNKNOWN_VALUE = 0; + /** + * + * + *
+   * Microsoft Windows Server and Desktop.
+   * 
+ * + * OS_FAMILY_WINDOWS = 1; + */ + public static final int OS_FAMILY_WINDOWS_VALUE = 1; + /** + * + * + *
+   * Various Linux flavors.
+   * 
+ * + * OS_FAMILY_LINUX = 2; + */ + public static final int OS_FAMILY_LINUX_VALUE = 2; + /** + * + * + *
+   * Non-Linux Unix flavors.
+   * 
+ * + * OS_FAMILY_UNIX = 3; + */ + public static final int OS_FAMILY_UNIX_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OperatingSystemFamily valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static OperatingSystemFamily forNumber(int value) { + switch (value) { + case 0: + return OS_FAMILY_UNKNOWN; + case 1: + return OS_FAMILY_WINDOWS; + case 2: + return OS_FAMILY_LINUX; + case 3: + return OS_FAMILY_UNIX; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public OperatingSystemFamily findValueByNumber(int number) { + return OperatingSystemFamily.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final OperatingSystemFamily[] VALUES = values(); + + public static OperatingSystemFamily valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private OperatingSystemFamily(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.OperatingSystemFamily) +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperationMetadata.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperationMetadata.java new file mode 100644 index 000000000000..027868938b76 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperationMetadata.java @@ -0,0 +1,1829 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.OperationMetadata.class, + com.google.cloud.migrationcenter.v1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.OperationMetadata other = + (com.google.cloud.migrationcenter.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.OperationMetadata) + com.google.cloud.migrationcenter.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.OperationMetadata.class, + com.google.cloud.migrationcenter.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.OperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OperationMetadata build() { + com.google.cloud.migrationcenter.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OperationMetadata buildPartial() { + com.google.cloud.migrationcenter.v1.OperationMetadata result = + new com.google.cloud.migrationcenter.v1.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.migrationcenter.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.OperationMetadata other) { + if (other == com.google.cloud.migrationcenter.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.OperationMetadata) + private static final com.google.cloud.migrationcenter.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.OperationMetadata(); + } + + public static com.google.cloud.migrationcenter.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperationMetadataOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..28b123ef091a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,218 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PerformanceSample.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PerformanceSample.java new file mode 100644 index 000000000000..a4eaef055ab3 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PerformanceSample.java @@ -0,0 +1,1764 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Performance data sample.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.PerformanceSample} + */ +public final class PerformanceSample extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.PerformanceSample) + PerformanceSampleOrBuilder { + private static final long serialVersionUID = 0L; + // Use PerformanceSample.newBuilder() to construct. + private PerformanceSample(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PerformanceSample() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PerformanceSample(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PerformanceSample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PerformanceSample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.PerformanceSample.class, + com.google.cloud.migrationcenter.v1.PerformanceSample.Builder.class); + } + + public static final int SAMPLE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp sampleTime_; + /** + * + * + *
+   * Time the sample was collected.
+   * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + * + * @return Whether the sampleTime field is set. + */ + @java.lang.Override + public boolean hasSampleTime() { + return sampleTime_ != null; + } + /** + * + * + *
+   * Time the sample was collected.
+   * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + * + * @return The sampleTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSampleTime() { + return sampleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sampleTime_; + } + /** + * + * + *
+   * Time the sample was collected.
+   * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSampleTimeOrBuilder() { + return sampleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sampleTime_; + } + + public static final int MEMORY_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.MemoryUsageSample memory_; + /** + * + * + *
+   * Memory usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + * + * @return Whether the memory field is set. + */ + @java.lang.Override + public boolean hasMemory() { + return memory_ != null; + } + /** + * + * + *
+   * Memory usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + * + * @return The memory. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MemoryUsageSample getMemory() { + return memory_ == null + ? com.google.cloud.migrationcenter.v1.MemoryUsageSample.getDefaultInstance() + : memory_; + } + /** + * + * + *
+   * Memory usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MemoryUsageSampleOrBuilder getMemoryOrBuilder() { + return memory_ == null + ? com.google.cloud.migrationcenter.v1.MemoryUsageSample.getDefaultInstance() + : memory_; + } + + public static final int CPU_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.CpuUsageSample cpu_; + /** + * + * + *
+   * CPU usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + * + * @return Whether the cpu field is set. + */ + @java.lang.Override + public boolean hasCpu() { + return cpu_ != null; + } + /** + * + * + *
+   * CPU usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + * + * @return The cpu. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CpuUsageSample getCpu() { + return cpu_ == null + ? com.google.cloud.migrationcenter.v1.CpuUsageSample.getDefaultInstance() + : cpu_; + } + /** + * + * + *
+   * CPU usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CpuUsageSampleOrBuilder getCpuOrBuilder() { + return cpu_ == null + ? com.google.cloud.migrationcenter.v1.CpuUsageSample.getDefaultInstance() + : cpu_; + } + + public static final int NETWORK_FIELD_NUMBER = 4; + private com.google.cloud.migrationcenter.v1.NetworkUsageSample network_; + /** + * + * + *
+   * Network usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return network_ != null; + } + /** + * + * + *
+   * Network usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + * + * @return The network. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkUsageSample getNetwork() { + return network_ == null + ? com.google.cloud.migrationcenter.v1.NetworkUsageSample.getDefaultInstance() + : network_; + } + /** + * + * + *
+   * Network usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkUsageSampleOrBuilder getNetworkOrBuilder() { + return network_ == null + ? com.google.cloud.migrationcenter.v1.NetworkUsageSample.getDefaultInstance() + : network_; + } + + public static final int DISK_FIELD_NUMBER = 5; + private com.google.cloud.migrationcenter.v1.DiskUsageSample disk_; + /** + * + * + *
+   * Disk usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + * + * @return Whether the disk field is set. + */ + @java.lang.Override + public boolean hasDisk() { + return disk_ != null; + } + /** + * + * + *
+   * Disk usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + * + * @return The disk. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskUsageSample getDisk() { + return disk_ == null + ? com.google.cloud.migrationcenter.v1.DiskUsageSample.getDefaultInstance() + : disk_; + } + /** + * + * + *
+   * Disk usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.DiskUsageSampleOrBuilder getDiskOrBuilder() { + return disk_ == null + ? com.google.cloud.migrationcenter.v1.DiskUsageSample.getDefaultInstance() + : disk_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sampleTime_ != null) { + output.writeMessage(1, getSampleTime()); + } + if (memory_ != null) { + output.writeMessage(2, getMemory()); + } + if (cpu_ != null) { + output.writeMessage(3, getCpu()); + } + if (network_ != null) { + output.writeMessage(4, getNetwork()); + } + if (disk_ != null) { + output.writeMessage(5, getDisk()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sampleTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSampleTime()); + } + if (memory_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMemory()); + } + if (cpu_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCpu()); + } + if (network_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getNetwork()); + } + if (disk_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDisk()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.PerformanceSample)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.PerformanceSample other = + (com.google.cloud.migrationcenter.v1.PerformanceSample) obj; + + if (hasSampleTime() != other.hasSampleTime()) return false; + if (hasSampleTime()) { + if (!getSampleTime().equals(other.getSampleTime())) return false; + } + if (hasMemory() != other.hasMemory()) return false; + if (hasMemory()) { + if (!getMemory().equals(other.getMemory())) return false; + } + if (hasCpu() != other.hasCpu()) return false; + if (hasCpu()) { + if (!getCpu().equals(other.getCpu())) return false; + } + if (hasNetwork() != other.hasNetwork()) return false; + if (hasNetwork()) { + if (!getNetwork().equals(other.getNetwork())) return false; + } + if (hasDisk() != other.hasDisk()) return false; + if (hasDisk()) { + if (!getDisk().equals(other.getDisk())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSampleTime()) { + hash = (37 * hash) + SAMPLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSampleTime().hashCode(); + } + if (hasMemory()) { + hash = (37 * hash) + MEMORY_FIELD_NUMBER; + hash = (53 * hash) + getMemory().hashCode(); + } + if (hasCpu()) { + hash = (37 * hash) + CPU_FIELD_NUMBER; + hash = (53 * hash) + getCpu().hashCode(); + } + if (hasNetwork()) { + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + } + if (hasDisk()) { + hash = (37 * hash) + DISK_FIELD_NUMBER; + hash = (53 * hash) + getDisk().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.PerformanceSample prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Performance data sample.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.PerformanceSample} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.PerformanceSample) + com.google.cloud.migrationcenter.v1.PerformanceSampleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PerformanceSample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PerformanceSample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.PerformanceSample.class, + com.google.cloud.migrationcenter.v1.PerformanceSample.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.PerformanceSample.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + memory_ = null; + if (memoryBuilder_ != null) { + memoryBuilder_.dispose(); + memoryBuilder_ = null; + } + cpu_ = null; + if (cpuBuilder_ != null) { + cpuBuilder_.dispose(); + cpuBuilder_ = null; + } + network_ = null; + if (networkBuilder_ != null) { + networkBuilder_.dispose(); + networkBuilder_ = null; + } + disk_ = null; + if (diskBuilder_ != null) { + diskBuilder_.dispose(); + diskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PerformanceSample_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PerformanceSample getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.PerformanceSample.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PerformanceSample build() { + com.google.cloud.migrationcenter.v1.PerformanceSample result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PerformanceSample buildPartial() { + com.google.cloud.migrationcenter.v1.PerformanceSample result = + new com.google.cloud.migrationcenter.v1.PerformanceSample(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.PerformanceSample result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sampleTime_ = sampleTimeBuilder_ == null ? sampleTime_ : sampleTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.memory_ = memoryBuilder_ == null ? memory_ : memoryBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cpu_ = cpuBuilder_ == null ? cpu_ : cpuBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.network_ = networkBuilder_ == null ? network_ : networkBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.disk_ = diskBuilder_ == null ? disk_ : diskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.PerformanceSample) { + return mergeFrom((com.google.cloud.migrationcenter.v1.PerformanceSample) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.PerformanceSample other) { + if (other == com.google.cloud.migrationcenter.v1.PerformanceSample.getDefaultInstance()) + return this; + if (other.hasSampleTime()) { + mergeSampleTime(other.getSampleTime()); + } + if (other.hasMemory()) { + mergeMemory(other.getMemory()); + } + if (other.hasCpu()) { + mergeCpu(other.getCpu()); + } + if (other.hasNetwork()) { + mergeNetwork(other.getNetwork()); + } + if (other.hasDisk()) { + mergeDisk(other.getDisk()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSampleTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getMemoryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCpuFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getNetworkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getDiskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp sampleTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + sampleTimeBuilder_; + /** + * + * + *
+     * Time the sample was collected.
+     * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + * + * @return Whether the sampleTime field is set. + */ + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Time the sample was collected.
+     * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + * + * @return The sampleTime. + */ + public com.google.protobuf.Timestamp getSampleTime() { + if (sampleTimeBuilder_ == null) { + return sampleTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : sampleTime_; + } else { + return sampleTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time the sample was collected.
+     * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + */ + public Builder setSampleTime(com.google.protobuf.Timestamp value) { + if (sampleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sampleTime_ = value; + } else { + sampleTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Time the sample was collected.
+     * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + */ + public Builder setSampleTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (sampleTimeBuilder_ == null) { + sampleTime_ = builderForValue.build(); + } else { + sampleTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Time the sample was collected.
+     * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + */ + public Builder mergeSampleTime(com.google.protobuf.Timestamp value) { + if (sampleTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sampleTime_ != null + && sampleTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSampleTimeBuilder().mergeFrom(value); + } else { + sampleTime_ = value; + } + } else { + sampleTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Time the sample was collected.
+     * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + */ + public Builder clearSampleTime() { + bitField0_ = (bitField0_ & ~0x00000001); + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Time the sample was collected.
+     * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getSampleTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSampleTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time the sample was collected.
+     * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getSampleTimeOrBuilder() { + if (sampleTimeBuilder_ != null) { + return sampleTimeBuilder_.getMessageOrBuilder(); + } else { + return sampleTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : sampleTime_; + } + } + /** + * + * + *
+     * Time the sample was collected.
+     * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getSampleTimeFieldBuilder() { + if (sampleTimeBuilder_ == null) { + sampleTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getSampleTime(), getParentForChildren(), isClean()); + sampleTime_ = null; + } + return sampleTimeBuilder_; + } + + private com.google.cloud.migrationcenter.v1.MemoryUsageSample memory_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MemoryUsageSample, + com.google.cloud.migrationcenter.v1.MemoryUsageSample.Builder, + com.google.cloud.migrationcenter.v1.MemoryUsageSampleOrBuilder> + memoryBuilder_; + /** + * + * + *
+     * Memory usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + * + * @return Whether the memory field is set. + */ + public boolean hasMemory() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Memory usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + * + * @return The memory. + */ + public com.google.cloud.migrationcenter.v1.MemoryUsageSample getMemory() { + if (memoryBuilder_ == null) { + return memory_ == null + ? com.google.cloud.migrationcenter.v1.MemoryUsageSample.getDefaultInstance() + : memory_; + } else { + return memoryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Memory usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + */ + public Builder setMemory(com.google.cloud.migrationcenter.v1.MemoryUsageSample value) { + if (memoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + memory_ = value; + } else { + memoryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Memory usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + */ + public Builder setMemory( + com.google.cloud.migrationcenter.v1.MemoryUsageSample.Builder builderForValue) { + if (memoryBuilder_ == null) { + memory_ = builderForValue.build(); + } else { + memoryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Memory usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + */ + public Builder mergeMemory(com.google.cloud.migrationcenter.v1.MemoryUsageSample value) { + if (memoryBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && memory_ != null + && memory_ + != com.google.cloud.migrationcenter.v1.MemoryUsageSample.getDefaultInstance()) { + getMemoryBuilder().mergeFrom(value); + } else { + memory_ = value; + } + } else { + memoryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Memory usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + */ + public Builder clearMemory() { + bitField0_ = (bitField0_ & ~0x00000002); + memory_ = null; + if (memoryBuilder_ != null) { + memoryBuilder_.dispose(); + memoryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Memory usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + */ + public com.google.cloud.migrationcenter.v1.MemoryUsageSample.Builder getMemoryBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMemoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Memory usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + */ + public com.google.cloud.migrationcenter.v1.MemoryUsageSampleOrBuilder getMemoryOrBuilder() { + if (memoryBuilder_ != null) { + return memoryBuilder_.getMessageOrBuilder(); + } else { + return memory_ == null + ? com.google.cloud.migrationcenter.v1.MemoryUsageSample.getDefaultInstance() + : memory_; + } + } + /** + * + * + *
+     * Memory usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MemoryUsageSample, + com.google.cloud.migrationcenter.v1.MemoryUsageSample.Builder, + com.google.cloud.migrationcenter.v1.MemoryUsageSampleOrBuilder> + getMemoryFieldBuilder() { + if (memoryBuilder_ == null) { + memoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MemoryUsageSample, + com.google.cloud.migrationcenter.v1.MemoryUsageSample.Builder, + com.google.cloud.migrationcenter.v1.MemoryUsageSampleOrBuilder>( + getMemory(), getParentForChildren(), isClean()); + memory_ = null; + } + return memoryBuilder_; + } + + private com.google.cloud.migrationcenter.v1.CpuUsageSample cpu_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.CpuUsageSample, + com.google.cloud.migrationcenter.v1.CpuUsageSample.Builder, + com.google.cloud.migrationcenter.v1.CpuUsageSampleOrBuilder> + cpuBuilder_; + /** + * + * + *
+     * CPU usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + * + * @return Whether the cpu field is set. + */ + public boolean hasCpu() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * CPU usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + * + * @return The cpu. + */ + public com.google.cloud.migrationcenter.v1.CpuUsageSample getCpu() { + if (cpuBuilder_ == null) { + return cpu_ == null + ? com.google.cloud.migrationcenter.v1.CpuUsageSample.getDefaultInstance() + : cpu_; + } else { + return cpuBuilder_.getMessage(); + } + } + /** + * + * + *
+     * CPU usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + */ + public Builder setCpu(com.google.cloud.migrationcenter.v1.CpuUsageSample value) { + if (cpuBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cpu_ = value; + } else { + cpuBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * CPU usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + */ + public Builder setCpu( + com.google.cloud.migrationcenter.v1.CpuUsageSample.Builder builderForValue) { + if (cpuBuilder_ == null) { + cpu_ = builderForValue.build(); + } else { + cpuBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * CPU usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + */ + public Builder mergeCpu(com.google.cloud.migrationcenter.v1.CpuUsageSample value) { + if (cpuBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && cpu_ != null + && cpu_ != com.google.cloud.migrationcenter.v1.CpuUsageSample.getDefaultInstance()) { + getCpuBuilder().mergeFrom(value); + } else { + cpu_ = value; + } + } else { + cpuBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * CPU usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + */ + public Builder clearCpu() { + bitField0_ = (bitField0_ & ~0x00000004); + cpu_ = null; + if (cpuBuilder_ != null) { + cpuBuilder_.dispose(); + cpuBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * CPU usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + */ + public com.google.cloud.migrationcenter.v1.CpuUsageSample.Builder getCpuBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCpuFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * CPU usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + */ + public com.google.cloud.migrationcenter.v1.CpuUsageSampleOrBuilder getCpuOrBuilder() { + if (cpuBuilder_ != null) { + return cpuBuilder_.getMessageOrBuilder(); + } else { + return cpu_ == null + ? com.google.cloud.migrationcenter.v1.CpuUsageSample.getDefaultInstance() + : cpu_; + } + } + /** + * + * + *
+     * CPU usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.CpuUsageSample, + com.google.cloud.migrationcenter.v1.CpuUsageSample.Builder, + com.google.cloud.migrationcenter.v1.CpuUsageSampleOrBuilder> + getCpuFieldBuilder() { + if (cpuBuilder_ == null) { + cpuBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.CpuUsageSample, + com.google.cloud.migrationcenter.v1.CpuUsageSample.Builder, + com.google.cloud.migrationcenter.v1.CpuUsageSampleOrBuilder>( + getCpu(), getParentForChildren(), isClean()); + cpu_ = null; + } + return cpuBuilder_; + } + + private com.google.cloud.migrationcenter.v1.NetworkUsageSample network_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkUsageSample, + com.google.cloud.migrationcenter.v1.NetworkUsageSample.Builder, + com.google.cloud.migrationcenter.v1.NetworkUsageSampleOrBuilder> + networkBuilder_; + /** + * + * + *
+     * Network usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + * + * @return Whether the network field is set. + */ + public boolean hasNetwork() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Network usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + * + * @return The network. + */ + public com.google.cloud.migrationcenter.v1.NetworkUsageSample getNetwork() { + if (networkBuilder_ == null) { + return network_ == null + ? com.google.cloud.migrationcenter.v1.NetworkUsageSample.getDefaultInstance() + : network_; + } else { + return networkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Network usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + */ + public Builder setNetwork(com.google.cloud.migrationcenter.v1.NetworkUsageSample value) { + if (networkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + } else { + networkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Network usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + */ + public Builder setNetwork( + com.google.cloud.migrationcenter.v1.NetworkUsageSample.Builder builderForValue) { + if (networkBuilder_ == null) { + network_ = builderForValue.build(); + } else { + networkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Network usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + */ + public Builder mergeNetwork(com.google.cloud.migrationcenter.v1.NetworkUsageSample value) { + if (networkBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && network_ != null + && network_ + != com.google.cloud.migrationcenter.v1.NetworkUsageSample.getDefaultInstance()) { + getNetworkBuilder().mergeFrom(value); + } else { + network_ = value; + } + } else { + networkBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Network usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + */ + public Builder clearNetwork() { + bitField0_ = (bitField0_ & ~0x00000008); + network_ = null; + if (networkBuilder_ != null) { + networkBuilder_.dispose(); + networkBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Network usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + */ + public com.google.cloud.migrationcenter.v1.NetworkUsageSample.Builder getNetworkBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Network usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + */ + public com.google.cloud.migrationcenter.v1.NetworkUsageSampleOrBuilder getNetworkOrBuilder() { + if (networkBuilder_ != null) { + return networkBuilder_.getMessageOrBuilder(); + } else { + return network_ == null + ? com.google.cloud.migrationcenter.v1.NetworkUsageSample.getDefaultInstance() + : network_; + } + } + /** + * + * + *
+     * Network usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkUsageSample, + com.google.cloud.migrationcenter.v1.NetworkUsageSample.Builder, + com.google.cloud.migrationcenter.v1.NetworkUsageSampleOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + networkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkUsageSample, + com.google.cloud.migrationcenter.v1.NetworkUsageSample.Builder, + com.google.cloud.migrationcenter.v1.NetworkUsageSampleOrBuilder>( + getNetwork(), getParentForChildren(), isClean()); + network_ = null; + } + return networkBuilder_; + } + + private com.google.cloud.migrationcenter.v1.DiskUsageSample disk_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskUsageSample, + com.google.cloud.migrationcenter.v1.DiskUsageSample.Builder, + com.google.cloud.migrationcenter.v1.DiskUsageSampleOrBuilder> + diskBuilder_; + /** + * + * + *
+     * Disk usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + * + * @return Whether the disk field is set. + */ + public boolean hasDisk() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Disk usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + * + * @return The disk. + */ + public com.google.cloud.migrationcenter.v1.DiskUsageSample getDisk() { + if (diskBuilder_ == null) { + return disk_ == null + ? com.google.cloud.migrationcenter.v1.DiskUsageSample.getDefaultInstance() + : disk_; + } else { + return diskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Disk usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + */ + public Builder setDisk(com.google.cloud.migrationcenter.v1.DiskUsageSample value) { + if (diskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + disk_ = value; + } else { + diskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + */ + public Builder setDisk( + com.google.cloud.migrationcenter.v1.DiskUsageSample.Builder builderForValue) { + if (diskBuilder_ == null) { + disk_ = builderForValue.build(); + } else { + diskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + */ + public Builder mergeDisk(com.google.cloud.migrationcenter.v1.DiskUsageSample value) { + if (diskBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && disk_ != null + && disk_ != com.google.cloud.migrationcenter.v1.DiskUsageSample.getDefaultInstance()) { + getDiskBuilder().mergeFrom(value); + } else { + disk_ = value; + } + } else { + diskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Disk usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + */ + public Builder clearDisk() { + bitField0_ = (bitField0_ & ~0x00000010); + disk_ = null; + if (diskBuilder_ != null) { + diskBuilder_.dispose(); + diskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Disk usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + */ + public com.google.cloud.migrationcenter.v1.DiskUsageSample.Builder getDiskBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getDiskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Disk usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + */ + public com.google.cloud.migrationcenter.v1.DiskUsageSampleOrBuilder getDiskOrBuilder() { + if (diskBuilder_ != null) { + return diskBuilder_.getMessageOrBuilder(); + } else { + return disk_ == null + ? com.google.cloud.migrationcenter.v1.DiskUsageSample.getDefaultInstance() + : disk_; + } + } + /** + * + * + *
+     * Disk usage sample.
+     * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskUsageSample, + com.google.cloud.migrationcenter.v1.DiskUsageSample.Builder, + com.google.cloud.migrationcenter.v1.DiskUsageSampleOrBuilder> + getDiskFieldBuilder() { + if (diskBuilder_ == null) { + diskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.DiskUsageSample, + com.google.cloud.migrationcenter.v1.DiskUsageSample.Builder, + com.google.cloud.migrationcenter.v1.DiskUsageSampleOrBuilder>( + getDisk(), getParentForChildren(), isClean()); + disk_ = null; + } + return diskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.PerformanceSample) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.PerformanceSample) + private static final com.google.cloud.migrationcenter.v1.PerformanceSample DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.PerformanceSample(); + } + + public static com.google.cloud.migrationcenter.v1.PerformanceSample getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PerformanceSample parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PerformanceSample getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PerformanceSampleOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PerformanceSampleOrBuilder.java new file mode 100644 index 000000000000..25ac962bb543 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PerformanceSampleOrBuilder.java @@ -0,0 +1,200 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface PerformanceSampleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.PerformanceSample) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Time the sample was collected.
+   * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + * + * @return Whether the sampleTime field is set. + */ + boolean hasSampleTime(); + /** + * + * + *
+   * Time the sample was collected.
+   * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + * + * @return The sampleTime. + */ + com.google.protobuf.Timestamp getSampleTime(); + /** + * + * + *
+   * Time the sample was collected.
+   * 
+ * + * .google.protobuf.Timestamp sample_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getSampleTimeOrBuilder(); + + /** + * + * + *
+   * Memory usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + * + * @return Whether the memory field is set. + */ + boolean hasMemory(); + /** + * + * + *
+   * Memory usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + * + * @return The memory. + */ + com.google.cloud.migrationcenter.v1.MemoryUsageSample getMemory(); + /** + * + * + *
+   * Memory usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + */ + com.google.cloud.migrationcenter.v1.MemoryUsageSampleOrBuilder getMemoryOrBuilder(); + + /** + * + * + *
+   * CPU usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + * + * @return Whether the cpu field is set. + */ + boolean hasCpu(); + /** + * + * + *
+   * CPU usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + * + * @return The cpu. + */ + com.google.cloud.migrationcenter.v1.CpuUsageSample getCpu(); + /** + * + * + *
+   * CPU usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + */ + com.google.cloud.migrationcenter.v1.CpuUsageSampleOrBuilder getCpuOrBuilder(); + + /** + * + * + *
+   * Network usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * Network usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + * + * @return The network. + */ + com.google.cloud.migrationcenter.v1.NetworkUsageSample getNetwork(); + /** + * + * + *
+   * Network usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + */ + com.google.cloud.migrationcenter.v1.NetworkUsageSampleOrBuilder getNetworkOrBuilder(); + + /** + * + * + *
+   * Disk usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + * + * @return Whether the disk field is set. + */ + boolean hasDisk(); + /** + * + * + *
+   * Disk usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + * + * @return The disk. + */ + com.google.cloud.migrationcenter.v1.DiskUsageSample getDisk(); + /** + * + * + *
+   * Disk usage sample.
+   * 
+ * + * .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + */ + com.google.cloud.migrationcenter.v1.DiskUsageSampleOrBuilder getDiskOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PersistentDiskType.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PersistentDiskType.java new file mode 100644 index 000000000000..ef079234f7bd --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PersistentDiskType.java @@ -0,0 +1,206 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * The persistent disk (PD) types of Compute Engine virtual machines.
+ * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.PersistentDiskType} + */ +public enum PersistentDiskType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified (default value).
+   * Selecting this value allows the system to use any disk type according
+   * to reported usage. This a good value to start with.
+   * 
+ * + * PERSISTENT_DISK_TYPE_UNSPECIFIED = 0; + */ + PERSISTENT_DISK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Standard HDD Persistent Disk.
+   * 
+ * + * PERSISTENT_DISK_TYPE_STANDARD = 1; + */ + PERSISTENT_DISK_TYPE_STANDARD(1), + /** + * + * + *
+   * Balanced Persistent Disk.
+   * 
+ * + * PERSISTENT_DISK_TYPE_BALANCED = 2; + */ + PERSISTENT_DISK_TYPE_BALANCED(2), + /** + * + * + *
+   * SSD Persistent Disk.
+   * 
+ * + * PERSISTENT_DISK_TYPE_SSD = 3; + */ + PERSISTENT_DISK_TYPE_SSD(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified (default value).
+   * Selecting this value allows the system to use any disk type according
+   * to reported usage. This a good value to start with.
+   * 
+ * + * PERSISTENT_DISK_TYPE_UNSPECIFIED = 0; + */ + public static final int PERSISTENT_DISK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Standard HDD Persistent Disk.
+   * 
+ * + * PERSISTENT_DISK_TYPE_STANDARD = 1; + */ + public static final int PERSISTENT_DISK_TYPE_STANDARD_VALUE = 1; + /** + * + * + *
+   * Balanced Persistent Disk.
+   * 
+ * + * PERSISTENT_DISK_TYPE_BALANCED = 2; + */ + public static final int PERSISTENT_DISK_TYPE_BALANCED_VALUE = 2; + /** + * + * + *
+   * SSD Persistent Disk.
+   * 
+ * + * PERSISTENT_DISK_TYPE_SSD = 3; + */ + public static final int PERSISTENT_DISK_TYPE_SSD_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PersistentDiskType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PersistentDiskType forNumber(int value) { + switch (value) { + case 0: + return PERSISTENT_DISK_TYPE_UNSPECIFIED; + case 1: + return PERSISTENT_DISK_TYPE_STANDARD; + case 2: + return PERSISTENT_DISK_TYPE_BALANCED; + case 3: + return PERSISTENT_DISK_TYPE_SSD; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PersistentDiskType findValueByNumber(int number) { + return PersistentDiskType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto.getDescriptor() + .getEnumTypes() + .get(5); + } + + private static final PersistentDiskType[] VALUES = values(); + + public static PersistentDiskType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PersistentDiskType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.PersistentDiskType) +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PhysicalPlatformDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PhysicalPlatformDetails.java new file mode 100644 index 000000000000..faea6dd05cf4 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PhysicalPlatformDetails.java @@ -0,0 +1,639 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Platform specific details for Physical Machines.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.PhysicalPlatformDetails} + */ +public final class PhysicalPlatformDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.PhysicalPlatformDetails) + PhysicalPlatformDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use PhysicalPlatformDetails.newBuilder() to construct. + private PhysicalPlatformDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PhysicalPlatformDetails() { + location_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PhysicalPlatformDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PhysicalPlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PhysicalPlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.class, + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.Builder.class); + } + + public static final int LOCATION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + /** + * + * + *
+   * Free text representation of the machine location.
+   * The format of this field should not be relied on. Different machines in the
+   * same location may have different string values for this field.
+   * 
+ * + * string location = 1; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * Free text representation of the machine location.
+   * The format of this field should not be relied on. Different machines in the
+   * same location may have different string values for this field.
+   * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails other = + (com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails) obj; + + if (!getLocation().equals(other.getLocation())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Platform specific details for Physical Machines.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.PhysicalPlatformDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.PhysicalPlatformDetails) + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PhysicalPlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PhysicalPlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.class, + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + location_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PhysicalPlatformDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails build() { + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails buildPartial() { + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails result = + new com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.location_ = location_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails other) { + if (other == com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.getDefaultInstance()) + return this; + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * Free text representation of the machine location.
+     * The format of this field should not be relied on. Different machines in the
+     * same location may have different string values for this field.
+     * 
+ * + * string location = 1; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Free text representation of the machine location.
+     * The format of this field should not be relied on. Different machines in the
+     * same location may have different string values for this field.
+     * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Free text representation of the machine location.
+     * The format of this field should not be relied on. Different machines in the
+     * same location may have different string values for this field.
+     * 
+ * + * string location = 1; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Free text representation of the machine location.
+     * The format of this field should not be relied on. Different machines in the
+     * same location may have different string values for this field.
+     * 
+ * + * string location = 1; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Free text representation of the machine location.
+     * The format of this field should not be relied on. Different machines in the
+     * same location may have different string values for this field.
+     * 
+ * + * string location = 1; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.PhysicalPlatformDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.PhysicalPlatformDetails) + private static final com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails(); + } + + public static com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PhysicalPlatformDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PhysicalPlatformDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PhysicalPlatformDetailsOrBuilder.java new file mode 100644 index 000000000000..30811468b426 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PhysicalPlatformDetailsOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface PhysicalPlatformDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.PhysicalPlatformDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Free text representation of the machine location.
+   * The format of this field should not be relied on. Different machines in the
+   * same location may have different string values for this field.
+   * 
+ * + * string location = 1; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * Free text representation of the machine location.
+   * The format of this field should not be relied on. Different machines in the
+   * same location may have different string values for this field.
+   * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PlatformDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PlatformDetails.java new file mode 100644 index 000000000000..8e64aea02a91 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PlatformDetails.java @@ -0,0 +1,2039 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Information about the platform.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.PlatformDetails} + */ +public final class PlatformDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.PlatformDetails) + PlatformDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformDetails.newBuilder() to construct. + private PlatformDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlatformDetails() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlatformDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.PlatformDetails.class, + com.google.cloud.migrationcenter.v1.PlatformDetails.Builder.class); + } + + private int vendorDetailsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object vendorDetails_; + + public enum VendorDetailsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VMWARE_DETAILS(1), + AWS_EC2_DETAILS(2), + AZURE_VM_DETAILS(3), + GENERIC_DETAILS(4), + PHYSICAL_DETAILS(5), + VENDORDETAILS_NOT_SET(0); + private final int value; + + private VendorDetailsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VendorDetailsCase valueOf(int value) { + return forNumber(value); + } + + public static VendorDetailsCase forNumber(int value) { + switch (value) { + case 1: + return VMWARE_DETAILS; + case 2: + return AWS_EC2_DETAILS; + case 3: + return AZURE_VM_DETAILS; + case 4: + return GENERIC_DETAILS; + case 5: + return PHYSICAL_DETAILS; + case 0: + return VENDORDETAILS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public VendorDetailsCase getVendorDetailsCase() { + return VendorDetailsCase.forNumber(vendorDetailsCase_); + } + + public static final int VMWARE_DETAILS_FIELD_NUMBER = 1; + /** + * + * + *
+   * VMware specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + * + * @return Whether the vmwareDetails field is set. + */ + @java.lang.Override + public boolean hasVmwareDetails() { + return vendorDetailsCase_ == 1; + } + /** + * + * + *
+   * VMware specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + * + * @return The vmwareDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwarePlatformDetails getVmwareDetails() { + if (vendorDetailsCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.VmwarePlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.getDefaultInstance(); + } + /** + * + * + *
+   * VMware specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwarePlatformDetailsOrBuilder + getVmwareDetailsOrBuilder() { + if (vendorDetailsCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.VmwarePlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.getDefaultInstance(); + } + + public static final int AWS_EC2_DETAILS_FIELD_NUMBER = 2; + /** + * + * + *
+   * AWS EC2 specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + * + * @return Whether the awsEc2Details field is set. + */ + @java.lang.Override + public boolean hasAwsEc2Details() { + return vendorDetailsCase_ == 2; + } + /** + * + * + *
+   * AWS EC2 specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + * + * @return The awsEc2Details. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails getAwsEc2Details() { + if (vendorDetailsCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.getDefaultInstance(); + } + /** + * + * + *
+   * AWS EC2 specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetailsOrBuilder + getAwsEc2DetailsOrBuilder() { + if (vendorDetailsCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.getDefaultInstance(); + } + + public static final int AZURE_VM_DETAILS_FIELD_NUMBER = 3; + /** + * + * + *
+   * Azure VM specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + * + * @return Whether the azureVmDetails field is set. + */ + @java.lang.Override + public boolean hasAzureVmDetails() { + return vendorDetailsCase_ == 3; + } + /** + * + * + *
+   * Azure VM specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + * + * @return The azureVmDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails getAzureVmDetails() { + if (vendorDetailsCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.getDefaultInstance(); + } + /** + * + * + *
+   * Azure VM specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AzureVmPlatformDetailsOrBuilder + getAzureVmDetailsOrBuilder() { + if (vendorDetailsCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.getDefaultInstance(); + } + + public static final int GENERIC_DETAILS_FIELD_NUMBER = 4; + /** + * + * + *
+   * Generic platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + * + * @return Whether the genericDetails field is set. + */ + @java.lang.Override + public boolean hasGenericDetails() { + return vendorDetailsCase_ == 4; + } + /** + * + * + *
+   * Generic platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + * + * @return The genericDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GenericPlatformDetails getGenericDetails() { + if (vendorDetailsCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.GenericPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.GenericPlatformDetails.getDefaultInstance(); + } + /** + * + * + *
+   * Generic platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GenericPlatformDetailsOrBuilder + getGenericDetailsOrBuilder() { + if (vendorDetailsCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.GenericPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.GenericPlatformDetails.getDefaultInstance(); + } + + public static final int PHYSICAL_DETAILS_FIELD_NUMBER = 5; + /** + * + * + *
+   * Physical machines platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + * + * @return Whether the physicalDetails field is set. + */ + @java.lang.Override + public boolean hasPhysicalDetails() { + return vendorDetailsCase_ == 5; + } + /** + * + * + *
+   * Physical machines platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + * + * @return The physicalDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails getPhysicalDetails() { + if (vendorDetailsCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.getDefaultInstance(); + } + /** + * + * + *
+   * Physical machines platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PhysicalPlatformDetailsOrBuilder + getPhysicalDetailsOrBuilder() { + if (vendorDetailsCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (vendorDetailsCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.migrationcenter.v1.VmwarePlatformDetails) vendorDetails_); + } + if (vendorDetailsCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) vendorDetails_); + } + if (vendorDetailsCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails) vendorDetails_); + } + if (vendorDetailsCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.migrationcenter.v1.GenericPlatformDetails) vendorDetails_); + } + if (vendorDetailsCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails) vendorDetails_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (vendorDetailsCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.migrationcenter.v1.VmwarePlatformDetails) vendorDetails_); + } + if (vendorDetailsCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) vendorDetails_); + } + if (vendorDetailsCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails) vendorDetails_); + } + if (vendorDetailsCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.migrationcenter.v1.GenericPlatformDetails) vendorDetails_); + } + if (vendorDetailsCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails) vendorDetails_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.PlatformDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.PlatformDetails other = + (com.google.cloud.migrationcenter.v1.PlatformDetails) obj; + + if (!getVendorDetailsCase().equals(other.getVendorDetailsCase())) return false; + switch (vendorDetailsCase_) { + case 1: + if (!getVmwareDetails().equals(other.getVmwareDetails())) return false; + break; + case 2: + if (!getAwsEc2Details().equals(other.getAwsEc2Details())) return false; + break; + case 3: + if (!getAzureVmDetails().equals(other.getAzureVmDetails())) return false; + break; + case 4: + if (!getGenericDetails().equals(other.getGenericDetails())) return false; + break; + case 5: + if (!getPhysicalDetails().equals(other.getPhysicalDetails())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (vendorDetailsCase_) { + case 1: + hash = (37 * hash) + VMWARE_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getVmwareDetails().hashCode(); + break; + case 2: + hash = (37 * hash) + AWS_EC2_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getAwsEc2Details().hashCode(); + break; + case 3: + hash = (37 * hash) + AZURE_VM_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getAzureVmDetails().hashCode(); + break; + case 4: + hash = (37 * hash) + GENERIC_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getGenericDetails().hashCode(); + break; + case 5: + hash = (37 * hash) + PHYSICAL_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getPhysicalDetails().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.PlatformDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Information about the platform.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.PlatformDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.PlatformDetails) + com.google.cloud.migrationcenter.v1.PlatformDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.PlatformDetails.class, + com.google.cloud.migrationcenter.v1.PlatformDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.PlatformDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (vmwareDetailsBuilder_ != null) { + vmwareDetailsBuilder_.clear(); + } + if (awsEc2DetailsBuilder_ != null) { + awsEc2DetailsBuilder_.clear(); + } + if (azureVmDetailsBuilder_ != null) { + azureVmDetailsBuilder_.clear(); + } + if (genericDetailsBuilder_ != null) { + genericDetailsBuilder_.clear(); + } + if (physicalDetailsBuilder_ != null) { + physicalDetailsBuilder_.clear(); + } + vendorDetailsCase_ = 0; + vendorDetails_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PlatformDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PlatformDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.PlatformDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PlatformDetails build() { + com.google.cloud.migrationcenter.v1.PlatformDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PlatformDetails buildPartial() { + com.google.cloud.migrationcenter.v1.PlatformDetails result = + new com.google.cloud.migrationcenter.v1.PlatformDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.PlatformDetails result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.migrationcenter.v1.PlatformDetails result) { + result.vendorDetailsCase_ = vendorDetailsCase_; + result.vendorDetails_ = this.vendorDetails_; + if (vendorDetailsCase_ == 1 && vmwareDetailsBuilder_ != null) { + result.vendorDetails_ = vmwareDetailsBuilder_.build(); + } + if (vendorDetailsCase_ == 2 && awsEc2DetailsBuilder_ != null) { + result.vendorDetails_ = awsEc2DetailsBuilder_.build(); + } + if (vendorDetailsCase_ == 3 && azureVmDetailsBuilder_ != null) { + result.vendorDetails_ = azureVmDetailsBuilder_.build(); + } + if (vendorDetailsCase_ == 4 && genericDetailsBuilder_ != null) { + result.vendorDetails_ = genericDetailsBuilder_.build(); + } + if (vendorDetailsCase_ == 5 && physicalDetailsBuilder_ != null) { + result.vendorDetails_ = physicalDetailsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.PlatformDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.PlatformDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.PlatformDetails other) { + if (other == com.google.cloud.migrationcenter.v1.PlatformDetails.getDefaultInstance()) + return this; + switch (other.getVendorDetailsCase()) { + case VMWARE_DETAILS: + { + mergeVmwareDetails(other.getVmwareDetails()); + break; + } + case AWS_EC2_DETAILS: + { + mergeAwsEc2Details(other.getAwsEc2Details()); + break; + } + case AZURE_VM_DETAILS: + { + mergeAzureVmDetails(other.getAzureVmDetails()); + break; + } + case GENERIC_DETAILS: + { + mergeGenericDetails(other.getGenericDetails()); + break; + } + case PHYSICAL_DETAILS: + { + mergePhysicalDetails(other.getPhysicalDetails()); + break; + } + case VENDORDETAILS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getVmwareDetailsFieldBuilder().getBuilder(), extensionRegistry); + vendorDetailsCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getAwsEc2DetailsFieldBuilder().getBuilder(), extensionRegistry); + vendorDetailsCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getAzureVmDetailsFieldBuilder().getBuilder(), extensionRegistry); + vendorDetailsCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getGenericDetailsFieldBuilder().getBuilder(), extensionRegistry); + vendorDetailsCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getPhysicalDetailsFieldBuilder().getBuilder(), extensionRegistry); + vendorDetailsCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int vendorDetailsCase_ = 0; + private java.lang.Object vendorDetails_; + + public VendorDetailsCase getVendorDetailsCase() { + return VendorDetailsCase.forNumber(vendorDetailsCase_); + } + + public Builder clearVendorDetails() { + vendorDetailsCase_ = 0; + vendorDetails_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails, + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.VmwarePlatformDetailsOrBuilder> + vmwareDetailsBuilder_; + /** + * + * + *
+     * VMware specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + * + * @return Whether the vmwareDetails field is set. + */ + @java.lang.Override + public boolean hasVmwareDetails() { + return vendorDetailsCase_ == 1; + } + /** + * + * + *
+     * VMware specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + * + * @return The vmwareDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwarePlatformDetails getVmwareDetails() { + if (vmwareDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.VmwarePlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.getDefaultInstance(); + } else { + if (vendorDetailsCase_ == 1) { + return vmwareDetailsBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * VMware specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + */ + public Builder setVmwareDetails( + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails value) { + if (vmwareDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vendorDetails_ = value; + onChanged(); + } else { + vmwareDetailsBuilder_.setMessage(value); + } + vendorDetailsCase_ = 1; + return this; + } + /** + * + * + *
+     * VMware specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + */ + public Builder setVmwareDetails( + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.Builder builderForValue) { + if (vmwareDetailsBuilder_ == null) { + vendorDetails_ = builderForValue.build(); + onChanged(); + } else { + vmwareDetailsBuilder_.setMessage(builderForValue.build()); + } + vendorDetailsCase_ = 1; + return this; + } + /** + * + * + *
+     * VMware specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + */ + public Builder mergeVmwareDetails( + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails value) { + if (vmwareDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 1 + && vendorDetails_ + != com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.getDefaultInstance()) { + vendorDetails_ = + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.newBuilder( + (com.google.cloud.migrationcenter.v1.VmwarePlatformDetails) vendorDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + vendorDetails_ = value; + } + onChanged(); + } else { + if (vendorDetailsCase_ == 1) { + vmwareDetailsBuilder_.mergeFrom(value); + } else { + vmwareDetailsBuilder_.setMessage(value); + } + } + vendorDetailsCase_ = 1; + return this; + } + /** + * + * + *
+     * VMware specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + */ + public Builder clearVmwareDetails() { + if (vmwareDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 1) { + vendorDetailsCase_ = 0; + vendorDetails_ = null; + onChanged(); + } + } else { + if (vendorDetailsCase_ == 1) { + vendorDetailsCase_ = 0; + vendorDetails_ = null; + } + vmwareDetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * VMware specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + */ + public com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.Builder + getVmwareDetailsBuilder() { + return getVmwareDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * VMware specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwarePlatformDetailsOrBuilder + getVmwareDetailsOrBuilder() { + if ((vendorDetailsCase_ == 1) && (vmwareDetailsBuilder_ != null)) { + return vmwareDetailsBuilder_.getMessageOrBuilder(); + } else { + if (vendorDetailsCase_ == 1) { + return (com.google.cloud.migrationcenter.v1.VmwarePlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * VMware specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails, + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.VmwarePlatformDetailsOrBuilder> + getVmwareDetailsFieldBuilder() { + if (vmwareDetailsBuilder_ == null) { + if (!(vendorDetailsCase_ == 1)) { + vendorDetails_ = + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.getDefaultInstance(); + } + vmwareDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails, + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.VmwarePlatformDetailsOrBuilder>( + (com.google.cloud.migrationcenter.v1.VmwarePlatformDetails) vendorDetails_, + getParentForChildren(), + isClean()); + vendorDetails_ = null; + } + vendorDetailsCase_ = 1; + onChanged(); + return vmwareDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails, + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetailsOrBuilder> + awsEc2DetailsBuilder_; + /** + * + * + *
+     * AWS EC2 specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + * + * @return Whether the awsEc2Details field is set. + */ + @java.lang.Override + public boolean hasAwsEc2Details() { + return vendorDetailsCase_ == 2; + } + /** + * + * + *
+     * AWS EC2 specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + * + * @return The awsEc2Details. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails getAwsEc2Details() { + if (awsEc2DetailsBuilder_ == null) { + if (vendorDetailsCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.getDefaultInstance(); + } else { + if (vendorDetailsCase_ == 2) { + return awsEc2DetailsBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * AWS EC2 specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + */ + public Builder setAwsEc2Details( + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails value) { + if (awsEc2DetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vendorDetails_ = value; + onChanged(); + } else { + awsEc2DetailsBuilder_.setMessage(value); + } + vendorDetailsCase_ = 2; + return this; + } + /** + * + * + *
+     * AWS EC2 specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + */ + public Builder setAwsEc2Details( + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.Builder builderForValue) { + if (awsEc2DetailsBuilder_ == null) { + vendorDetails_ = builderForValue.build(); + onChanged(); + } else { + awsEc2DetailsBuilder_.setMessage(builderForValue.build()); + } + vendorDetailsCase_ = 2; + return this; + } + /** + * + * + *
+     * AWS EC2 specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + */ + public Builder mergeAwsEc2Details( + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails value) { + if (awsEc2DetailsBuilder_ == null) { + if (vendorDetailsCase_ == 2 + && vendorDetails_ + != com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.getDefaultInstance()) { + vendorDetails_ = + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.newBuilder( + (com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) vendorDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + vendorDetails_ = value; + } + onChanged(); + } else { + if (vendorDetailsCase_ == 2) { + awsEc2DetailsBuilder_.mergeFrom(value); + } else { + awsEc2DetailsBuilder_.setMessage(value); + } + } + vendorDetailsCase_ = 2; + return this; + } + /** + * + * + *
+     * AWS EC2 specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + */ + public Builder clearAwsEc2Details() { + if (awsEc2DetailsBuilder_ == null) { + if (vendorDetailsCase_ == 2) { + vendorDetailsCase_ = 0; + vendorDetails_ = null; + onChanged(); + } + } else { + if (vendorDetailsCase_ == 2) { + vendorDetailsCase_ = 0; + vendorDetails_ = null; + } + awsEc2DetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * AWS EC2 specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + */ + public com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.Builder + getAwsEc2DetailsBuilder() { + return getAwsEc2DetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * AWS EC2 specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetailsOrBuilder + getAwsEc2DetailsOrBuilder() { + if ((vendorDetailsCase_ == 2) && (awsEc2DetailsBuilder_ != null)) { + return awsEc2DetailsBuilder_.getMessageOrBuilder(); + } else { + if (vendorDetailsCase_ == 2) { + return (com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * AWS EC2 specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails, + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetailsOrBuilder> + getAwsEc2DetailsFieldBuilder() { + if (awsEc2DetailsBuilder_ == null) { + if (!(vendorDetailsCase_ == 2)) { + vendorDetails_ = + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.getDefaultInstance(); + } + awsEc2DetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails, + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetailsOrBuilder>( + (com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails) vendorDetails_, + getParentForChildren(), + isClean()); + vendorDetails_ = null; + } + vendorDetailsCase_ = 2; + onChanged(); + return awsEc2DetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails, + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetailsOrBuilder> + azureVmDetailsBuilder_; + /** + * + * + *
+     * Azure VM specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + * + * @return Whether the azureVmDetails field is set. + */ + @java.lang.Override + public boolean hasAzureVmDetails() { + return vendorDetailsCase_ == 3; + } + /** + * + * + *
+     * Azure VM specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + * + * @return The azureVmDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails getAzureVmDetails() { + if (azureVmDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.getDefaultInstance(); + } else { + if (vendorDetailsCase_ == 3) { + return azureVmDetailsBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * Azure VM specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + */ + public Builder setAzureVmDetails( + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails value) { + if (azureVmDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vendorDetails_ = value; + onChanged(); + } else { + azureVmDetailsBuilder_.setMessage(value); + } + vendorDetailsCase_ = 3; + return this; + } + /** + * + * + *
+     * Azure VM specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + */ + public Builder setAzureVmDetails( + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.Builder builderForValue) { + if (azureVmDetailsBuilder_ == null) { + vendorDetails_ = builderForValue.build(); + onChanged(); + } else { + azureVmDetailsBuilder_.setMessage(builderForValue.build()); + } + vendorDetailsCase_ = 3; + return this; + } + /** + * + * + *
+     * Azure VM specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + */ + public Builder mergeAzureVmDetails( + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails value) { + if (azureVmDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 3 + && vendorDetails_ + != com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails + .getDefaultInstance()) { + vendorDetails_ = + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.newBuilder( + (com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails) vendorDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + vendorDetails_ = value; + } + onChanged(); + } else { + if (vendorDetailsCase_ == 3) { + azureVmDetailsBuilder_.mergeFrom(value); + } else { + azureVmDetailsBuilder_.setMessage(value); + } + } + vendorDetailsCase_ = 3; + return this; + } + /** + * + * + *
+     * Azure VM specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + */ + public Builder clearAzureVmDetails() { + if (azureVmDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 3) { + vendorDetailsCase_ = 0; + vendorDetails_ = null; + onChanged(); + } + } else { + if (vendorDetailsCase_ == 3) { + vendorDetailsCase_ = 0; + vendorDetails_ = null; + } + azureVmDetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Azure VM specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + */ + public com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.Builder + getAzureVmDetailsBuilder() { + return getAzureVmDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Azure VM specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AzureVmPlatformDetailsOrBuilder + getAzureVmDetailsOrBuilder() { + if ((vendorDetailsCase_ == 3) && (azureVmDetailsBuilder_ != null)) { + return azureVmDetailsBuilder_.getMessageOrBuilder(); + } else { + if (vendorDetailsCase_ == 3) { + return (com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * Azure VM specific details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails, + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetailsOrBuilder> + getAzureVmDetailsFieldBuilder() { + if (azureVmDetailsBuilder_ == null) { + if (!(vendorDetailsCase_ == 3)) { + vendorDetails_ = + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.getDefaultInstance(); + } + azureVmDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails, + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetailsOrBuilder>( + (com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails) vendorDetails_, + getParentForChildren(), + isClean()); + vendorDetails_ = null; + } + vendorDetailsCase_ = 3; + onChanged(); + return azureVmDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GenericPlatformDetails, + com.google.cloud.migrationcenter.v1.GenericPlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.GenericPlatformDetailsOrBuilder> + genericDetailsBuilder_; + /** + * + * + *
+     * Generic platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + * + * @return Whether the genericDetails field is set. + */ + @java.lang.Override + public boolean hasGenericDetails() { + return vendorDetailsCase_ == 4; + } + /** + * + * + *
+     * Generic platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + * + * @return The genericDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GenericPlatformDetails getGenericDetails() { + if (genericDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.GenericPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.GenericPlatformDetails.getDefaultInstance(); + } else { + if (vendorDetailsCase_ == 4) { + return genericDetailsBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.GenericPlatformDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * Generic platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + */ + public Builder setGenericDetails( + com.google.cloud.migrationcenter.v1.GenericPlatformDetails value) { + if (genericDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vendorDetails_ = value; + onChanged(); + } else { + genericDetailsBuilder_.setMessage(value); + } + vendorDetailsCase_ = 4; + return this; + } + /** + * + * + *
+     * Generic platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + */ + public Builder setGenericDetails( + com.google.cloud.migrationcenter.v1.GenericPlatformDetails.Builder builderForValue) { + if (genericDetailsBuilder_ == null) { + vendorDetails_ = builderForValue.build(); + onChanged(); + } else { + genericDetailsBuilder_.setMessage(builderForValue.build()); + } + vendorDetailsCase_ = 4; + return this; + } + /** + * + * + *
+     * Generic platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + */ + public Builder mergeGenericDetails( + com.google.cloud.migrationcenter.v1.GenericPlatformDetails value) { + if (genericDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 4 + && vendorDetails_ + != com.google.cloud.migrationcenter.v1.GenericPlatformDetails + .getDefaultInstance()) { + vendorDetails_ = + com.google.cloud.migrationcenter.v1.GenericPlatformDetails.newBuilder( + (com.google.cloud.migrationcenter.v1.GenericPlatformDetails) vendorDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + vendorDetails_ = value; + } + onChanged(); + } else { + if (vendorDetailsCase_ == 4) { + genericDetailsBuilder_.mergeFrom(value); + } else { + genericDetailsBuilder_.setMessage(value); + } + } + vendorDetailsCase_ = 4; + return this; + } + /** + * + * + *
+     * Generic platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + */ + public Builder clearGenericDetails() { + if (genericDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 4) { + vendorDetailsCase_ = 0; + vendorDetails_ = null; + onChanged(); + } + } else { + if (vendorDetailsCase_ == 4) { + vendorDetailsCase_ = 0; + vendorDetails_ = null; + } + genericDetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Generic platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + */ + public com.google.cloud.migrationcenter.v1.GenericPlatformDetails.Builder + getGenericDetailsBuilder() { + return getGenericDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Generic platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GenericPlatformDetailsOrBuilder + getGenericDetailsOrBuilder() { + if ((vendorDetailsCase_ == 4) && (genericDetailsBuilder_ != null)) { + return genericDetailsBuilder_.getMessageOrBuilder(); + } else { + if (vendorDetailsCase_ == 4) { + return (com.google.cloud.migrationcenter.v1.GenericPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.GenericPlatformDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * Generic platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GenericPlatformDetails, + com.google.cloud.migrationcenter.v1.GenericPlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.GenericPlatformDetailsOrBuilder> + getGenericDetailsFieldBuilder() { + if (genericDetailsBuilder_ == null) { + if (!(vendorDetailsCase_ == 4)) { + vendorDetails_ = + com.google.cloud.migrationcenter.v1.GenericPlatformDetails.getDefaultInstance(); + } + genericDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.GenericPlatformDetails, + com.google.cloud.migrationcenter.v1.GenericPlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.GenericPlatformDetailsOrBuilder>( + (com.google.cloud.migrationcenter.v1.GenericPlatformDetails) vendorDetails_, + getParentForChildren(), + isClean()); + vendorDetails_ = null; + } + vendorDetailsCase_ = 4; + onChanged(); + return genericDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails, + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetailsOrBuilder> + physicalDetailsBuilder_; + /** + * + * + *
+     * Physical machines platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + * + * @return Whether the physicalDetails field is set. + */ + @java.lang.Override + public boolean hasPhysicalDetails() { + return vendorDetailsCase_ == 5; + } + /** + * + * + *
+     * Physical machines platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + * + * @return The physicalDetails. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails getPhysicalDetails() { + if (physicalDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.getDefaultInstance(); + } else { + if (vendorDetailsCase_ == 5) { + return physicalDetailsBuilder_.getMessage(); + } + return com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * Physical machines platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + */ + public Builder setPhysicalDetails( + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails value) { + if (physicalDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vendorDetails_ = value; + onChanged(); + } else { + physicalDetailsBuilder_.setMessage(value); + } + vendorDetailsCase_ = 5; + return this; + } + /** + * + * + *
+     * Physical machines platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + */ + public Builder setPhysicalDetails( + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.Builder builderForValue) { + if (physicalDetailsBuilder_ == null) { + vendorDetails_ = builderForValue.build(); + onChanged(); + } else { + physicalDetailsBuilder_.setMessage(builderForValue.build()); + } + vendorDetailsCase_ = 5; + return this; + } + /** + * + * + *
+     * Physical machines platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + */ + public Builder mergePhysicalDetails( + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails value) { + if (physicalDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 5 + && vendorDetails_ + != com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails + .getDefaultInstance()) { + vendorDetails_ = + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.newBuilder( + (com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails) vendorDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + vendorDetails_ = value; + } + onChanged(); + } else { + if (vendorDetailsCase_ == 5) { + physicalDetailsBuilder_.mergeFrom(value); + } else { + physicalDetailsBuilder_.setMessage(value); + } + } + vendorDetailsCase_ = 5; + return this; + } + /** + * + * + *
+     * Physical machines platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + */ + public Builder clearPhysicalDetails() { + if (physicalDetailsBuilder_ == null) { + if (vendorDetailsCase_ == 5) { + vendorDetailsCase_ = 0; + vendorDetails_ = null; + onChanged(); + } + } else { + if (vendorDetailsCase_ == 5) { + vendorDetailsCase_ = 0; + vendorDetails_ = null; + } + physicalDetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Physical machines platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + */ + public com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.Builder + getPhysicalDetailsBuilder() { + return getPhysicalDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Physical machines platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PhysicalPlatformDetailsOrBuilder + getPhysicalDetailsOrBuilder() { + if ((vendorDetailsCase_ == 5) && (physicalDetailsBuilder_ != null)) { + return physicalDetailsBuilder_.getMessageOrBuilder(); + } else { + if (vendorDetailsCase_ == 5) { + return (com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails) vendorDetails_; + } + return com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.getDefaultInstance(); + } + } + /** + * + * + *
+     * Physical machines platform details.
+     * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails, + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetailsOrBuilder> + getPhysicalDetailsFieldBuilder() { + if (physicalDetailsBuilder_ == null) { + if (!(vendorDetailsCase_ == 5)) { + vendorDetails_ = + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.getDefaultInstance(); + } + physicalDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails, + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails.Builder, + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetailsOrBuilder>( + (com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails) vendorDetails_, + getParentForChildren(), + isClean()); + vendorDetails_ = null; + } + vendorDetailsCase_ = 5; + onChanged(); + return physicalDetailsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.PlatformDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.PlatformDetails) + private static final com.google.cloud.migrationcenter.v1.PlatformDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.PlatformDetails(); + } + + public static com.google.cloud.migrationcenter.v1.PlatformDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PlatformDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PlatformDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PlatformDetailsOrBuilder.java new file mode 100644 index 000000000000..aa63952e49b0 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PlatformDetailsOrBuilder.java @@ -0,0 +1,203 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface PlatformDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.PlatformDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * VMware specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + * + * @return Whether the vmwareDetails field is set. + */ + boolean hasVmwareDetails(); + /** + * + * + *
+   * VMware specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + * + * @return The vmwareDetails. + */ + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails getVmwareDetails(); + /** + * + * + *
+   * VMware specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + */ + com.google.cloud.migrationcenter.v1.VmwarePlatformDetailsOrBuilder getVmwareDetailsOrBuilder(); + + /** + * + * + *
+   * AWS EC2 specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + * + * @return Whether the awsEc2Details field is set. + */ + boolean hasAwsEc2Details(); + /** + * + * + *
+   * AWS EC2 specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + * + * @return The awsEc2Details. + */ + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetails getAwsEc2Details(); + /** + * + * + *
+   * AWS EC2 specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + */ + com.google.cloud.migrationcenter.v1.AwsEc2PlatformDetailsOrBuilder getAwsEc2DetailsOrBuilder(); + + /** + * + * + *
+   * Azure VM specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + * + * @return Whether the azureVmDetails field is set. + */ + boolean hasAzureVmDetails(); + /** + * + * + *
+   * Azure VM specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + * + * @return The azureVmDetails. + */ + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetails getAzureVmDetails(); + /** + * + * + *
+   * Azure VM specific details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + */ + com.google.cloud.migrationcenter.v1.AzureVmPlatformDetailsOrBuilder getAzureVmDetailsOrBuilder(); + + /** + * + * + *
+   * Generic platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + * + * @return Whether the genericDetails field is set. + */ + boolean hasGenericDetails(); + /** + * + * + *
+   * Generic platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + * + * @return The genericDetails. + */ + com.google.cloud.migrationcenter.v1.GenericPlatformDetails getGenericDetails(); + /** + * + * + *
+   * Generic platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + */ + com.google.cloud.migrationcenter.v1.GenericPlatformDetailsOrBuilder getGenericDetailsOrBuilder(); + + /** + * + * + *
+   * Physical machines platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + * + * @return Whether the physicalDetails field is set. + */ + boolean hasPhysicalDetails(); + /** + * + * + *
+   * Physical machines platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + * + * @return The physicalDetails. + */ + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetails getPhysicalDetails(); + /** + * + * + *
+   * Physical machines platform details.
+   * 
+ * + * .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + */ + com.google.cloud.migrationcenter.v1.PhysicalPlatformDetailsOrBuilder + getPhysicalDetailsOrBuilder(); + + com.google.cloud.migrationcenter.v1.PlatformDetails.VendorDetailsCase getVendorDetailsCase(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSet.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSet.java new file mode 100644 index 000000000000..1f3361f3db78 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSet.java @@ -0,0 +1,1856 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * The preferences that apply to all assets in a given context.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.PreferenceSet} + */ +public final class PreferenceSet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.PreferenceSet) + PreferenceSetOrBuilder { + private static final long serialVersionUID = 0L; + // Use PreferenceSet.newBuilder() to construct. + private PreferenceSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PreferenceSet() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PreferenceSet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PreferenceSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PreferenceSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.PreferenceSet.class, + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of the preference set.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the preference set.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp when the preference set was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the preference set was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the preference set was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The timestamp when the preference set was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the preference set was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the preference set was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A description of the preference set.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A description of the preference set.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIRTUAL_MACHINE_PREFERENCES_FIELD_NUMBER = 6; + private com.google.cloud.migrationcenter.v1.VirtualMachinePreferences virtualMachinePreferences_; + /** + * + * + *
+   * A set of preferences that applies to all virtual machines in the context.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + * + * @return Whether the virtualMachinePreferences field is set. + */ + @java.lang.Override + public boolean hasVirtualMachinePreferences() { + return virtualMachinePreferences_ != null; + } + /** + * + * + *
+   * A set of preferences that applies to all virtual machines in the context.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + * + * @return The virtualMachinePreferences. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferences + getVirtualMachinePreferences() { + return virtualMachinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.getDefaultInstance() + : virtualMachinePreferences_; + } + /** + * + * + *
+   * A set of preferences that applies to all virtual machines in the context.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder + getVirtualMachinePreferencesOrBuilder() { + return virtualMachinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.getDefaultInstance() + : virtualMachinePreferences_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (virtualMachinePreferences_ != null) { + output.writeMessage(6, getVirtualMachinePreferences()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (virtualMachinePreferences_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getVirtualMachinePreferences()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.PreferenceSet)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.PreferenceSet other = + (com.google.cloud.migrationcenter.v1.PreferenceSet) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasVirtualMachinePreferences() != other.hasVirtualMachinePreferences()) return false; + if (hasVirtualMachinePreferences()) { + if (!getVirtualMachinePreferences().equals(other.getVirtualMachinePreferences())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasVirtualMachinePreferences()) { + hash = (37 * hash) + VIRTUAL_MACHINE_PREFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getVirtualMachinePreferences().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.PreferenceSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The preferences that apply to all assets in a given context.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.PreferenceSet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.PreferenceSet) + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PreferenceSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PreferenceSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.PreferenceSet.class, + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.PreferenceSet.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + displayName_ = ""; + description_ = ""; + virtualMachinePreferences_ = null; + if (virtualMachinePreferencesBuilder_ != null) { + virtualMachinePreferencesBuilder_.dispose(); + virtualMachinePreferencesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_PreferenceSet_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PreferenceSet getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PreferenceSet build() { + com.google.cloud.migrationcenter.v1.PreferenceSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PreferenceSet buildPartial() { + com.google.cloud.migrationcenter.v1.PreferenceSet result = + new com.google.cloud.migrationcenter.v1.PreferenceSet(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.PreferenceSet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.virtualMachinePreferences_ = + virtualMachinePreferencesBuilder_ == null + ? virtualMachinePreferences_ + : virtualMachinePreferencesBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.PreferenceSet) { + return mergeFrom((com.google.cloud.migrationcenter.v1.PreferenceSet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.PreferenceSet other) { + if (other == com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasVirtualMachinePreferences()) { + mergeVirtualMachinePreferences(other.getVirtualMachinePreferences()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getVirtualMachinePreferencesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of the preference set.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the preference set.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the preference set.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the preference set.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the preference set.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the preference set was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the preference set was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the preference set was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description of the preference set.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of the preference set.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of the preference set.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the preference set.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the preference set.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.VirtualMachinePreferences + virtualMachinePreferences_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder> + virtualMachinePreferencesBuilder_; + /** + * + * + *
+     * A set of preferences that applies to all virtual machines in the context.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + * + * @return Whether the virtualMachinePreferences field is set. + */ + public boolean hasVirtualMachinePreferences() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * A set of preferences that applies to all virtual machines in the context.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + * + * @return The virtualMachinePreferences. + */ + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferences + getVirtualMachinePreferences() { + if (virtualMachinePreferencesBuilder_ == null) { + return virtualMachinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.getDefaultInstance() + : virtualMachinePreferences_; + } else { + return virtualMachinePreferencesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A set of preferences that applies to all virtual machines in the context.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + */ + public Builder setVirtualMachinePreferences( + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences value) { + if (virtualMachinePreferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + virtualMachinePreferences_ = value; + } else { + virtualMachinePreferencesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A set of preferences that applies to all virtual machines in the context.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + */ + public Builder setVirtualMachinePreferences( + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder builderForValue) { + if (virtualMachinePreferencesBuilder_ == null) { + virtualMachinePreferences_ = builderForValue.build(); + } else { + virtualMachinePreferencesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A set of preferences that applies to all virtual machines in the context.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + */ + public Builder mergeVirtualMachinePreferences( + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences value) { + if (virtualMachinePreferencesBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && virtualMachinePreferences_ != null + && virtualMachinePreferences_ + != com.google.cloud.migrationcenter.v1.VirtualMachinePreferences + .getDefaultInstance()) { + getVirtualMachinePreferencesBuilder().mergeFrom(value); + } else { + virtualMachinePreferences_ = value; + } + } else { + virtualMachinePreferencesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A set of preferences that applies to all virtual machines in the context.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + */ + public Builder clearVirtualMachinePreferences() { + bitField0_ = (bitField0_ & ~0x00000020); + virtualMachinePreferences_ = null; + if (virtualMachinePreferencesBuilder_ != null) { + virtualMachinePreferencesBuilder_.dispose(); + virtualMachinePreferencesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * A set of preferences that applies to all virtual machines in the context.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + */ + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder + getVirtualMachinePreferencesBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getVirtualMachinePreferencesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A set of preferences that applies to all virtual machines in the context.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + */ + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder + getVirtualMachinePreferencesOrBuilder() { + if (virtualMachinePreferencesBuilder_ != null) { + return virtualMachinePreferencesBuilder_.getMessageOrBuilder(); + } else { + return virtualMachinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.getDefaultInstance() + : virtualMachinePreferences_; + } + } + /** + * + * + *
+     * A set of preferences that applies to all virtual machines in the context.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder> + getVirtualMachinePreferencesFieldBuilder() { + if (virtualMachinePreferencesBuilder_ == null) { + virtualMachinePreferencesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder>( + getVirtualMachinePreferences(), getParentForChildren(), isClean()); + virtualMachinePreferences_ = null; + } + return virtualMachinePreferencesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.PreferenceSet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.PreferenceSet) + private static final com.google.cloud.migrationcenter.v1.PreferenceSet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.PreferenceSet(); + } + + public static com.google.cloud.migrationcenter.v1.PreferenceSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PreferenceSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PreferenceSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSetName.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSetName.java new file mode 100644 index 000000000000..148dce09708e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSetName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PreferenceSetName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PREFERENCE_SET = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/preferenceSets/{preference_set}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String preferenceSet; + + @Deprecated + protected PreferenceSetName() { + project = null; + location = null; + preferenceSet = null; + } + + private PreferenceSetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + preferenceSet = Preconditions.checkNotNull(builder.getPreferenceSet()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getPreferenceSet() { + return preferenceSet; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PreferenceSetName of(String project, String location, String preferenceSet) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setPreferenceSet(preferenceSet) + .build(); + } + + public static String format(String project, String location, String preferenceSet) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setPreferenceSet(preferenceSet) + .build() + .toString(); + } + + public static PreferenceSetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PREFERENCE_SET.validatedMatch( + formattedString, "PreferenceSetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("preference_set")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PreferenceSetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PREFERENCE_SET.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (preferenceSet != null) { + fieldMapBuilder.put("preference_set", preferenceSet); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PREFERENCE_SET.instantiate( + "project", project, "location", location, "preference_set", preferenceSet); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + PreferenceSetName that = ((PreferenceSetName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.preferenceSet, that.preferenceSet); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(preferenceSet); + return h; + } + + /** Builder for projects/{project}/locations/{location}/preferenceSets/{preference_set}. */ + public static class Builder { + private String project; + private String location; + private String preferenceSet; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getPreferenceSet() { + return preferenceSet; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setPreferenceSet(String preferenceSet) { + this.preferenceSet = preferenceSet; + return this; + } + + private Builder(PreferenceSetName preferenceSetName) { + this.project = preferenceSetName.project; + this.location = preferenceSetName.location; + this.preferenceSet = preferenceSetName.preferenceSet; + } + + public PreferenceSetName build() { + return new PreferenceSetName(this); + } + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSetOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSetOrBuilder.java new file mode 100644 index 000000000000..abf4075c6389 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/PreferenceSetOrBuilder.java @@ -0,0 +1,218 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface PreferenceSetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.PreferenceSet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of the preference set.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of the preference set.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the preference set was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the preference set was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the preference set was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the preference set was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the preference set was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the preference set was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A description of the preference set.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description of the preference set.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * A set of preferences that applies to all virtual machines in the context.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + * + * @return Whether the virtualMachinePreferences field is set. + */ + boolean hasVirtualMachinePreferences(); + /** + * + * + *
+   * A set of preferences that applies to all virtual machines in the context.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + * + * @return The virtualMachinePreferences. + */ + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences getVirtualMachinePreferences(); + /** + * + * + *
+   * A set of preferences that applies to all virtual machines in the context.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * + */ + com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder + getVirtualMachinePreferencesOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RegionPreferences.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RegionPreferences.java new file mode 100644 index 000000000000..4445e53cdb33 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RegionPreferences.java @@ -0,0 +1,772 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * The user preferences relating to target regions.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RegionPreferences} + */ +public final class RegionPreferences extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.RegionPreferences) + RegionPreferencesOrBuilder { + private static final long serialVersionUID = 0L; + // Use RegionPreferences.newBuilder() to construct. + private RegionPreferences(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RegionPreferences() { + preferredRegions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RegionPreferences(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RegionPreferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RegionPreferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RegionPreferences.class, + com.google.cloud.migrationcenter.v1.RegionPreferences.Builder.class); + } + + public static final int PREFERRED_REGIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList preferredRegions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * A list of preferred regions,
+   * ordered by the most preferred region first.
+   * Set only valid Google Cloud region names.
+   * See https://cloud.google.com/compute/docs/regions-zones
+   * for available regions.
+   * 
+ * + * repeated string preferred_regions = 1; + * + * @return A list containing the preferredRegions. + */ + public com.google.protobuf.ProtocolStringList getPreferredRegionsList() { + return preferredRegions_; + } + /** + * + * + *
+   * A list of preferred regions,
+   * ordered by the most preferred region first.
+   * Set only valid Google Cloud region names.
+   * See https://cloud.google.com/compute/docs/regions-zones
+   * for available regions.
+   * 
+ * + * repeated string preferred_regions = 1; + * + * @return The count of preferredRegions. + */ + public int getPreferredRegionsCount() { + return preferredRegions_.size(); + } + /** + * + * + *
+   * A list of preferred regions,
+   * ordered by the most preferred region first.
+   * Set only valid Google Cloud region names.
+   * See https://cloud.google.com/compute/docs/regions-zones
+   * for available regions.
+   * 
+ * + * repeated string preferred_regions = 1; + * + * @param index The index of the element to return. + * @return The preferredRegions at the given index. + */ + public java.lang.String getPreferredRegions(int index) { + return preferredRegions_.get(index); + } + /** + * + * + *
+   * A list of preferred regions,
+   * ordered by the most preferred region first.
+   * Set only valid Google Cloud region names.
+   * See https://cloud.google.com/compute/docs/regions-zones
+   * for available regions.
+   * 
+ * + * repeated string preferred_regions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the preferredRegions at the given index. + */ + public com.google.protobuf.ByteString getPreferredRegionsBytes(int index) { + return preferredRegions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < preferredRegions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, preferredRegions_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < preferredRegions_.size(); i++) { + dataSize += computeStringSizeNoTag(preferredRegions_.getRaw(i)); + } + size += dataSize; + size += 1 * getPreferredRegionsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.RegionPreferences)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.RegionPreferences other = + (com.google.cloud.migrationcenter.v1.RegionPreferences) obj; + + if (!getPreferredRegionsList().equals(other.getPreferredRegionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPreferredRegionsCount() > 0) { + hash = (37 * hash) + PREFERRED_REGIONS_FIELD_NUMBER; + hash = (53 * hash) + getPreferredRegionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.RegionPreferences prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The user preferences relating to target regions.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RegionPreferences} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.RegionPreferences) + com.google.cloud.migrationcenter.v1.RegionPreferencesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RegionPreferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RegionPreferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RegionPreferences.class, + com.google.cloud.migrationcenter.v1.RegionPreferences.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.RegionPreferences.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + preferredRegions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RegionPreferences_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RegionPreferences getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.RegionPreferences.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RegionPreferences build() { + com.google.cloud.migrationcenter.v1.RegionPreferences result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RegionPreferences buildPartial() { + com.google.cloud.migrationcenter.v1.RegionPreferences result = + new com.google.cloud.migrationcenter.v1.RegionPreferences(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.RegionPreferences result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + preferredRegions_.makeImmutable(); + result.preferredRegions_ = preferredRegions_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.RegionPreferences) { + return mergeFrom((com.google.cloud.migrationcenter.v1.RegionPreferences) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.RegionPreferences other) { + if (other == com.google.cloud.migrationcenter.v1.RegionPreferences.getDefaultInstance()) + return this; + if (!other.preferredRegions_.isEmpty()) { + if (preferredRegions_.isEmpty()) { + preferredRegions_ = other.preferredRegions_; + bitField0_ |= 0x00000001; + } else { + ensurePreferredRegionsIsMutable(); + preferredRegions_.addAll(other.preferredRegions_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePreferredRegionsIsMutable(); + preferredRegions_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList preferredRegions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePreferredRegionsIsMutable() { + if (!preferredRegions_.isModifiable()) { + preferredRegions_ = new com.google.protobuf.LazyStringArrayList(preferredRegions_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * A list of preferred regions,
+     * ordered by the most preferred region first.
+     * Set only valid Google Cloud region names.
+     * See https://cloud.google.com/compute/docs/regions-zones
+     * for available regions.
+     * 
+ * + * repeated string preferred_regions = 1; + * + * @return A list containing the preferredRegions. + */ + public com.google.protobuf.ProtocolStringList getPreferredRegionsList() { + preferredRegions_.makeImmutable(); + return preferredRegions_; + } + /** + * + * + *
+     * A list of preferred regions,
+     * ordered by the most preferred region first.
+     * Set only valid Google Cloud region names.
+     * See https://cloud.google.com/compute/docs/regions-zones
+     * for available regions.
+     * 
+ * + * repeated string preferred_regions = 1; + * + * @return The count of preferredRegions. + */ + public int getPreferredRegionsCount() { + return preferredRegions_.size(); + } + /** + * + * + *
+     * A list of preferred regions,
+     * ordered by the most preferred region first.
+     * Set only valid Google Cloud region names.
+     * See https://cloud.google.com/compute/docs/regions-zones
+     * for available regions.
+     * 
+ * + * repeated string preferred_regions = 1; + * + * @param index The index of the element to return. + * @return The preferredRegions at the given index. + */ + public java.lang.String getPreferredRegions(int index) { + return preferredRegions_.get(index); + } + /** + * + * + *
+     * A list of preferred regions,
+     * ordered by the most preferred region first.
+     * Set only valid Google Cloud region names.
+     * See https://cloud.google.com/compute/docs/regions-zones
+     * for available regions.
+     * 
+ * + * repeated string preferred_regions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the preferredRegions at the given index. + */ + public com.google.protobuf.ByteString getPreferredRegionsBytes(int index) { + return preferredRegions_.getByteString(index); + } + /** + * + * + *
+     * A list of preferred regions,
+     * ordered by the most preferred region first.
+     * Set only valid Google Cloud region names.
+     * See https://cloud.google.com/compute/docs/regions-zones
+     * for available regions.
+     * 
+ * + * repeated string preferred_regions = 1; + * + * @param index The index to set the value at. + * @param value The preferredRegions to set. + * @return This builder for chaining. + */ + public Builder setPreferredRegions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePreferredRegionsIsMutable(); + preferredRegions_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of preferred regions,
+     * ordered by the most preferred region first.
+     * Set only valid Google Cloud region names.
+     * See https://cloud.google.com/compute/docs/regions-zones
+     * for available regions.
+     * 
+ * + * repeated string preferred_regions = 1; + * + * @param value The preferredRegions to add. + * @return This builder for chaining. + */ + public Builder addPreferredRegions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePreferredRegionsIsMutable(); + preferredRegions_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of preferred regions,
+     * ordered by the most preferred region first.
+     * Set only valid Google Cloud region names.
+     * See https://cloud.google.com/compute/docs/regions-zones
+     * for available regions.
+     * 
+ * + * repeated string preferred_regions = 1; + * + * @param values The preferredRegions to add. + * @return This builder for chaining. + */ + public Builder addAllPreferredRegions(java.lang.Iterable values) { + ensurePreferredRegionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, preferredRegions_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of preferred regions,
+     * ordered by the most preferred region first.
+     * Set only valid Google Cloud region names.
+     * See https://cloud.google.com/compute/docs/regions-zones
+     * for available regions.
+     * 
+ * + * repeated string preferred_regions = 1; + * + * @return This builder for chaining. + */ + public Builder clearPreferredRegions() { + preferredRegions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of preferred regions,
+     * ordered by the most preferred region first.
+     * Set only valid Google Cloud region names.
+     * See https://cloud.google.com/compute/docs/regions-zones
+     * for available regions.
+     * 
+ * + * repeated string preferred_regions = 1; + * + * @param value The bytes of the preferredRegions to add. + * @return This builder for chaining. + */ + public Builder addPreferredRegionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePreferredRegionsIsMutable(); + preferredRegions_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.RegionPreferences) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.RegionPreferences) + private static final com.google.cloud.migrationcenter.v1.RegionPreferences DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.RegionPreferences(); + } + + public static com.google.cloud.migrationcenter.v1.RegionPreferences getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RegionPreferences parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RegionPreferences getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RegionPreferencesOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RegionPreferencesOrBuilder.java new file mode 100644 index 000000000000..97afd8cc2e51 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RegionPreferencesOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface RegionPreferencesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.RegionPreferences) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of preferred regions,
+   * ordered by the most preferred region first.
+   * Set only valid Google Cloud region names.
+   * See https://cloud.google.com/compute/docs/regions-zones
+   * for available regions.
+   * 
+ * + * repeated string preferred_regions = 1; + * + * @return A list containing the preferredRegions. + */ + java.util.List getPreferredRegionsList(); + /** + * + * + *
+   * A list of preferred regions,
+   * ordered by the most preferred region first.
+   * Set only valid Google Cloud region names.
+   * See https://cloud.google.com/compute/docs/regions-zones
+   * for available regions.
+   * 
+ * + * repeated string preferred_regions = 1; + * + * @return The count of preferredRegions. + */ + int getPreferredRegionsCount(); + /** + * + * + *
+   * A list of preferred regions,
+   * ordered by the most preferred region first.
+   * Set only valid Google Cloud region names.
+   * See https://cloud.google.com/compute/docs/regions-zones
+   * for available regions.
+   * 
+ * + * repeated string preferred_regions = 1; + * + * @param index The index of the element to return. + * @return The preferredRegions at the given index. + */ + java.lang.String getPreferredRegions(int index); + /** + * + * + *
+   * A list of preferred regions,
+   * ordered by the most preferred region first.
+   * Set only valid Google Cloud region names.
+   * See https://cloud.google.com/compute/docs/regions-zones
+   * for available regions.
+   * 
+ * + * repeated string preferred_regions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the preferredRegions at the given index. + */ + com.google.protobuf.ByteString getPreferredRegionsBytes(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RemoveAssetsFromGroupRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RemoveAssetsFromGroupRequest.java new file mode 100644 index 000000000000..e4f91c59d193 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RemoveAssetsFromGroupRequest.java @@ -0,0 +1,1334 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to remove assets from a group.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest} + */ +public final class RemoveAssetsFromGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest) + RemoveAssetsFromGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveAssetsFromGroupRequest.newBuilder() to construct. + private RemoveAssetsFromGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveAssetsFromGroupRequest() { + group_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveAssetsFromGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RemoveAssetsFromGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RemoveAssetsFromGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest.class, + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest.Builder.class); + } + + public static final int GROUP_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object group_ = ""; + /** + * + * + *
+   * Required. Group reference.
+   * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + @java.lang.Override + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Group reference.
+   * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSETS_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.AssetList assets_; + /** + * + * + *
+   * Required. List of assets to be removed.
+   * The maximum number of assets that can be removed in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assets field is set. + */ + @java.lang.Override + public boolean hasAssets() { + return assets_ != null; + } + /** + * + * + *
+   * Required. List of assets to be removed.
+   * The maximum number of assets that can be removed in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assets. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetList getAssets() { + return assets_ == null + ? com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance() + : assets_; + } + /** + * + * + *
+   * Required. List of assets to be removed.
+   * The maximum number of assets that can be removed in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetListOrBuilder getAssetsOrBuilder() { + return assets_ == null + ? com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance() + : assets_; + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 4; + private boolean allowMissing_ = false; + /** + * + * + *
+   * Optional. When this value is set to `false` and one of the given assets is
+   * not an existing member of the group, the operation fails with a `Not Found`
+   * error. When set to `true` this situation is silently ignored by the server.
+   *
+   * Default value is `false`.
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, group_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (assets_ != null) { + output.writeMessage(3, getAssets()); + } + if (allowMissing_ != false) { + output.writeBool(4, allowMissing_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, group_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (assets_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAssets()); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowMissing_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest other = + (com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest) obj; + + if (!getGroup().equals(other.getGroup())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (hasAssets() != other.hasAssets()) return false; + if (hasAssets()) { + if (!getAssets().equals(other.getAssets())) return false; + } + if (getAllowMissing() != other.getAllowMissing()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + if (hasAssets()) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssets().hashCode(); + } + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to remove assets from a group.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest) + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RemoveAssetsFromGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RemoveAssetsFromGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest.class, + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + group_ = ""; + requestId_ = ""; + assets_ = null; + if (assetsBuilder_ != null) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + } + allowMissing_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RemoveAssetsFromGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest build() { + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest buildPartial() { + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest result = + new com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.group_ = group_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.assets_ = assetsBuilder_ == null ? assets_ : assetsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.allowMissing_ = allowMissing_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest.getDefaultInstance()) + return this; + if (!other.getGroup().isEmpty()) { + group_ = other.group_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAssets()) { + mergeAssets(other.getAssets()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + group_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getAssetsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + allowMissing_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object group_ = ""; + /** + * + * + *
+     * Required. Group reference.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Group reference.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Group reference.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The group to set. + * @return This builder for chaining. + */ + public Builder setGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + group_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Group reference.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearGroup() { + group_ = getDefaultInstance().getGroup(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Group reference.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for group to set. + * @return This builder for chaining. + */ + public Builder setGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + group_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.AssetList assets_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetList, + com.google.cloud.migrationcenter.v1.AssetList.Builder, + com.google.cloud.migrationcenter.v1.AssetListOrBuilder> + assetsBuilder_; + /** + * + * + *
+     * Required. List of assets to be removed.
+     * The maximum number of assets that can be removed in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assets field is set. + */ + public boolean hasAssets() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. List of assets to be removed.
+     * The maximum number of assets that can be removed in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assets. + */ + public com.google.cloud.migrationcenter.v1.AssetList getAssets() { + if (assetsBuilder_ == null) { + return assets_ == null + ? com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance() + : assets_; + } else { + return assetsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. List of assets to be removed.
+     * The maximum number of assets that can be removed in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAssets(com.google.cloud.migrationcenter.v1.AssetList value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + assets_ = value; + } else { + assetsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of assets to be removed.
+     * The maximum number of assets that can be removed in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAssets( + com.google.cloud.migrationcenter.v1.AssetList.Builder builderForValue) { + if (assetsBuilder_ == null) { + assets_ = builderForValue.build(); + } else { + assetsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of assets to be removed.
+     * The maximum number of assets that can be removed in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAssets(com.google.cloud.migrationcenter.v1.AssetList value) { + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && assets_ != null + && assets_ != com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance()) { + getAssetsBuilder().mergeFrom(value); + } else { + assets_ = value; + } + } else { + assetsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of assets to be removed.
+     * The maximum number of assets that can be removed in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAssets() { + bitField0_ = (bitField0_ & ~0x00000004); + assets_ = null; + if (assetsBuilder_ != null) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of assets to be removed.
+     * The maximum number of assets that can be removed in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.AssetList.Builder getAssetsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAssetsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. List of assets to be removed.
+     * The maximum number of assets that can be removed in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.AssetListOrBuilder getAssetsOrBuilder() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilder(); + } else { + return assets_ == null + ? com.google.cloud.migrationcenter.v1.AssetList.getDefaultInstance() + : assets_; + } + } + /** + * + * + *
+     * Required. List of assets to be removed.
+     * The maximum number of assets that can be removed in a single request is
+     * 1000.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetList, + com.google.cloud.migrationcenter.v1.AssetList.Builder, + com.google.cloud.migrationcenter.v1.AssetListOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.AssetList, + com.google.cloud.migrationcenter.v1.AssetList.Builder, + com.google.cloud.migrationcenter.v1.AssetListOrBuilder>( + getAssets(), getParentForChildren(), isClean()); + assets_ = null; + } + return assetsBuilder_; + } + + private boolean allowMissing_; + /** + * + * + *
+     * Optional. When this value is set to `false` and one of the given assets is
+     * not an existing member of the group, the operation fails with a `Not Found`
+     * error. When set to `true` this situation is silently ignored by the server.
+     *
+     * Default value is `false`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * Optional. When this value is set to `false` and one of the given assets is
+     * not an existing member of the group, the operation fails with a `Not Found`
+     * error. When set to `true` this situation is silently ignored by the server.
+     *
+     * Default value is `false`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When this value is set to `false` and one of the given assets is
+     * not an existing member of the group, the operation fails with a `Not Found`
+     * error. When set to `true` this situation is silently ignored by the server.
+     *
+     * Default value is `false`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + bitField0_ = (bitField0_ & ~0x00000008); + allowMissing_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest) + private static final com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest(); + } + + public static com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveAssetsFromGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RemoveAssetsFromGroupRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RemoveAssetsFromGroupRequestOrBuilder.java new file mode 100644 index 000000000000..23c13929e7d6 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RemoveAssetsFromGroupRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface RemoveAssetsFromGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Group reference.
+   * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + java.lang.String getGroup(); + /** + * + * + *
+   * Required. Group reference.
+   * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + com.google.protobuf.ByteString getGroupBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Required. List of assets to be removed.
+   * The maximum number of assets that can be removed in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assets field is set. + */ + boolean hasAssets(); + /** + * + * + *
+   * Required. List of assets to be removed.
+   * The maximum number of assets that can be removed in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assets. + */ + com.google.cloud.migrationcenter.v1.AssetList getAssets(); + /** + * + * + *
+   * Required. List of assets to be removed.
+   * The maximum number of assets that can be removed in a single request is
+   * 1000.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.AssetListOrBuilder getAssetsOrBuilder(); + + /** + * + * + *
+   * Optional. When this value is set to `false` and one of the given assets is
+   * not an existing member of the group, the operation fails with a `Not Found`
+   * error. When set to `true` this situation is silently ignored by the server.
+   *
+   * Default value is `false`.
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Report.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Report.java new file mode 100644 index 000000000000..abd2a460612d --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Report.java @@ -0,0 +1,2450 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Report represents a point-in-time rendering of the ReportConfig results.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Report} + */ +public final class Report extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Report) + ReportOrBuilder { + private static final long serialVersionUID = 0L; + // Use Report.newBuilder() to construct. + private Report(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Report() { + name_ = ""; + displayName_ = ""; + description_ = ""; + type_ = 0; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Report(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Report_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Report_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Report.class, + com.google.cloud.migrationcenter.v1.Report.Builder.class); + } + + /** + * + * + *
+   * Report type.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.Report.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default Report type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Total cost of ownership Report type.
+     * 
+ * + * TOTAL_COST_OF_OWNERSHIP = 1; + */ + TOTAL_COST_OF_OWNERSHIP(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default Report type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Total cost of ownership Report type.
+     * 
+ * + * TOTAL_COST_OF_OWNERSHIP = 1; + */ + public static final int TOTAL_COST_OF_OWNERSHIP_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return TOTAL_COST_OF_OWNERSHIP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.Report.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.Report.Type) + } + + /** + * + * + *
+   * Report creation state.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.Report.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default Report creation state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Creating Report.
+     * 
+ * + * PENDING = 1; + */ + PENDING(1), + /** + * + * + *
+     * Successfully created Report.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + * + * + *
+     * Failed to create Report.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default Report creation state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Creating Report.
+     * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + * + * + *
+     * Successfully created Report.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + * + * + *
+     * Failed to create Report.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PENDING; + case 2: + return SUCCEEDED; + case 3: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.Report.getDescriptor().getEnumTypes().get(1); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.Report.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 6; + private int type_ = 0; + /** + * + * + *
+   * Report type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Report.Type type = 6; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Report type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Report.Type type = 6; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Report.Type getType() { + com.google.cloud.migrationcenter.v1.Report.Type result = + com.google.cloud.migrationcenter.v1.Report.Type.forNumber(type_); + return result == null ? com.google.cloud.migrationcenter.v1.Report.Type.UNRECOGNIZED : result; + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + /** + * + * + *
+   * Report creation state.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Report.State state = 7; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Report creation state.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Report.State state = 7; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Report.State getState() { + com.google.cloud.migrationcenter.v1.Report.State result = + com.google.cloud.migrationcenter.v1.Report.State.forNumber(state_); + return result == null ? com.google.cloud.migrationcenter.v1.Report.State.UNRECOGNIZED : result; + } + + public static final int SUMMARY_FIELD_NUMBER = 8; + private com.google.cloud.migrationcenter.v1.ReportSummary summary_; + /** + * + * + *
+   * Output only. Summary view of the Report.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the summary field is set. + */ + @java.lang.Override + public boolean hasSummary() { + return summary_ != null; + } + /** + * + * + *
+   * Output only. Summary view of the Report.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The summary. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary getSummary() { + return summary_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.getDefaultInstance() + : summary_; + } + /** + * + * + *
+   * Output only. Summary view of the Report.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummaryOrBuilder getSummaryOrBuilder() { + return summary_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.getDefaultInstance() + : summary_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (type_ != com.google.cloud.migrationcenter.v1.Report.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, type_); + } + if (state_ != com.google.cloud.migrationcenter.v1.Report.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + if (summary_ != null) { + output.writeMessage(8, getSummary()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (type_ != com.google.cloud.migrationcenter.v1.Report.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, type_); + } + if (state_ != com.google.cloud.migrationcenter.v1.Report.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + if (summary_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSummary()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Report)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Report other = + (com.google.cloud.migrationcenter.v1.Report) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (type_ != other.type_) return false; + if (state_ != other.state_) return false; + if (hasSummary() != other.hasSummary()) return false; + if (hasSummary()) { + if (!getSummary().equals(other.getSummary())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasSummary()) { + hash = (37 * hash) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Report parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Report parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Report parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Report parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Report parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Report parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Report parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Report parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Report parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Report parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Report parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Report parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.Report prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Report represents a point-in-time rendering of the ReportConfig results.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Report} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Report) + com.google.cloud.migrationcenter.v1.ReportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Report_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Report_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Report.class, + com.google.cloud.migrationcenter.v1.Report.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Report.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + displayName_ = ""; + description_ = ""; + type_ = 0; + state_ = 0; + summary_ = null; + if (summaryBuilder_ != null) { + summaryBuilder_.dispose(); + summaryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Report_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Report getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Report.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Report build() { + com.google.cloud.migrationcenter.v1.Report result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Report buildPartial() { + com.google.cloud.migrationcenter.v1.Report result = + new com.google.cloud.migrationcenter.v1.Report(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.Report result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.summary_ = summaryBuilder_ == null ? summary_ : summaryBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Report) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Report) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Report other) { + if (other == com.google.cloud.migrationcenter.v1.Report.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasSummary()) { + mergeSummary(other.getSummary()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + input.readMessage(getSummaryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Last update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Last update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Last update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Last update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Last update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Report type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Report.Type type = 6; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Report type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Report.Type type = 6; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Report type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Report.Type type = 6; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Report.Type getType() { + com.google.cloud.migrationcenter.v1.Report.Type result = + com.google.cloud.migrationcenter.v1.Report.Type.forNumber(type_); + return result == null ? com.google.cloud.migrationcenter.v1.Report.Type.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Report type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Report.Type type = 6; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.migrationcenter.v1.Report.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Report type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Report.Type type = 6; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000020); + type_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Report creation state.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Report.State state = 7; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Report creation state.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Report.State state = 7; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Report creation state.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Report.State state = 7; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Report.State getState() { + com.google.cloud.migrationcenter.v1.Report.State result = + com.google.cloud.migrationcenter.v1.Report.State.forNumber(state_); + return result == null + ? com.google.cloud.migrationcenter.v1.Report.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Report creation state.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Report.State state = 7; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.migrationcenter.v1.Report.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Report creation state.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Report.State state = 7; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.ReportSummary summary_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary, + com.google.cloud.migrationcenter.v1.ReportSummary.Builder, + com.google.cloud.migrationcenter.v1.ReportSummaryOrBuilder> + summaryBuilder_; + /** + * + * + *
+     * Output only. Summary view of the Report.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the summary field is set. + */ + public boolean hasSummary() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Summary view of the Report.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The summary. + */ + public com.google.cloud.migrationcenter.v1.ReportSummary getSummary() { + if (summaryBuilder_ == null) { + return summary_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.getDefaultInstance() + : summary_; + } else { + return summaryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Summary view of the Report.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSummary(com.google.cloud.migrationcenter.v1.ReportSummary value) { + if (summaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + summary_ = value; + } else { + summaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Summary view of the Report.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSummary( + com.google.cloud.migrationcenter.v1.ReportSummary.Builder builderForValue) { + if (summaryBuilder_ == null) { + summary_ = builderForValue.build(); + } else { + summaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Summary view of the Report.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeSummary(com.google.cloud.migrationcenter.v1.ReportSummary value) { + if (summaryBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && summary_ != null + && summary_ != com.google.cloud.migrationcenter.v1.ReportSummary.getDefaultInstance()) { + getSummaryBuilder().mergeFrom(value); + } else { + summary_ = value; + } + } else { + summaryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Summary view of the Report.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSummary() { + bitField0_ = (bitField0_ & ~0x00000080); + summary_ = null; + if (summaryBuilder_ != null) { + summaryBuilder_.dispose(); + summaryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Summary view of the Report.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.Builder getSummaryBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getSummaryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Summary view of the Report.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummaryOrBuilder getSummaryOrBuilder() { + if (summaryBuilder_ != null) { + return summaryBuilder_.getMessageOrBuilder(); + } else { + return summary_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.getDefaultInstance() + : summary_; + } + } + /** + * + * + *
+     * Output only. Summary view of the Report.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary, + com.google.cloud.migrationcenter.v1.ReportSummary.Builder, + com.google.cloud.migrationcenter.v1.ReportSummaryOrBuilder> + getSummaryFieldBuilder() { + if (summaryBuilder_ == null) { + summaryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary, + com.google.cloud.migrationcenter.v1.ReportSummary.Builder, + com.google.cloud.migrationcenter.v1.ReportSummaryOrBuilder>( + getSummary(), getParentForChildren(), isClean()); + summary_ = null; + } + return summaryBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Report) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Report) + private static final com.google.cloud.migrationcenter.v1.Report DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Report(); + } + + public static com.google.cloud.migrationcenter.v1.Report getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Report parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Report getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesRequest.java new file mode 100644 index 000000000000..0d4edccf3efc --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesRequest.java @@ -0,0 +1,1089 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to report a set of asset frames.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportAssetFramesRequest} + */ +public final class ReportAssetFramesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportAssetFramesRequest) + ReportAssetFramesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportAssetFramesRequest.newBuilder() to construct. + private ReportAssetFramesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReportAssetFramesRequest() { + parent_ = ""; + source_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportAssetFramesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest.class, + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent of the resource.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent of the resource.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FRAMES_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.Frames frames_; + /** + * + * + *
+   * Collection of frames data.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + * + * @return Whether the frames field is set. + */ + @java.lang.Override + public boolean hasFrames() { + return frames_ != null; + } + /** + * + * + *
+   * Collection of frames data.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + * + * @return The frames. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Frames getFrames() { + return frames_ == null + ? com.google.cloud.migrationcenter.v1.Frames.getDefaultInstance() + : frames_; + } + /** + * + * + *
+   * Collection of frames data.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FramesOrBuilder getFramesOrBuilder() { + return frames_ == null + ? com.google.cloud.migrationcenter.v1.Frames.getDefaultInstance() + : frames_; + } + + public static final int SOURCE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object source_ = ""; + /** + * + * + *
+   * Required. Reference to a source.
+   * 
+ * + * + * string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Reference to a source.
+   * 
+ * + * + * string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (frames_ != null) { + output.writeMessage(2, getFrames()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (frames_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFrames()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest other = + (com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasFrames() != other.hasFrames()) return false; + if (hasFrames()) { + if (!getFrames().equals(other.getFrames())) return false; + } + if (!getSource().equals(other.getSource())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasFrames()) { + hash = (37 * hash) + FRAMES_FIELD_NUMBER; + hash = (53 * hash) + getFrames().hashCode(); + } + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to report a set of asset frames.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportAssetFramesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportAssetFramesRequest) + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest.class, + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + frames_ = null; + if (framesBuilder_ != null) { + framesBuilder_.dispose(); + framesBuilder_ = null; + } + source_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest build() { + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest buildPartial() { + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest result = + new com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.frames_ = framesBuilder_ == null ? frames_ : framesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.source_ = source_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasFrames()) { + mergeFrames(other.getFrames()); + } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getFramesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent of the resource.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent of the resource.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent of the resource.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent of the resource.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent of the resource.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.Frames frames_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Frames, + com.google.cloud.migrationcenter.v1.Frames.Builder, + com.google.cloud.migrationcenter.v1.FramesOrBuilder> + framesBuilder_; + /** + * + * + *
+     * Collection of frames data.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + * + * @return Whether the frames field is set. + */ + public boolean hasFrames() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Collection of frames data.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + * + * @return The frames. + */ + public com.google.cloud.migrationcenter.v1.Frames getFrames() { + if (framesBuilder_ == null) { + return frames_ == null + ? com.google.cloud.migrationcenter.v1.Frames.getDefaultInstance() + : frames_; + } else { + return framesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Collection of frames data.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + */ + public Builder setFrames(com.google.cloud.migrationcenter.v1.Frames value) { + if (framesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + frames_ = value; + } else { + framesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Collection of frames data.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + */ + public Builder setFrames(com.google.cloud.migrationcenter.v1.Frames.Builder builderForValue) { + if (framesBuilder_ == null) { + frames_ = builderForValue.build(); + } else { + framesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Collection of frames data.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + */ + public Builder mergeFrames(com.google.cloud.migrationcenter.v1.Frames value) { + if (framesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && frames_ != null + && frames_ != com.google.cloud.migrationcenter.v1.Frames.getDefaultInstance()) { + getFramesBuilder().mergeFrom(value); + } else { + frames_ = value; + } + } else { + framesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Collection of frames data.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + */ + public Builder clearFrames() { + bitField0_ = (bitField0_ & ~0x00000002); + frames_ = null; + if (framesBuilder_ != null) { + framesBuilder_.dispose(); + framesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Collection of frames data.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + */ + public com.google.cloud.migrationcenter.v1.Frames.Builder getFramesBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFramesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Collection of frames data.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + */ + public com.google.cloud.migrationcenter.v1.FramesOrBuilder getFramesOrBuilder() { + if (framesBuilder_ != null) { + return framesBuilder_.getMessageOrBuilder(); + } else { + return frames_ == null + ? com.google.cloud.migrationcenter.v1.Frames.getDefaultInstance() + : frames_; + } + } + /** + * + * + *
+     * Collection of frames data.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Frames, + com.google.cloud.migrationcenter.v1.Frames.Builder, + com.google.cloud.migrationcenter.v1.FramesOrBuilder> + getFramesFieldBuilder() { + if (framesBuilder_ == null) { + framesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Frames, + com.google.cloud.migrationcenter.v1.Frames.Builder, + com.google.cloud.migrationcenter.v1.FramesOrBuilder>( + getFrames(), getParentForChildren(), isClean()); + frames_ = null; + } + return framesBuilder_; + } + + private java.lang.Object source_ = ""; + /** + * + * + *
+     * Required. Reference to a source.
+     * 
+ * + * + * string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Reference to a source.
+     * 
+ * + * + * string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Reference to a source.
+     * 
+ * + * + * string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Reference to a source.
+     * 
+ * + * + * string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSource() { + source_ = getDefaultInstance().getSource(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Reference to a source.
+     * 
+ * + * + * string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + source_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportAssetFramesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportAssetFramesRequest) + private static final com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest(); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportAssetFramesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesRequestOrBuilder.java new file mode 100644 index 000000000000..65cf9337e34b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ReportAssetFramesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportAssetFramesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent of the resource.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent of the resource.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Collection of frames data.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + * + * @return Whether the frames field is set. + */ + boolean hasFrames(); + /** + * + * + *
+   * Collection of frames data.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + * + * @return The frames. + */ + com.google.cloud.migrationcenter.v1.Frames getFrames(); + /** + * + * + *
+   * Collection of frames data.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Frames frames = 2; + */ + com.google.cloud.migrationcenter.v1.FramesOrBuilder getFramesOrBuilder(); + + /** + * + * + *
+   * Required. Reference to a source.
+   * 
+ * + * + * string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+   * Required. Reference to a source.
+   * 
+ * + * + * string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesResponse.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesResponse.java new file mode 100644 index 000000000000..02880348160c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesResponse.java @@ -0,0 +1,435 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A response to a call to `ReportAssetFrame`.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportAssetFramesResponse} + */ +public final class ReportAssetFramesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportAssetFramesResponse) + ReportAssetFramesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportAssetFramesResponse.newBuilder() to construct. + private ReportAssetFramesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReportAssetFramesResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportAssetFramesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse.class, + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse other = + (com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A response to a call to `ReportAssetFrame`.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportAssetFramesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportAssetFramesResponse) + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse.class, + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportAssetFramesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse build() { + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse buildPartial() { + com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse result = + new com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportAssetFramesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportAssetFramesResponse) + private static final com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse(); + } + + public static com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportAssetFramesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesResponseOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesResponseOrBuilder.java new file mode 100644 index 000000000000..741bb9c5ce6a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportAssetFramesResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ReportAssetFramesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportAssetFramesResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfig.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfig.java new file mode 100644 index 000000000000..43308fd73b06 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfig.java @@ -0,0 +1,3062 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * The groups and associated preference sets on which
+ * we can generate reports.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportConfig} + */ +public final class ReportConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportConfig) + ReportConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportConfig.newBuilder() to construct. + private ReportConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReportConfig() { + name_ = ""; + displayName_ = ""; + description_ = ""; + groupPreferencesetAssignments_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportConfig.class, + com.google.cloud.migrationcenter.v1.ReportConfig.Builder.class); + } + + public interface GroupPreferenceSetAssignmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Name of the group.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + java.lang.String getGroup(); + /** + * + * + *
+     * Required. Name of the group.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + com.google.protobuf.ByteString getGroupBytes(); + + /** + * + * + *
+     * Required. Name of the Preference Set.
+     * 
+ * + * + * string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The preferenceSet. + */ + java.lang.String getPreferenceSet(); + /** + * + * + *
+     * Required. Name of the Preference Set.
+     * 
+ * + * + * string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for preferenceSet. + */ + com.google.protobuf.ByteString getPreferenceSetBytes(); + } + /** + * + * + *
+   * Represents a combination of a group with a preference set.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment} + */ + public static final class GroupPreferenceSetAssignment + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment) + GroupPreferenceSetAssignmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupPreferenceSetAssignment.newBuilder() to construct. + private GroupPreferenceSetAssignment( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GroupPreferenceSetAssignment() { + group_ = ""; + preferenceSet_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GroupPreferenceSetAssignment(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportConfig_GroupPreferenceSetAssignment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportConfig_GroupPreferenceSetAssignment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.class, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.Builder + .class); + } + + public static final int GROUP_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object group_ = ""; + /** + * + * + *
+     * Required. Name of the group.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + @java.lang.Override + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Name of the group.
+     * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREFERENCE_SET_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object preferenceSet_ = ""; + /** + * + * + *
+     * Required. Name of the Preference Set.
+     * 
+ * + * + * string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The preferenceSet. + */ + @java.lang.Override + public java.lang.String getPreferenceSet() { + java.lang.Object ref = preferenceSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + preferenceSet_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Name of the Preference Set.
+     * 
+ * + * + * string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for preferenceSet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPreferenceSetBytes() { + java.lang.Object ref = preferenceSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preferenceSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, group_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preferenceSet_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, preferenceSet_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, group_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preferenceSet_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, preferenceSet_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment other = + (com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment) obj; + + if (!getGroup().equals(other.getGroup())) return false; + if (!getPreferenceSet().equals(other.getPreferenceSet())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().hashCode(); + hash = (37 * hash) + PREFERENCE_SET_FIELD_NUMBER; + hash = (53 * hash) + getPreferenceSet().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents a combination of a group with a preference set.
+     * 
+ * + * Protobuf type {@code + * google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment) + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportConfig_GroupPreferenceSetAssignment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportConfig_GroupPreferenceSetAssignment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.class, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + .Builder.class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + group_ = ""; + preferenceSet_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportConfig_GroupPreferenceSetAssignment_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment build() { + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + buildPartial() { + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment result = + new com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.group_ = group_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.preferenceSet_ = preferenceSet_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + .getDefaultInstance()) return this; + if (!other.getGroup().isEmpty()) { + group_ = other.group_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPreferenceSet().isEmpty()) { + preferenceSet_ = other.preferenceSet_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + group_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + preferenceSet_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object group_ = ""; + /** + * + * + *
+       * Required. Name of the group.
+       * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Name of the group.
+       * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Name of the group.
+       * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The group to set. + * @return This builder for chaining. + */ + public Builder setGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + group_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Name of the group.
+       * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearGroup() { + group_ = getDefaultInstance().getGroup(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Name of the group.
+       * 
+ * + * + * string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for group to set. + * @return This builder for chaining. + */ + public Builder setGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + group_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object preferenceSet_ = ""; + /** + * + * + *
+       * Required. Name of the Preference Set.
+       * 
+ * + * + * string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The preferenceSet. + */ + public java.lang.String getPreferenceSet() { + java.lang.Object ref = preferenceSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + preferenceSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Name of the Preference Set.
+       * 
+ * + * + * string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for preferenceSet. + */ + public com.google.protobuf.ByteString getPreferenceSetBytes() { + java.lang.Object ref = preferenceSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preferenceSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Name of the Preference Set.
+       * 
+ * + * + * string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The preferenceSet to set. + * @return This builder for chaining. + */ + public Builder setPreferenceSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + preferenceSet_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Name of the Preference Set.
+       * 
+ * + * + * string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPreferenceSet() { + preferenceSet_ = getDefaultInstance().getPreferenceSet(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Name of the Preference Set.
+       * 
+ * + * + * string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for preferenceSet to set. + * @return This builder for chaining. + */ + public Builder setPreferenceSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + preferenceSet_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment) + private static final com.google.cloud.migrationcenter.v1.ReportConfig + .GroupPreferenceSetAssignment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment(); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupPreferenceSetAssignment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_PREFERENCESET_ASSIGNMENTS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment> + groupPreferencesetAssignments_; + /** + * + * + *
+   * Required. Collection of combinations of groups and preference sets.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment> + getGroupPreferencesetAssignmentsList() { + return groupPreferencesetAssignments_; + } + /** + * + * + *
+   * Required. Collection of combinations of groups and preference sets.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportConfig + .GroupPreferenceSetAssignmentOrBuilder> + getGroupPreferencesetAssignmentsOrBuilderList() { + return groupPreferencesetAssignments_; + } + /** + * + * + *
+   * Required. Collection of combinations of groups and preference sets.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getGroupPreferencesetAssignmentsCount() { + return groupPreferencesetAssignments_.size(); + } + /** + * + * + *
+   * Required. Collection of combinations of groups and preference sets.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + getGroupPreferencesetAssignments(int index) { + return groupPreferencesetAssignments_.get(index); + } + /** + * + * + *
+   * Required. Collection of combinations of groups and preference sets.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignmentOrBuilder + getGroupPreferencesetAssignmentsOrBuilder(int index) { + return groupPreferencesetAssignments_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + for (int i = 0; i < groupPreferencesetAssignments_.size(); i++) { + output.writeMessage(6, groupPreferencesetAssignments_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + for (int i = 0; i < groupPreferencesetAssignments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, groupPreferencesetAssignments_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ReportConfig)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportConfig other = + (com.google.cloud.migrationcenter.v1.ReportConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getGroupPreferencesetAssignmentsList() + .equals(other.getGroupPreferencesetAssignmentsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getGroupPreferencesetAssignmentsCount() > 0) { + hash = (37 * hash) + GROUP_PREFERENCESET_ASSIGNMENTS_FIELD_NUMBER; + hash = (53 * hash) + getGroupPreferencesetAssignmentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.ReportConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The groups and associated preference sets on which
+   * we can generate reports.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportConfig) + com.google.cloud.migrationcenter.v1.ReportConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportConfig.class, + com.google.cloud.migrationcenter.v1.ReportConfig.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ReportConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + displayName_ = ""; + description_ = ""; + if (groupPreferencesetAssignmentsBuilder_ == null) { + groupPreferencesetAssignments_ = java.util.Collections.emptyList(); + } else { + groupPreferencesetAssignments_ = null; + groupPreferencesetAssignmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig build() { + com.google.cloud.migrationcenter.v1.ReportConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig buildPartial() { + com.google.cloud.migrationcenter.v1.ReportConfig result = + new com.google.cloud.migrationcenter.v1.ReportConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ReportConfig result) { + if (groupPreferencesetAssignmentsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + groupPreferencesetAssignments_ = + java.util.Collections.unmodifiableList(groupPreferencesetAssignments_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.groupPreferencesetAssignments_ = groupPreferencesetAssignments_; + } else { + result.groupPreferencesetAssignments_ = groupPreferencesetAssignmentsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ReportConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ReportConfig) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ReportConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ReportConfig other) { + if (other == com.google.cloud.migrationcenter.v1.ReportConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (groupPreferencesetAssignmentsBuilder_ == null) { + if (!other.groupPreferencesetAssignments_.isEmpty()) { + if (groupPreferencesetAssignments_.isEmpty()) { + groupPreferencesetAssignments_ = other.groupPreferencesetAssignments_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureGroupPreferencesetAssignmentsIsMutable(); + groupPreferencesetAssignments_.addAll(other.groupPreferencesetAssignments_); + } + onChanged(); + } + } else { + if (!other.groupPreferencesetAssignments_.isEmpty()) { + if (groupPreferencesetAssignmentsBuilder_.isEmpty()) { + groupPreferencesetAssignmentsBuilder_.dispose(); + groupPreferencesetAssignmentsBuilder_ = null; + groupPreferencesetAssignments_ = other.groupPreferencesetAssignments_; + bitField0_ = (bitField0_ & ~0x00000020); + groupPreferencesetAssignmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGroupPreferencesetAssignmentsFieldBuilder() + : null; + } else { + groupPreferencesetAssignmentsBuilder_.addAllMessages( + other.groupPreferencesetAssignments_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ReportConfig + .GroupPreferenceSetAssignment.parser(), + extensionRegistry); + if (groupPreferencesetAssignmentsBuilder_ == null) { + ensureGroupPreferencesetAssignmentsIsMutable(); + groupPreferencesetAssignments_.add(m); + } else { + groupPreferencesetAssignmentsBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name. Maximum length is 63 characters.
+     * 
+ * + * string display_name = 4; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment> + groupPreferencesetAssignments_ = java.util.Collections.emptyList(); + + private void ensureGroupPreferencesetAssignmentsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + groupPreferencesetAssignments_ = + new java.util.ArrayList< + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment>( + groupPreferencesetAssignments_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.Builder, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignmentOrBuilder> + groupPreferencesetAssignmentsBuilder_; + + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment> + getGroupPreferencesetAssignmentsList() { + if (groupPreferencesetAssignmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupPreferencesetAssignments_); + } else { + return groupPreferencesetAssignmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getGroupPreferencesetAssignmentsCount() { + if (groupPreferencesetAssignmentsBuilder_ == null) { + return groupPreferencesetAssignments_.size(); + } else { + return groupPreferencesetAssignmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + getGroupPreferencesetAssignments(int index) { + if (groupPreferencesetAssignmentsBuilder_ == null) { + return groupPreferencesetAssignments_.get(index); + } else { + return groupPreferencesetAssignmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGroupPreferencesetAssignments( + int index, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment value) { + if (groupPreferencesetAssignmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupPreferencesetAssignmentsIsMutable(); + groupPreferencesetAssignments_.set(index, value); + onChanged(); + } else { + groupPreferencesetAssignmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGroupPreferencesetAssignments( + int index, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.Builder + builderForValue) { + if (groupPreferencesetAssignmentsBuilder_ == null) { + ensureGroupPreferencesetAssignmentsIsMutable(); + groupPreferencesetAssignments_.set(index, builderForValue.build()); + onChanged(); + } else { + groupPreferencesetAssignmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addGroupPreferencesetAssignments( + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment value) { + if (groupPreferencesetAssignmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupPreferencesetAssignmentsIsMutable(); + groupPreferencesetAssignments_.add(value); + onChanged(); + } else { + groupPreferencesetAssignmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addGroupPreferencesetAssignments( + int index, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment value) { + if (groupPreferencesetAssignmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupPreferencesetAssignmentsIsMutable(); + groupPreferencesetAssignments_.add(index, value); + onChanged(); + } else { + groupPreferencesetAssignmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addGroupPreferencesetAssignments( + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.Builder + builderForValue) { + if (groupPreferencesetAssignmentsBuilder_ == null) { + ensureGroupPreferencesetAssignmentsIsMutable(); + groupPreferencesetAssignments_.add(builderForValue.build()); + onChanged(); + } else { + groupPreferencesetAssignmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addGroupPreferencesetAssignments( + int index, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.Builder + builderForValue) { + if (groupPreferencesetAssignmentsBuilder_ == null) { + ensureGroupPreferencesetAssignmentsIsMutable(); + groupPreferencesetAssignments_.add(index, builderForValue.build()); + onChanged(); + } else { + groupPreferencesetAssignmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllGroupPreferencesetAssignments( + java.lang.Iterable< + ? extends + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment> + values) { + if (groupPreferencesetAssignmentsBuilder_ == null) { + ensureGroupPreferencesetAssignmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, groupPreferencesetAssignments_); + onChanged(); + } else { + groupPreferencesetAssignmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGroupPreferencesetAssignments() { + if (groupPreferencesetAssignmentsBuilder_ == null) { + groupPreferencesetAssignments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + groupPreferencesetAssignmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeGroupPreferencesetAssignments(int index) { + if (groupPreferencesetAssignmentsBuilder_ == null) { + ensureGroupPreferencesetAssignmentsIsMutable(); + groupPreferencesetAssignments_.remove(index); + onChanged(); + } else { + groupPreferencesetAssignmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.Builder + getGroupPreferencesetAssignmentsBuilder(int index) { + return getGroupPreferencesetAssignmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignmentOrBuilder + getGroupPreferencesetAssignmentsOrBuilder(int index) { + if (groupPreferencesetAssignmentsBuilder_ == null) { + return groupPreferencesetAssignments_.get(index); + } else { + return groupPreferencesetAssignmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportConfig + .GroupPreferenceSetAssignmentOrBuilder> + getGroupPreferencesetAssignmentsOrBuilderList() { + if (groupPreferencesetAssignmentsBuilder_ != null) { + return groupPreferencesetAssignmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupPreferencesetAssignments_); + } + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.Builder + addGroupPreferencesetAssignmentsBuilder() { + return getGroupPreferencesetAssignmentsFieldBuilder() + .addBuilder( + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + .getDefaultInstance()); + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.Builder + addGroupPreferencesetAssignmentsBuilder(int index) { + return getGroupPreferencesetAssignmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + .getDefaultInstance()); + } + /** + * + * + *
+     * Required. Collection of combinations of groups and preference sets.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.Builder> + getGroupPreferencesetAssignmentsBuilderList() { + return getGroupPreferencesetAssignmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment.Builder, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignmentOrBuilder> + getGroupPreferencesetAssignmentsFieldBuilder() { + if (groupPreferencesetAssignmentsBuilder_ == null) { + groupPreferencesetAssignmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment, + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + .Builder, + com.google.cloud.migrationcenter.v1.ReportConfig + .GroupPreferenceSetAssignmentOrBuilder>( + groupPreferencesetAssignments_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + groupPreferencesetAssignments_ = null; + } + return groupPreferencesetAssignmentsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportConfig) + private static final com.google.cloud.migrationcenter.v1.ReportConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ReportConfig(); + } + + public static com.google.cloud.migrationcenter.v1.ReportConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfigName.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfigName.java new file mode 100644 index 000000000000..bb79869a5245 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfigName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ReportConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_REPORT_CONFIG = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/reportConfigs/{report_config}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String reportConfig; + + @Deprecated + protected ReportConfigName() { + project = null; + location = null; + reportConfig = null; + } + + private ReportConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + reportConfig = Preconditions.checkNotNull(builder.getReportConfig()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getReportConfig() { + return reportConfig; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ReportConfigName of(String project, String location, String reportConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setReportConfig(reportConfig) + .build(); + } + + public static String format(String project, String location, String reportConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setReportConfig(reportConfig) + .build() + .toString(); + } + + public static ReportConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_REPORT_CONFIG.validatedMatch( + formattedString, "ReportConfigName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("report_config")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ReportConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_REPORT_CONFIG.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (reportConfig != null) { + fieldMapBuilder.put("report_config", reportConfig); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_REPORT_CONFIG.instantiate( + "project", project, "location", location, "report_config", reportConfig); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ReportConfigName that = ((ReportConfigName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.reportConfig, that.reportConfig); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(reportConfig); + return h; + } + + /** Builder for projects/{project}/locations/{location}/reportConfigs/{report_config}. */ + public static class Builder { + private String project; + private String location; + private String reportConfig; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getReportConfig() { + return reportConfig; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setReportConfig(String reportConfig) { + this.reportConfig = reportConfig; + return this; + } + + private Builder(ReportConfigName reportConfigName) { + this.project = reportConfigName.project; + this.location = reportConfigName.location; + this.reportConfig = reportConfigName.reportConfig; + } + + public ReportConfigName build() { + return new ReportConfigName(this); + } + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfigOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfigOrBuilder.java new file mode 100644 index 000000000000..719a6d16e242 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportConfigOrBuilder.java @@ -0,0 +1,244 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ReportConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Collection of combinations of groups and preference sets.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getGroupPreferencesetAssignmentsList(); + /** + * + * + *
+   * Required. Collection of combinations of groups and preference sets.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + getGroupPreferencesetAssignments(int index); + /** + * + * + *
+   * Required. Collection of combinations of groups and preference sets.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getGroupPreferencesetAssignmentsCount(); + /** + * + * + *
+   * Required. Collection of combinations of groups and preference sets.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportConfig + .GroupPreferenceSetAssignmentOrBuilder> + getGroupPreferencesetAssignmentsOrBuilderList(); + /** + * + * + *
+   * Required. Collection of combinations of groups and preference sets.
+   * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignmentOrBuilder + getGroupPreferencesetAssignmentsOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportName.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportName.java new file mode 100644 index 000000000000..8eb65adc15e0 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportName.java @@ -0,0 +1,260 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ReportName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_REPORT_CONFIG_REPORT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/reportConfigs/{report_config}/reports/{report}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String reportConfig; + private final String report; + + @Deprecated + protected ReportName() { + project = null; + location = null; + reportConfig = null; + report = null; + } + + private ReportName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + reportConfig = Preconditions.checkNotNull(builder.getReportConfig()); + report = Preconditions.checkNotNull(builder.getReport()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getReportConfig() { + return reportConfig; + } + + public String getReport() { + return report; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ReportName of(String project, String location, String reportConfig, String report) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setReportConfig(reportConfig) + .setReport(report) + .build(); + } + + public static String format(String project, String location, String reportConfig, String report) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setReportConfig(reportConfig) + .setReport(report) + .build() + .toString(); + } + + public static ReportName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_REPORT_CONFIG_REPORT.validatedMatch( + formattedString, "ReportName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("report_config"), + matchMap.get("report")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ReportName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_REPORT_CONFIG_REPORT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (reportConfig != null) { + fieldMapBuilder.put("report_config", reportConfig); + } + if (report != null) { + fieldMapBuilder.put("report", report); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_REPORT_CONFIG_REPORT.instantiate( + "project", project, "location", location, "report_config", reportConfig, "report", report); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ReportName that = ((ReportName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.reportConfig, that.reportConfig) + && Objects.equals(this.report, that.report); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(reportConfig); + h *= 1000003; + h ^= Objects.hashCode(report); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/reportConfigs/{report_config}/reports/{report}. + */ + public static class Builder { + private String project; + private String location; + private String reportConfig; + private String report; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getReportConfig() { + return reportConfig; + } + + public String getReport() { + return report; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setReportConfig(String reportConfig) { + this.reportConfig = reportConfig; + return this; + } + + public Builder setReport(String report) { + this.report = report; + return this; + } + + private Builder(ReportName reportName) { + this.project = reportName.project; + this.location = reportName.location; + this.reportConfig = reportName.reportConfig; + this.report = reportName.report; + } + + public ReportName build() { + return new ReportName(this); + } + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportOrBuilder.java new file mode 100644 index 000000000000..fe9525173ffd --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportOrBuilder.java @@ -0,0 +1,267 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ReportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Report) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Last update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * User-friendly display name. Maximum length is 63 characters.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Report type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Report.Type type = 6; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Report type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Report.Type type = 6; + * + * @return The type. + */ + com.google.cloud.migrationcenter.v1.Report.Type getType(); + + /** + * + * + *
+   * Report creation state.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Report.State state = 7; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Report creation state.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Report.State state = 7; + * + * @return The state. + */ + com.google.cloud.migrationcenter.v1.Report.State getState(); + + /** + * + * + *
+   * Output only. Summary view of the Report.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the summary field is set. + */ + boolean hasSummary(); + /** + * + * + *
+   * Output only. Summary view of the Report.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The summary. + */ + com.google.cloud.migrationcenter.v1.ReportSummary getSummary(); + /** + * + * + *
+   * Output only. Summary view of the Report.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummaryOrBuilder getSummaryOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportSummary.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportSummary.java new file mode 100644 index 000000000000..e6b88a4ade7d --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportSummary.java @@ -0,0 +1,17060 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Describes the Summary view of a Report, which contains aggregated values
+ * for all the groups and preference sets included in this Report.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary} + */ +public final class ReportSummary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportSummary) + ReportSummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportSummary.newBuilder() to construct. + private ReportSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReportSummary() { + groupFindings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportSummary(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.class, + com.google.cloud.migrationcenter.v1.ReportSummary.Builder.class); + } + + public interface ChartDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportSummary.ChartData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Each data point in the chart is represented as a name-value pair
+     * with the name being the x-axis label, and the value being the y-axis
+     * value.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + java.util.List + getDataPointsList(); + /** + * + * + *
+     * Each data point in the chart is represented as a name-value pair
+     * with the name being the x-axis label, and the value being the y-axis
+     * value.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint getDataPoints(int index); + /** + * + * + *
+     * Each data point in the chart is represented as a name-value pair
+     * with the name being the x-axis label, and the value being the y-axis
+     * value.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + int getDataPointsCount(); + /** + * + * + *
+     * Each data point in the chart is represented as a name-value pair
+     * with the name being the x-axis label, and the value being the y-axis
+     * value.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPointOrBuilder> + getDataPointsOrBuilderList(); + /** + * + * + *
+     * Each data point in the chart is represented as a name-value pair
+     * with the name being the x-axis label, and the value being the y-axis
+     * value.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPointOrBuilder + getDataPointsOrBuilder(int index); + } + /** + * + * + *
+   * Describes a collection of data points rendered as a Chart.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.ChartData} + */ + public static final class ChartData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportSummary.ChartData) + ChartDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChartData.newBuilder() to construct. + private ChartData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChartData() { + dataPoints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChartData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.class, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.Builder.class); + } + + public interface DataPointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The X-axis label for this data point.
+       * 
+ * + * string label = 1; + * + * @return The label. + */ + java.lang.String getLabel(); + /** + * + * + *
+       * The X-axis label for this data point.
+       * 
+ * + * string label = 1; + * + * @return The bytes for label. + */ + com.google.protobuf.ByteString getLabelBytes(); + + /** + * + * + *
+       * The Y-axis value for this data point.
+       * 
+ * + * double value = 2; + * + * @return The value. + */ + double getValue(); + } + /** + * + * + *
+     * Describes a single data point in the Chart.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} + */ + public static final class DataPoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint) + DataPointOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataPoint.newBuilder() to construct. + private DataPoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataPoint() { + label_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataPoint(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_DataPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_DataPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.class, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder + .class); + } + + public static final int LABEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object label_ = ""; + /** + * + * + *
+       * The X-axis label for this data point.
+       * 
+ * + * string label = 1; + * + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } + } + /** + * + * + *
+       * The X-axis label for this data point.
+       * 
+ * + * string label = 1; + * + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private double value_ = 0D; + /** + * + * + *
+       * The Y-axis value for this data point.
+       * 
+ * + * double value = 2; + * + * @return The value. + */ + @java.lang.Override + public double getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); + } + if (java.lang.Double.doubleToRawLongBits(value_) != 0) { + output.writeDouble(2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); + } + if (java.lang.Double.doubleToRawLongBits(value_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint other = + (com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint) obj; + + if (!getLabel().equals(other.getLabel())) return false; + if (java.lang.Double.doubleToLongBits(getValue()) + != java.lang.Double.doubleToLongBits(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getValue())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Describes a single data point in the Chart.
+       * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint) + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_DataPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_DataPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.class, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + label_ = ""; + value_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_DataPoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint build() { + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + buildPartial() { + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint result = + new com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.label_ = label_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + .getDefaultInstance()) return this; + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getValue() != 0D) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + label_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: + { + value_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object label_ = ""; + /** + * + * + *
+         * The X-axis label for this data point.
+         * 
+ * + * string label = 1; + * + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The X-axis label for this data point.
+         * 
+ * + * string label = 1; + * + * @return The bytes for label. + */ + public com.google.protobuf.ByteString getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The X-axis label for this data point.
+         * 
+ * + * string label = 1; + * + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + label_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The X-axis label for this data point.
+         * 
+ * + * string label = 1; + * + * @return This builder for chaining. + */ + public Builder clearLabel() { + label_ = getDefaultInstance().getLabel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The X-axis label for this data point.
+         * 
+ * + * string label = 1; + * + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + label_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private double value_; + /** + * + * + *
+         * The Y-axis value for this data point.
+         * 
+ * + * double value = 2; + * + * @return The value. + */ + @java.lang.Override + public double getValue() { + return value_; + } + /** + * + * + *
+         * The Y-axis value for this data point.
+         * 
+ * + * double value = 2; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(double value) { + + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * The Y-axis value for this data point.
+         * 
+ * + * double value = 2; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint) + private static final com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint(); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataPoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DATA_POINTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + dataPoints_; + /** + * + * + *
+     * Each data point in the chart is represented as a name-value pair
+     * with the name being the x-axis label, and the value being the y-axis
+     * value.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + @java.lang.Override + public java.util.List + getDataPointsList() { + return dataPoints_; + } + /** + * + * + *
+     * Each data point in the chart is represented as a name-value pair
+     * with the name being the x-axis label, and the value being the y-axis
+     * value.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPointOrBuilder> + getDataPointsOrBuilderList() { + return dataPoints_; + } + /** + * + * + *
+     * Each data point in the chart is represented as a name-value pair
+     * with the name being the x-axis label, and the value being the y-axis
+     * value.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + @java.lang.Override + public int getDataPointsCount() { + return dataPoints_.size(); + } + /** + * + * + *
+     * Each data point in the chart is represented as a name-value pair
+     * with the name being the x-axis label, and the value being the y-axis
+     * value.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint getDataPoints( + int index) { + return dataPoints_.get(index); + } + /** + * + * + *
+     * Each data point in the chart is represented as a name-value pair
+     * with the name being the x-axis label, and the value being the y-axis
+     * value.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPointOrBuilder + getDataPointsOrBuilder(int index) { + return dataPoints_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dataPoints_.size(); i++) { + output.writeMessage(1, dataPoints_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataPoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataPoints_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ReportSummary.ChartData)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData other = + (com.google.cloud.migrationcenter.v1.ReportSummary.ChartData) obj; + + if (!getDataPointsList().equals(other.getDataPointsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataPointsCount() > 0) { + hash = (37 * hash) + DATA_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getDataPointsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Describes a collection of data points rendered as a Chart.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.ChartData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportSummary.ChartData) + com.google.cloud.migrationcenter.v1.ReportSummary.ChartDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.class, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataPointsBuilder_ == null) { + dataPoints_ = java.util.Collections.emptyList(); + } else { + dataPoints_ = null; + dataPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ChartData_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData build() { + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData buildPartial() { + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData result = + new com.google.cloud.migrationcenter.v1.ReportSummary.ChartData(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData result) { + if (dataPointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataPoints_ = java.util.Collections.unmodifiableList(dataPoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataPoints_ = dataPoints_; + } else { + result.dataPoints_ = dataPointsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ReportSummary.ChartData) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ReportSummary.ChartData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ReportSummary.ChartData other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.getDefaultInstance()) + return this; + if (dataPointsBuilder_ == null) { + if (!other.dataPoints_.isEmpty()) { + if (dataPoints_.isEmpty()) { + dataPoints_ = other.dataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataPointsIsMutable(); + dataPoints_.addAll(other.dataPoints_); + } + onChanged(); + } + } else { + if (!other.dataPoints_.isEmpty()) { + if (dataPointsBuilder_.isEmpty()) { + dataPointsBuilder_.dispose(); + dataPointsBuilder_ = null; + dataPoints_ = other.dataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + dataPointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataPointsFieldBuilder() + : null; + } else { + dataPointsBuilder_.addAllMessages(other.dataPoints_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + .parser(), + extensionRegistry); + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(m); + } else { + dataPointsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + dataPoints_ = java.util.Collections.emptyList(); + + private void ensureDataPointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataPoints_ = + new java.util.ArrayList< + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint>( + dataPoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPointOrBuilder> + dataPointsBuilder_; + + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public java.util.List + getDataPointsList() { + if (dataPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataPoints_); + } else { + return dataPointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public int getDataPointsCount() { + if (dataPointsBuilder_ == null) { + return dataPoints_.size(); + } else { + return dataPointsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint getDataPoints( + int index) { + if (dataPointsBuilder_ == null) { + return dataPoints_.get(index); + } else { + return dataPointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public Builder setDataPoints( + int index, com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.set(index, value); + onChanged(); + } else { + dataPointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public Builder setDataPoints( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder + builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public Builder addDataPoints( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.add(value); + onChanged(); + } else { + dataPointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public Builder addDataPoints( + int index, com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.add(index, value); + onChanged(); + } else { + dataPointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public Builder addDataPoints( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder + builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public Builder addDataPoints( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder + builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public Builder addAllDataPoints( + java.lang.Iterable< + ? extends com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint> + values) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataPoints_); + onChanged(); + } else { + dataPointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public Builder clearDataPoints() { + if (dataPointsBuilder_ == null) { + dataPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataPointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public Builder removeDataPoints(int index) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.remove(index); + onChanged(); + } else { + dataPointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder + getDataPointsBuilder(int index) { + return getDataPointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPointOrBuilder + getDataPointsOrBuilder(int index) { + if (dataPointsBuilder_ == null) { + return dataPoints_.get(index); + } else { + return dataPointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPointOrBuilder> + getDataPointsOrBuilderList() { + if (dataPointsBuilder_ != null) { + return dataPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataPoints_); + } + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder + addDataPointsBuilder() { + return getDataPointsFieldBuilder() + .addBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + .getDefaultInstance()); + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder + addDataPointsBuilder(int index) { + return getDataPointsFieldBuilder() + .addBuilder( + index, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + .getDefaultInstance()); + } + /** + * + * + *
+       * Each data point in the chart is represented as a name-value pair
+       * with the name being the x-axis label, and the value being the y-axis
+       * value.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * + */ + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder> + getDataPointsBuilderList() { + return getDataPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPointOrBuilder> + getDataPointsFieldBuilder() { + if (dataPointsBuilder_ == null) { + dataPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPointOrBuilder>( + dataPoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dataPoints_ = null; + } + return dataPointsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportSummary.ChartData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportSummary.ChartData) + private static final com.google.cloud.migrationcenter.v1.ReportSummary.ChartData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ReportSummary.ChartData(); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ChartData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChartData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UtilizationChartDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Aggregate value which falls into the "Used" bucket.
+     * 
+ * + * int64 used = 1; + * + * @return The used. + */ + long getUsed(); + + /** + * + * + *
+     * Aggregate value which falls into the "Free" bucket.
+     * 
+ * + * int64 free = 2; + * + * @return The free. + */ + long getFree(); + } + /** + * + * + *
+   * Utilization Chart is a specific type of visualization which displays
+   * a metric classified into "Used" and "Free" buckets.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} + */ + public static final class UtilizationChartData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData) + UtilizationChartDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UtilizationChartData.newBuilder() to construct. + private UtilizationChartData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UtilizationChartData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UtilizationChartData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_UtilizationChartData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_UtilizationChartData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.class, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder.class); + } + + public static final int USED_FIELD_NUMBER = 1; + private long used_ = 0L; + /** + * + * + *
+     * Aggregate value which falls into the "Used" bucket.
+     * 
+ * + * int64 used = 1; + * + * @return The used. + */ + @java.lang.Override + public long getUsed() { + return used_; + } + + public static final int FREE_FIELD_NUMBER = 2; + private long free_ = 0L; + /** + * + * + *
+     * Aggregate value which falls into the "Free" bucket.
+     * 
+ * + * int64 free = 2; + * + * @return The free. + */ + @java.lang.Override + public long getFree() { + return free_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (used_ != 0L) { + output.writeInt64(1, used_); + } + if (free_ != 0L) { + output.writeInt64(2, free_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (used_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, used_); + } + if (free_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, free_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData other = + (com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData) obj; + + if (getUsed() != other.getUsed()) return false; + if (getFree() != other.getFree()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUsed()); + hash = (37 * hash) + FREE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFree()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Utilization Chart is a specific type of visualization which displays
+     * a metric classified into "Used" and "Free" buckets.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData) + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_UtilizationChartData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_UtilizationChartData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.class, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + used_ = 0L; + free_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_UtilizationChartData_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData build() { + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData buildPartial() { + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData result = + new com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.used_ = used_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.free_ = free_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance()) return this; + if (other.getUsed() != 0L) { + setUsed(other.getUsed()); + } + if (other.getFree() != 0L) { + setFree(other.getFree()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + used_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + free_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long used_; + /** + * + * + *
+       * Aggregate value which falls into the "Used" bucket.
+       * 
+ * + * int64 used = 1; + * + * @return The used. + */ + @java.lang.Override + public long getUsed() { + return used_; + } + /** + * + * + *
+       * Aggregate value which falls into the "Used" bucket.
+       * 
+ * + * int64 used = 1; + * + * @param value The used to set. + * @return This builder for chaining. + */ + public Builder setUsed(long value) { + + used_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Aggregate value which falls into the "Used" bucket.
+       * 
+ * + * int64 used = 1; + * + * @return This builder for chaining. + */ + public Builder clearUsed() { + bitField0_ = (bitField0_ & ~0x00000001); + used_ = 0L; + onChanged(); + return this; + } + + private long free_; + /** + * + * + *
+       * Aggregate value which falls into the "Free" bucket.
+       * 
+ * + * int64 free = 2; + * + * @return The free. + */ + @java.lang.Override + public long getFree() { + return free_; + } + /** + * + * + *
+       * Aggregate value which falls into the "Free" bucket.
+       * 
+ * + * int64 free = 2; + * + * @param value The free to set. + * @return This builder for chaining. + */ + public Builder setFree(long value) { + + free_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Aggregate value which falls into the "Free" bucket.
+       * 
+ * + * int64 free = 2; + * + * @return This builder for chaining. + */ + public Builder clearFree() { + bitField0_ = (bitField0_ & ~0x00000002); + free_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData) + private static final com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData(); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UtilizationChartData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface HistogramChartDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + java.util.List + getBucketsList(); + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket getBuckets( + int index); + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + int getBucketsCount(); + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .BucketOrBuilder> + getBucketsOrBuilderList(); + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.BucketOrBuilder + getBucketsOrBuilder(int index); + } + /** + * + * + *
+   * A Histogram Chart shows a distribution of values into buckets, showing
+   * a count of values which fall into a bucket.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} + */ + public static final class HistogramChartData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData) + HistogramChartDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use HistogramChartData.newBuilder() to construct. + private HistogramChartData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HistogramChartData() { + buckets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HistogramChartData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.class, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder.class); + } + + public interface BucketOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Lower bound - inclusive.
+       * 
+ * + * int64 lower_bound = 1; + * + * @return The lowerBound. + */ + long getLowerBound(); + + /** + * + * + *
+       * Upper bound - exclusive.
+       * 
+ * + * int64 upper_bound = 2; + * + * @return The upperBound. + */ + long getUpperBound(); + + /** + * + * + *
+       * Count of items in the bucket.
+       * 
+ * + * int64 count = 3; + * + * @return The count. + */ + long getCount(); + } + /** + * + * + *
+     * A histogram bucket with a lower and upper bound, and a count of items
+     * with a field value between those bounds.
+     * The lower bound is inclusive and the upper bound is exclusive.
+     * Lower bound may be -infinity and upper bound may be infinity.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} + */ + public static final class Bucket extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket) + BucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use Bucket.newBuilder() to construct. + private Bucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Bucket() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Bucket(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_Bucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_Bucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.class, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.Builder + .class); + } + + public static final int LOWER_BOUND_FIELD_NUMBER = 1; + private long lowerBound_ = 0L; + /** + * + * + *
+       * Lower bound - inclusive.
+       * 
+ * + * int64 lower_bound = 1; + * + * @return The lowerBound. + */ + @java.lang.Override + public long getLowerBound() { + return lowerBound_; + } + + public static final int UPPER_BOUND_FIELD_NUMBER = 2; + private long upperBound_ = 0L; + /** + * + * + *
+       * Upper bound - exclusive.
+       * 
+ * + * int64 upper_bound = 2; + * + * @return The upperBound. + */ + @java.lang.Override + public long getUpperBound() { + return upperBound_; + } + + public static final int COUNT_FIELD_NUMBER = 3; + private long count_ = 0L; + /** + * + * + *
+       * Count of items in the bucket.
+       * 
+ * + * int64 count = 3; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (lowerBound_ != 0L) { + output.writeInt64(1, lowerBound_); + } + if (upperBound_ != 0L) { + output.writeInt64(2, upperBound_); + } + if (count_ != 0L) { + output.writeInt64(3, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lowerBound_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, lowerBound_); + } + if (upperBound_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, upperBound_); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, count_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket other = + (com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket) obj; + + if (getLowerBound() != other.getLowerBound()) return false; + if (getUpperBound() != other.getUpperBound()) return false; + if (getCount() != other.getCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLowerBound()); + hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUpperBound()); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A histogram bucket with a lower and upper bound, and a count of items
+       * with a field value between those bounds.
+       * The lower bound is inclusive and the upper bound is exclusive.
+       * Lower bound may be -infinity and upper bound may be infinity.
+       * 
+ * + * Protobuf type {@code + * google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket) + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.BucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_Bucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_Bucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.class, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + .Builder.class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lowerBound_ = 0L; + upperBound_ = 0L; + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_Bucket_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket build() { + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + buildPartial() { + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket result = + new com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lowerBound_ = lowerBound_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.upperBound_ = upperBound_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.count_ = count_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + .getDefaultInstance()) return this; + if (other.getLowerBound() != 0L) { + setLowerBound(other.getLowerBound()); + } + if (other.getUpperBound() != 0L) { + setUpperBound(other.getUpperBound()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + lowerBound_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + upperBound_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long lowerBound_; + /** + * + * + *
+         * Lower bound - inclusive.
+         * 
+ * + * int64 lower_bound = 1; + * + * @return The lowerBound. + */ + @java.lang.Override + public long getLowerBound() { + return lowerBound_; + } + /** + * + * + *
+         * Lower bound - inclusive.
+         * 
+ * + * int64 lower_bound = 1; + * + * @param value The lowerBound to set. + * @return This builder for chaining. + */ + public Builder setLowerBound(long value) { + + lowerBound_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Lower bound - inclusive.
+         * 
+ * + * int64 lower_bound = 1; + * + * @return This builder for chaining. + */ + public Builder clearLowerBound() { + bitField0_ = (bitField0_ & ~0x00000001); + lowerBound_ = 0L; + onChanged(); + return this; + } + + private long upperBound_; + /** + * + * + *
+         * Upper bound - exclusive.
+         * 
+ * + * int64 upper_bound = 2; + * + * @return The upperBound. + */ + @java.lang.Override + public long getUpperBound() { + return upperBound_; + } + /** + * + * + *
+         * Upper bound - exclusive.
+         * 
+ * + * int64 upper_bound = 2; + * + * @param value The upperBound to set. + * @return This builder for chaining. + */ + public Builder setUpperBound(long value) { + + upperBound_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Upper bound - exclusive.
+         * 
+ * + * int64 upper_bound = 2; + * + * @return This builder for chaining. + */ + public Builder clearUpperBound() { + bitField0_ = (bitField0_ & ~0x00000002); + upperBound_ = 0L; + onChanged(); + return this; + } + + private long count_; + /** + * + * + *
+         * Count of items in the bucket.
+         * 
+ * + * int64 count = 3; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * + * + *
+         * Count of items in the bucket.
+         * 
+ * + * int64 count = 3; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Count of items in the bucket.
+         * 
+ * + * int64 count = 3; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000004); + count_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket) + private static final com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .Bucket + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket(); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Bucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BUCKETS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket> + buckets_; + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket> + getBucketsList() { + return buckets_; + } + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .BucketOrBuilder> + getBucketsOrBuilderList() { + return buckets_; + } + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + @java.lang.Override + public int getBucketsCount() { + return buckets_.size(); + } + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket getBuckets( + int index) { + return buckets_.get(index); + } + /** + * + * + *
+     * Buckets in the histogram.
+     * There will be `n+1` buckets matching `n` lower bounds in the request.
+     * The first bucket will be from -infinity to the first bound.
+     * Subsequent buckets will be between one bound and the next.
+     * The final bucket will be from the final bound to infinity.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.BucketOrBuilder + getBucketsOrBuilder(int index) { + return buckets_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < buckets_.size(); i++) { + output.writeMessage(1, buckets_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < buckets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, buckets_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData other = + (com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData) obj; + + if (!getBucketsList().equals(other.getBucketsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBucketsCount() > 0) { + hash = (37 * hash) + BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getBucketsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A Histogram Chart shows a distribution of values into buckets, showing
+     * a count of values which fall into a bucket.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData) + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.class, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder.class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + } else { + buckets_ = null; + bucketsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_HistogramChartData_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData build() { + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData buildPartial() { + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData result = + new com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData result) { + if (bucketsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + buckets_ = java.util.Collections.unmodifiableList(buckets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.buckets_ = buckets_; + } else { + result.buckets_ = bucketsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance()) return this; + if (bucketsBuilder_ == null) { + if (!other.buckets_.isEmpty()) { + if (buckets_.isEmpty()) { + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketsIsMutable(); + buckets_.addAll(other.buckets_); + } + onChanged(); + } + } else { + if (!other.buckets_.isEmpty()) { + if (bucketsBuilder_.isEmpty()) { + bucketsBuilder_.dispose(); + bucketsBuilder_ = null; + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000001); + bucketsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBucketsFieldBuilder() + : null; + } else { + bucketsBuilder_.addAllMessages(other.buckets_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .Bucket.parser(), + extensionRegistry); + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(m); + } else { + bucketsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket> + buckets_ = java.util.Collections.emptyList(); + + private void ensureBucketsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + buckets_ = + new java.util.ArrayList< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket>( + buckets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.BucketOrBuilder> + bucketsBuilder_; + + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket> + getBucketsList() { + if (bucketsBuilder_ == null) { + return java.util.Collections.unmodifiableList(buckets_); + } else { + return bucketsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public int getBucketsCount() { + if (bucketsBuilder_ == null) { + return buckets_.size(); + } else { + return bucketsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket getBuckets( + int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public Builder setBuckets( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.set(index, value); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public Builder setBuckets( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public Builder addBuckets( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(value); + onChanged(); + } else { + bucketsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public Builder addBuckets( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(index, value); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public Builder addBuckets( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public Builder addBuckets( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public Builder addAllBuckets( + java.lang.Iterable< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket> + values) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, buckets_); + onChanged(); + } else { + bucketsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public Builder clearBuckets() { + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bucketsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public Builder removeBuckets(int index) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.remove(index); + onChanged(); + } else { + bucketsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.Builder + getBucketsBuilder(int index) { + return getBucketsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.BucketOrBuilder + getBucketsOrBuilder(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .BucketOrBuilder> + getBucketsOrBuilderList() { + if (bucketsBuilder_ != null) { + return bucketsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(buckets_); + } + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.Builder + addBucketsBuilder() { + return getBucketsFieldBuilder() + .addBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + .getDefaultInstance()); + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.Builder + addBucketsBuilder(int index) { + return getBucketsFieldBuilder() + .addBuilder( + index, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + .getDefaultInstance()); + } + /** + * + * + *
+       * Buckets in the histogram.
+       * There will be `n+1` buckets matching `n` lower bounds in the request.
+       * The first bucket will be from -infinity to the first bound.
+       * Subsequent buckets will be between one bound and the next.
+       * The final bucket will be from the final bound to infinity.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * + */ + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.Builder> + getBucketsBuilderList() { + return getBucketsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.BucketOrBuilder> + getBucketsFieldBuilder() { + if (bucketsBuilder_ == null) { + bucketsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + .Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .BucketOrBuilder>( + buckets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + buckets_ = null; + } + return bucketsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData) + private static final com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData(); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HistogramChartData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AssetAggregateStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Sum of the memory in bytes of all the assets in this collection.
+     * 
+ * + * int64 total_memory_bytes = 1; + * + * @return The totalMemoryBytes. + */ + long getTotalMemoryBytes(); + + /** + * + * + *
+     * Sum of persistent storage in bytes of all the assets in this collection.
+     * 
+ * + * int64 total_storage_bytes = 2; + * + * @return The totalStorageBytes. + */ + long getTotalStorageBytes(); + + /** + * + * + *
+     * Sum of the CPU core count of all the assets in this collection.
+     * 
+ * + * int64 total_cores = 3; + * + * @return The totalCores. + */ + long getTotalCores(); + + /** + * + * + *
+     * Count of the number of unique assets in this collection.
+     * 
+ * + * int64 total_assets = 4; + * + * @return The totalAssets. + */ + long getTotalAssets(); + + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + * + * @return Whether the memoryUtilizationChart field is set. + */ + boolean hasMemoryUtilizationChart(); + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + * + * @return The memoryUtilizationChart. + */ + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + getMemoryUtilizationChart(); + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder + getMemoryUtilizationChartOrBuilder(); + + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + * + * @return Whether the storageUtilizationChart field is set. + */ + boolean hasStorageUtilizationChart(); + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + * + * @return The storageUtilizationChart. + */ + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + getStorageUtilizationChart(); + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder + getStorageUtilizationChartOrBuilder(); + + /** + * + * + *
+     * Count of assets grouped by Operating System families.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + * + * @return Whether the operatingSystem field is set. + */ + boolean hasOperatingSystem(); + /** + * + * + *
+     * Count of assets grouped by Operating System families.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + * + * @return The operatingSystem. + */ + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData getOperatingSystem(); + /** + * + * + *
+     * Count of assets grouped by Operating System families.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + */ + com.google.cloud.migrationcenter.v1.ReportSummary.ChartDataOrBuilder + getOperatingSystemOrBuilder(); + + /** + * + * + *
+     * Histogram showing a distribution of CPU core counts.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + * + * @return Whether the coreCountHistogram field is set. + */ + boolean hasCoreCountHistogram(); + /** + * + * + *
+     * Histogram showing a distribution of CPU core counts.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + * + * @return The coreCountHistogram. + */ + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData getCoreCountHistogram(); + /** + * + * + *
+     * Histogram showing a distribution of CPU core counts.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder + getCoreCountHistogramOrBuilder(); + + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + * + * @return Whether the memoryBytesHistogram field is set. + */ + boolean hasMemoryBytesHistogram(); + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + * + * @return The memoryBytesHistogram. + */ + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData getMemoryBytesHistogram(); + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder + getMemoryBytesHistogramOrBuilder(); + + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + * + * @return Whether the storageBytesHistogram field is set. + */ + boolean hasStorageBytesHistogram(); + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + * + * @return The storageBytesHistogram. + */ + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData getStorageBytesHistogram(); + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder + getStorageBytesHistogramOrBuilder(); + } + /** + * + * + *
+   * Aggregate statistics for a collection of assets.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} + */ + public static final class AssetAggregateStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats) + AssetAggregateStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssetAggregateStats.newBuilder() to construct. + private AssetAggregateStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssetAggregateStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssetAggregateStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_AssetAggregateStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_AssetAggregateStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.class, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder.class); + } + + public static final int TOTAL_MEMORY_BYTES_FIELD_NUMBER = 1; + private long totalMemoryBytes_ = 0L; + /** + * + * + *
+     * Sum of the memory in bytes of all the assets in this collection.
+     * 
+ * + * int64 total_memory_bytes = 1; + * + * @return The totalMemoryBytes. + */ + @java.lang.Override + public long getTotalMemoryBytes() { + return totalMemoryBytes_; + } + + public static final int TOTAL_STORAGE_BYTES_FIELD_NUMBER = 2; + private long totalStorageBytes_ = 0L; + /** + * + * + *
+     * Sum of persistent storage in bytes of all the assets in this collection.
+     * 
+ * + * int64 total_storage_bytes = 2; + * + * @return The totalStorageBytes. + */ + @java.lang.Override + public long getTotalStorageBytes() { + return totalStorageBytes_; + } + + public static final int TOTAL_CORES_FIELD_NUMBER = 3; + private long totalCores_ = 0L; + /** + * + * + *
+     * Sum of the CPU core count of all the assets in this collection.
+     * 
+ * + * int64 total_cores = 3; + * + * @return The totalCores. + */ + @java.lang.Override + public long getTotalCores() { + return totalCores_; + } + + public static final int TOTAL_ASSETS_FIELD_NUMBER = 4; + private long totalAssets_ = 0L; + /** + * + * + *
+     * Count of the number of unique assets in this collection.
+     * 
+ * + * int64 total_assets = 4; + * + * @return The totalAssets. + */ + @java.lang.Override + public long getTotalAssets() { + return totalAssets_; + } + + public static final int MEMORY_UTILIZATION_CHART_FIELD_NUMBER = 5; + private com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + memoryUtilizationChart_; + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + * + * @return Whether the memoryUtilizationChart field is set. + */ + @java.lang.Override + public boolean hasMemoryUtilizationChart() { + return memoryUtilizationChart_ != null; + } + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + * + * @return The memoryUtilizationChart. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + getMemoryUtilizationChart() { + return memoryUtilizationChart_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance() + : memoryUtilizationChart_; + } + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder + getMemoryUtilizationChartOrBuilder() { + return memoryUtilizationChart_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance() + : memoryUtilizationChart_; + } + + public static final int STORAGE_UTILIZATION_CHART_FIELD_NUMBER = 6; + private com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + storageUtilizationChart_; + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + * + * @return Whether the storageUtilizationChart field is set. + */ + @java.lang.Override + public boolean hasStorageUtilizationChart() { + return storageUtilizationChart_ != null; + } + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + * + * @return The storageUtilizationChart. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + getStorageUtilizationChart() { + return storageUtilizationChart_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance() + : storageUtilizationChart_; + } + /** + * + * + *
+     * Total memory split into Used/Free buckets.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder + getStorageUtilizationChartOrBuilder() { + return storageUtilizationChart_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance() + : storageUtilizationChart_; + } + + public static final int OPERATING_SYSTEM_FIELD_NUMBER = 7; + private com.google.cloud.migrationcenter.v1.ReportSummary.ChartData operatingSystem_; + /** + * + * + *
+     * Count of assets grouped by Operating System families.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + * + * @return Whether the operatingSystem field is set. + */ + @java.lang.Override + public boolean hasOperatingSystem() { + return operatingSystem_ != null; + } + /** + * + * + *
+     * Count of assets grouped by Operating System families.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + * + * @return The operatingSystem. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData getOperatingSystem() { + return operatingSystem_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.getDefaultInstance() + : operatingSystem_; + } + /** + * + * + *
+     * Count of assets grouped by Operating System families.
+     * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartDataOrBuilder + getOperatingSystemOrBuilder() { + return operatingSystem_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.getDefaultInstance() + : operatingSystem_; + } + + public static final int CORE_COUNT_HISTOGRAM_FIELD_NUMBER = 8; + private com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + coreCountHistogram_; + /** + * + * + *
+     * Histogram showing a distribution of CPU core counts.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + * + * @return Whether the coreCountHistogram field is set. + */ + @java.lang.Override + public boolean hasCoreCountHistogram() { + return coreCountHistogram_ != null; + } + /** + * + * + *
+     * Histogram showing a distribution of CPU core counts.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + * + * @return The coreCountHistogram. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + getCoreCountHistogram() { + return coreCountHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : coreCountHistogram_; + } + /** + * + * + *
+     * Histogram showing a distribution of CPU core counts.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder + getCoreCountHistogramOrBuilder() { + return coreCountHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : coreCountHistogram_; + } + + public static final int MEMORY_BYTES_HISTOGRAM_FIELD_NUMBER = 9; + private com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + memoryBytesHistogram_; + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + * + * @return Whether the memoryBytesHistogram field is set. + */ + @java.lang.Override + public boolean hasMemoryBytesHistogram() { + return memoryBytesHistogram_ != null; + } + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + * + * @return The memoryBytesHistogram. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + getMemoryBytesHistogram() { + return memoryBytesHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : memoryBytesHistogram_; + } + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder + getMemoryBytesHistogramOrBuilder() { + return memoryBytesHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : memoryBytesHistogram_; + } + + public static final int STORAGE_BYTES_HISTOGRAM_FIELD_NUMBER = 10; + private com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + storageBytesHistogram_; + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + * + * @return Whether the storageBytesHistogram field is set. + */ + @java.lang.Override + public boolean hasStorageBytesHistogram() { + return storageBytesHistogram_ != null; + } + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + * + * @return The storageBytesHistogram. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + getStorageBytesHistogram() { + return storageBytesHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : storageBytesHistogram_; + } + /** + * + * + *
+     * Histogram showing a distribution of memory sizes.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder + getStorageBytesHistogramOrBuilder() { + return storageBytesHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : storageBytesHistogram_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (totalMemoryBytes_ != 0L) { + output.writeInt64(1, totalMemoryBytes_); + } + if (totalStorageBytes_ != 0L) { + output.writeInt64(2, totalStorageBytes_); + } + if (totalCores_ != 0L) { + output.writeInt64(3, totalCores_); + } + if (totalAssets_ != 0L) { + output.writeInt64(4, totalAssets_); + } + if (memoryUtilizationChart_ != null) { + output.writeMessage(5, getMemoryUtilizationChart()); + } + if (storageUtilizationChart_ != null) { + output.writeMessage(6, getStorageUtilizationChart()); + } + if (operatingSystem_ != null) { + output.writeMessage(7, getOperatingSystem()); + } + if (coreCountHistogram_ != null) { + output.writeMessage(8, getCoreCountHistogram()); + } + if (memoryBytesHistogram_ != null) { + output.writeMessage(9, getMemoryBytesHistogram()); + } + if (storageBytesHistogram_ != null) { + output.writeMessage(10, getStorageBytesHistogram()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (totalMemoryBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, totalMemoryBytes_); + } + if (totalStorageBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, totalStorageBytes_); + } + if (totalCores_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, totalCores_); + } + if (totalAssets_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, totalAssets_); + } + if (memoryUtilizationChart_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getMemoryUtilizationChart()); + } + if (storageUtilizationChart_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getStorageUtilizationChart()); + } + if (operatingSystem_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getOperatingSystem()); + } + if (coreCountHistogram_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCoreCountHistogram()); + } + if (memoryBytesHistogram_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMemoryBytesHistogram()); + } + if (storageBytesHistogram_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, getStorageBytesHistogram()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats other = + (com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats) obj; + + if (getTotalMemoryBytes() != other.getTotalMemoryBytes()) return false; + if (getTotalStorageBytes() != other.getTotalStorageBytes()) return false; + if (getTotalCores() != other.getTotalCores()) return false; + if (getTotalAssets() != other.getTotalAssets()) return false; + if (hasMemoryUtilizationChart() != other.hasMemoryUtilizationChart()) return false; + if (hasMemoryUtilizationChart()) { + if (!getMemoryUtilizationChart().equals(other.getMemoryUtilizationChart())) return false; + } + if (hasStorageUtilizationChart() != other.hasStorageUtilizationChart()) return false; + if (hasStorageUtilizationChart()) { + if (!getStorageUtilizationChart().equals(other.getStorageUtilizationChart())) return false; + } + if (hasOperatingSystem() != other.hasOperatingSystem()) return false; + if (hasOperatingSystem()) { + if (!getOperatingSystem().equals(other.getOperatingSystem())) return false; + } + if (hasCoreCountHistogram() != other.hasCoreCountHistogram()) return false; + if (hasCoreCountHistogram()) { + if (!getCoreCountHistogram().equals(other.getCoreCountHistogram())) return false; + } + if (hasMemoryBytesHistogram() != other.hasMemoryBytesHistogram()) return false; + if (hasMemoryBytesHistogram()) { + if (!getMemoryBytesHistogram().equals(other.getMemoryBytesHistogram())) return false; + } + if (hasStorageBytesHistogram() != other.hasStorageBytesHistogram()) return false; + if (hasStorageBytesHistogram()) { + if (!getStorageBytesHistogram().equals(other.getStorageBytesHistogram())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOTAL_MEMORY_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalMemoryBytes()); + hash = (37 * hash) + TOTAL_STORAGE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalStorageBytes()); + hash = (37 * hash) + TOTAL_CORES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalCores()); + hash = (37 * hash) + TOTAL_ASSETS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalAssets()); + if (hasMemoryUtilizationChart()) { + hash = (37 * hash) + MEMORY_UTILIZATION_CHART_FIELD_NUMBER; + hash = (53 * hash) + getMemoryUtilizationChart().hashCode(); + } + if (hasStorageUtilizationChart()) { + hash = (37 * hash) + STORAGE_UTILIZATION_CHART_FIELD_NUMBER; + hash = (53 * hash) + getStorageUtilizationChart().hashCode(); + } + if (hasOperatingSystem()) { + hash = (37 * hash) + OPERATING_SYSTEM_FIELD_NUMBER; + hash = (53 * hash) + getOperatingSystem().hashCode(); + } + if (hasCoreCountHistogram()) { + hash = (37 * hash) + CORE_COUNT_HISTOGRAM_FIELD_NUMBER; + hash = (53 * hash) + getCoreCountHistogram().hashCode(); + } + if (hasMemoryBytesHistogram()) { + hash = (37 * hash) + MEMORY_BYTES_HISTOGRAM_FIELD_NUMBER; + hash = (53 * hash) + getMemoryBytesHistogram().hashCode(); + } + if (hasStorageBytesHistogram()) { + hash = (37 * hash) + STORAGE_BYTES_HISTOGRAM_FIELD_NUMBER; + hash = (53 * hash) + getStorageBytesHistogram().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Aggregate statistics for a collection of assets.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats) + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_AssetAggregateStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_AssetAggregateStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.class, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + totalMemoryBytes_ = 0L; + totalStorageBytes_ = 0L; + totalCores_ = 0L; + totalAssets_ = 0L; + memoryUtilizationChart_ = null; + if (memoryUtilizationChartBuilder_ != null) { + memoryUtilizationChartBuilder_.dispose(); + memoryUtilizationChartBuilder_ = null; + } + storageUtilizationChart_ = null; + if (storageUtilizationChartBuilder_ != null) { + storageUtilizationChartBuilder_.dispose(); + storageUtilizationChartBuilder_ = null; + } + operatingSystem_ = null; + if (operatingSystemBuilder_ != null) { + operatingSystemBuilder_.dispose(); + operatingSystemBuilder_ = null; + } + coreCountHistogram_ = null; + if (coreCountHistogramBuilder_ != null) { + coreCountHistogramBuilder_.dispose(); + coreCountHistogramBuilder_ = null; + } + memoryBytesHistogram_ = null; + if (memoryBytesHistogramBuilder_ != null) { + memoryBytesHistogramBuilder_.dispose(); + memoryBytesHistogramBuilder_ = null; + } + storageBytesHistogram_ = null; + if (storageBytesHistogramBuilder_ != null) { + storageBytesHistogramBuilder_.dispose(); + storageBytesHistogramBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_AssetAggregateStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats build() { + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats buildPartial() { + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats result = + new com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.totalMemoryBytes_ = totalMemoryBytes_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalStorageBytes_ = totalStorageBytes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalCores_ = totalCores_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.totalAssets_ = totalAssets_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.memoryUtilizationChart_ = + memoryUtilizationChartBuilder_ == null + ? memoryUtilizationChart_ + : memoryUtilizationChartBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.storageUtilizationChart_ = + storageUtilizationChartBuilder_ == null + ? storageUtilizationChart_ + : storageUtilizationChartBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.operatingSystem_ = + operatingSystemBuilder_ == null ? operatingSystem_ : operatingSystemBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.coreCountHistogram_ = + coreCountHistogramBuilder_ == null + ? coreCountHistogram_ + : coreCountHistogramBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.memoryBytesHistogram_ = + memoryBytesHistogramBuilder_ == null + ? memoryBytesHistogram_ + : memoryBytesHistogramBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.storageBytesHistogram_ = + storageBytesHistogramBuilder_ == null + ? storageBytesHistogram_ + : storageBytesHistogramBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + .getDefaultInstance()) return this; + if (other.getTotalMemoryBytes() != 0L) { + setTotalMemoryBytes(other.getTotalMemoryBytes()); + } + if (other.getTotalStorageBytes() != 0L) { + setTotalStorageBytes(other.getTotalStorageBytes()); + } + if (other.getTotalCores() != 0L) { + setTotalCores(other.getTotalCores()); + } + if (other.getTotalAssets() != 0L) { + setTotalAssets(other.getTotalAssets()); + } + if (other.hasMemoryUtilizationChart()) { + mergeMemoryUtilizationChart(other.getMemoryUtilizationChart()); + } + if (other.hasStorageUtilizationChart()) { + mergeStorageUtilizationChart(other.getStorageUtilizationChart()); + } + if (other.hasOperatingSystem()) { + mergeOperatingSystem(other.getOperatingSystem()); + } + if (other.hasCoreCountHistogram()) { + mergeCoreCountHistogram(other.getCoreCountHistogram()); + } + if (other.hasMemoryBytesHistogram()) { + mergeMemoryBytesHistogram(other.getMemoryBytesHistogram()); + } + if (other.hasStorageBytesHistogram()) { + mergeStorageBytesHistogram(other.getStorageBytesHistogram()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + totalMemoryBytes_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + totalStorageBytes_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + totalCores_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + totalAssets_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage( + getMemoryUtilizationChartFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getStorageUtilizationChartFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + getOperatingSystemFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage( + getCoreCountHistogramFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage( + getMemoryBytesHistogramFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage( + getStorageBytesHistogramFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long totalMemoryBytes_; + /** + * + * + *
+       * Sum of the memory in bytes of all the assets in this collection.
+       * 
+ * + * int64 total_memory_bytes = 1; + * + * @return The totalMemoryBytes. + */ + @java.lang.Override + public long getTotalMemoryBytes() { + return totalMemoryBytes_; + } + /** + * + * + *
+       * Sum of the memory in bytes of all the assets in this collection.
+       * 
+ * + * int64 total_memory_bytes = 1; + * + * @param value The totalMemoryBytes to set. + * @return This builder for chaining. + */ + public Builder setTotalMemoryBytes(long value) { + + totalMemoryBytes_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Sum of the memory in bytes of all the assets in this collection.
+       * 
+ * + * int64 total_memory_bytes = 1; + * + * @return This builder for chaining. + */ + public Builder clearTotalMemoryBytes() { + bitField0_ = (bitField0_ & ~0x00000001); + totalMemoryBytes_ = 0L; + onChanged(); + return this; + } + + private long totalStorageBytes_; + /** + * + * + *
+       * Sum of persistent storage in bytes of all the assets in this collection.
+       * 
+ * + * int64 total_storage_bytes = 2; + * + * @return The totalStorageBytes. + */ + @java.lang.Override + public long getTotalStorageBytes() { + return totalStorageBytes_; + } + /** + * + * + *
+       * Sum of persistent storage in bytes of all the assets in this collection.
+       * 
+ * + * int64 total_storage_bytes = 2; + * + * @param value The totalStorageBytes to set. + * @return This builder for chaining. + */ + public Builder setTotalStorageBytes(long value) { + + totalStorageBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Sum of persistent storage in bytes of all the assets in this collection.
+       * 
+ * + * int64 total_storage_bytes = 2; + * + * @return This builder for chaining. + */ + public Builder clearTotalStorageBytes() { + bitField0_ = (bitField0_ & ~0x00000002); + totalStorageBytes_ = 0L; + onChanged(); + return this; + } + + private long totalCores_; + /** + * + * + *
+       * Sum of the CPU core count of all the assets in this collection.
+       * 
+ * + * int64 total_cores = 3; + * + * @return The totalCores. + */ + @java.lang.Override + public long getTotalCores() { + return totalCores_; + } + /** + * + * + *
+       * Sum of the CPU core count of all the assets in this collection.
+       * 
+ * + * int64 total_cores = 3; + * + * @param value The totalCores to set. + * @return This builder for chaining. + */ + public Builder setTotalCores(long value) { + + totalCores_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Sum of the CPU core count of all the assets in this collection.
+       * 
+ * + * int64 total_cores = 3; + * + * @return This builder for chaining. + */ + public Builder clearTotalCores() { + bitField0_ = (bitField0_ & ~0x00000004); + totalCores_ = 0L; + onChanged(); + return this; + } + + private long totalAssets_; + /** + * + * + *
+       * Count of the number of unique assets in this collection.
+       * 
+ * + * int64 total_assets = 4; + * + * @return The totalAssets. + */ + @java.lang.Override + public long getTotalAssets() { + return totalAssets_; + } + /** + * + * + *
+       * Count of the number of unique assets in this collection.
+       * 
+ * + * int64 total_assets = 4; + * + * @param value The totalAssets to set. + * @return This builder for chaining. + */ + public Builder setTotalAssets(long value) { + + totalAssets_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Count of the number of unique assets in this collection.
+       * 
+ * + * int64 total_assets = 4; + * + * @return This builder for chaining. + */ + public Builder clearTotalAssets() { + bitField0_ = (bitField0_ & ~0x00000008); + totalAssets_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + memoryUtilizationChart_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder> + memoryUtilizationChartBuilder_; + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + * + * @return Whether the memoryUtilizationChart field is set. + */ + public boolean hasMemoryUtilizationChart() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + * + * @return The memoryUtilizationChart. + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + getMemoryUtilizationChart() { + if (memoryUtilizationChartBuilder_ == null) { + return memoryUtilizationChart_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance() + : memoryUtilizationChart_; + } else { + return memoryUtilizationChartBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + */ + public Builder setMemoryUtilizationChart( + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData value) { + if (memoryUtilizationChartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + memoryUtilizationChart_ = value; + } else { + memoryUtilizationChartBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + */ + public Builder setMemoryUtilizationChart( + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder + builderForValue) { + if (memoryUtilizationChartBuilder_ == null) { + memoryUtilizationChart_ = builderForValue.build(); + } else { + memoryUtilizationChartBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + */ + public Builder mergeMemoryUtilizationChart( + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData value) { + if (memoryUtilizationChartBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && memoryUtilizationChart_ != null + && memoryUtilizationChart_ + != com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance()) { + getMemoryUtilizationChartBuilder().mergeFrom(value); + } else { + memoryUtilizationChart_ = value; + } + } else { + memoryUtilizationChartBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + */ + public Builder clearMemoryUtilizationChart() { + bitField0_ = (bitField0_ & ~0x00000010); + memoryUtilizationChart_ = null; + if (memoryUtilizationChartBuilder_ != null) { + memoryUtilizationChartBuilder_.dispose(); + memoryUtilizationChartBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder + getMemoryUtilizationChartBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMemoryUtilizationChartFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder + getMemoryUtilizationChartOrBuilder() { + if (memoryUtilizationChartBuilder_ != null) { + return memoryUtilizationChartBuilder_.getMessageOrBuilder(); + } else { + return memoryUtilizationChart_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance() + : memoryUtilizationChart_; + } + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder> + getMemoryUtilizationChartFieldBuilder() { + if (memoryUtilizationChartBuilder_ == null) { + memoryUtilizationChartBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder>( + getMemoryUtilizationChart(), getParentForChildren(), isClean()); + memoryUtilizationChart_ = null; + } + return memoryUtilizationChartBuilder_; + } + + private com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + storageUtilizationChart_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder> + storageUtilizationChartBuilder_; + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + * + * @return Whether the storageUtilizationChart field is set. + */ + public boolean hasStorageUtilizationChart() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + * + * @return The storageUtilizationChart. + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + getStorageUtilizationChart() { + if (storageUtilizationChartBuilder_ == null) { + return storageUtilizationChart_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance() + : storageUtilizationChart_; + } else { + return storageUtilizationChartBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + */ + public Builder setStorageUtilizationChart( + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData value) { + if (storageUtilizationChartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storageUtilizationChart_ = value; + } else { + storageUtilizationChartBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + */ + public Builder setStorageUtilizationChart( + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder + builderForValue) { + if (storageUtilizationChartBuilder_ == null) { + storageUtilizationChart_ = builderForValue.build(); + } else { + storageUtilizationChartBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + */ + public Builder mergeStorageUtilizationChart( + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData value) { + if (storageUtilizationChartBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && storageUtilizationChart_ != null + && storageUtilizationChart_ + != com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance()) { + getStorageUtilizationChartBuilder().mergeFrom(value); + } else { + storageUtilizationChart_ = value; + } + } else { + storageUtilizationChartBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + */ + public Builder clearStorageUtilizationChart() { + bitField0_ = (bitField0_ & ~0x00000020); + storageUtilizationChart_ = null; + if (storageUtilizationChartBuilder_ != null) { + storageUtilizationChartBuilder_.dispose(); + storageUtilizationChartBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder + getStorageUtilizationChartBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getStorageUtilizationChartFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder + getStorageUtilizationChartOrBuilder() { + if (storageUtilizationChartBuilder_ != null) { + return storageUtilizationChartBuilder_.getMessageOrBuilder(); + } else { + return storageUtilizationChart_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + .getDefaultInstance() + : storageUtilizationChart_; + } + } + /** + * + * + *
+       * Total memory split into Used/Free buckets.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder> + getStorageUtilizationChartFieldBuilder() { + if (storageUtilizationChartBuilder_ == null) { + storageUtilizationChartBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartDataOrBuilder>( + getStorageUtilizationChart(), getParentForChildren(), isClean()); + storageUtilizationChart_ = null; + } + return storageUtilizationChartBuilder_; + } + + private com.google.cloud.migrationcenter.v1.ReportSummary.ChartData operatingSystem_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartDataOrBuilder> + operatingSystemBuilder_; + /** + * + * + *
+       * Count of assets grouped by Operating System families.
+       * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + * + * @return Whether the operatingSystem field is set. + */ + public boolean hasOperatingSystem() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+       * Count of assets grouped by Operating System families.
+       * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + * + * @return The operatingSystem. + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData getOperatingSystem() { + if (operatingSystemBuilder_ == null) { + return operatingSystem_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.getDefaultInstance() + : operatingSystem_; + } else { + return operatingSystemBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Count of assets grouped by Operating System families.
+       * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + */ + public Builder setOperatingSystem( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData value) { + if (operatingSystemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operatingSystem_ = value; + } else { + operatingSystemBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Count of assets grouped by Operating System families.
+       * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + */ + public Builder setOperatingSystem( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.Builder builderForValue) { + if (operatingSystemBuilder_ == null) { + operatingSystem_ = builderForValue.build(); + } else { + operatingSystemBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Count of assets grouped by Operating System families.
+       * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + */ + public Builder mergeOperatingSystem( + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData value) { + if (operatingSystemBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && operatingSystem_ != null + && operatingSystem_ + != com.google.cloud.migrationcenter.v1.ReportSummary.ChartData + .getDefaultInstance()) { + getOperatingSystemBuilder().mergeFrom(value); + } else { + operatingSystem_ = value; + } + } else { + operatingSystemBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Count of assets grouped by Operating System families.
+       * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + */ + public Builder clearOperatingSystem() { + bitField0_ = (bitField0_ & ~0x00000040); + operatingSystem_ = null; + if (operatingSystemBuilder_ != null) { + operatingSystemBuilder_.dispose(); + operatingSystemBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Count of assets grouped by Operating System families.
+       * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.Builder + getOperatingSystemBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getOperatingSystemFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Count of assets grouped by Operating System families.
+       * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.ChartDataOrBuilder + getOperatingSystemOrBuilder() { + if (operatingSystemBuilder_ != null) { + return operatingSystemBuilder_.getMessageOrBuilder(); + } else { + return operatingSystem_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.getDefaultInstance() + : operatingSystem_; + } + } + /** + * + * + *
+       * Count of assets grouped by Operating System families.
+       * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartDataOrBuilder> + getOperatingSystemFieldBuilder() { + if (operatingSystemBuilder_ == null) { + operatingSystemBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.ChartDataOrBuilder>( + getOperatingSystem(), getParentForChildren(), isClean()); + operatingSystem_ = null; + } + return operatingSystemBuilder_; + } + + private com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + coreCountHistogram_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder> + coreCountHistogramBuilder_; + /** + * + * + *
+       * Histogram showing a distribution of CPU core counts.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + * + * @return Whether the coreCountHistogram field is set. + */ + public boolean hasCoreCountHistogram() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+       * Histogram showing a distribution of CPU core counts.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + * + * @return The coreCountHistogram. + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + getCoreCountHistogram() { + if (coreCountHistogramBuilder_ == null) { + return coreCountHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : coreCountHistogram_; + } else { + return coreCountHistogramBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Histogram showing a distribution of CPU core counts.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + */ + public Builder setCoreCountHistogram( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData value) { + if (coreCountHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + coreCountHistogram_ = value; + } else { + coreCountHistogramBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of CPU core counts.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + */ + public Builder setCoreCountHistogram( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder + builderForValue) { + if (coreCountHistogramBuilder_ == null) { + coreCountHistogram_ = builderForValue.build(); + } else { + coreCountHistogramBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of CPU core counts.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + */ + public Builder mergeCoreCountHistogram( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData value) { + if (coreCountHistogramBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && coreCountHistogram_ != null + && coreCountHistogram_ + != com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance()) { + getCoreCountHistogramBuilder().mergeFrom(value); + } else { + coreCountHistogram_ = value; + } + } else { + coreCountHistogramBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of CPU core counts.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + */ + public Builder clearCoreCountHistogram() { + bitField0_ = (bitField0_ & ~0x00000080); + coreCountHistogram_ = null; + if (coreCountHistogramBuilder_ != null) { + coreCountHistogramBuilder_.dispose(); + coreCountHistogramBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of CPU core counts.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder + getCoreCountHistogramBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCoreCountHistogramFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Histogram showing a distribution of CPU core counts.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder + getCoreCountHistogramOrBuilder() { + if (coreCountHistogramBuilder_ != null) { + return coreCountHistogramBuilder_.getMessageOrBuilder(); + } else { + return coreCountHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : coreCountHistogram_; + } + } + /** + * + * + *
+       * Histogram showing a distribution of CPU core counts.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder> + getCoreCountHistogramFieldBuilder() { + if (coreCountHistogramBuilder_ == null) { + coreCountHistogramBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder>( + getCoreCountHistogram(), getParentForChildren(), isClean()); + coreCountHistogram_ = null; + } + return coreCountHistogramBuilder_; + } + + private com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + memoryBytesHistogram_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder> + memoryBytesHistogramBuilder_; + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + * + * @return Whether the memoryBytesHistogram field is set. + */ + public boolean hasMemoryBytesHistogram() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + * + * @return The memoryBytesHistogram. + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + getMemoryBytesHistogram() { + if (memoryBytesHistogramBuilder_ == null) { + return memoryBytesHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : memoryBytesHistogram_; + } else { + return memoryBytesHistogramBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + */ + public Builder setMemoryBytesHistogram( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData value) { + if (memoryBytesHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + memoryBytesHistogram_ = value; + } else { + memoryBytesHistogramBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + */ + public Builder setMemoryBytesHistogram( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder + builderForValue) { + if (memoryBytesHistogramBuilder_ == null) { + memoryBytesHistogram_ = builderForValue.build(); + } else { + memoryBytesHistogramBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + */ + public Builder mergeMemoryBytesHistogram( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData value) { + if (memoryBytesHistogramBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && memoryBytesHistogram_ != null + && memoryBytesHistogram_ + != com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance()) { + getMemoryBytesHistogramBuilder().mergeFrom(value); + } else { + memoryBytesHistogram_ = value; + } + } else { + memoryBytesHistogramBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + */ + public Builder clearMemoryBytesHistogram() { + bitField0_ = (bitField0_ & ~0x00000100); + memoryBytesHistogram_ = null; + if (memoryBytesHistogramBuilder_ != null) { + memoryBytesHistogramBuilder_.dispose(); + memoryBytesHistogramBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder + getMemoryBytesHistogramBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getMemoryBytesHistogramFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder + getMemoryBytesHistogramOrBuilder() { + if (memoryBytesHistogramBuilder_ != null) { + return memoryBytesHistogramBuilder_.getMessageOrBuilder(); + } else { + return memoryBytesHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : memoryBytesHistogram_; + } + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder> + getMemoryBytesHistogramFieldBuilder() { + if (memoryBytesHistogramBuilder_ == null) { + memoryBytesHistogramBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder>( + getMemoryBytesHistogram(), getParentForChildren(), isClean()); + memoryBytesHistogram_ = null; + } + return memoryBytesHistogramBuilder_; + } + + private com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + storageBytesHistogram_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder> + storageBytesHistogramBuilder_; + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + * + * @return Whether the storageBytesHistogram field is set. + */ + public boolean hasStorageBytesHistogram() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + * + * @return The storageBytesHistogram. + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + getStorageBytesHistogram() { + if (storageBytesHistogramBuilder_ == null) { + return storageBytesHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : storageBytesHistogram_; + } else { + return storageBytesHistogramBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + */ + public Builder setStorageBytesHistogram( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData value) { + if (storageBytesHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storageBytesHistogram_ = value; + } else { + storageBytesHistogramBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + */ + public Builder setStorageBytesHistogram( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder + builderForValue) { + if (storageBytesHistogramBuilder_ == null) { + storageBytesHistogram_ = builderForValue.build(); + } else { + storageBytesHistogramBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + */ + public Builder mergeStorageBytesHistogram( + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData value) { + if (storageBytesHistogramBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && storageBytesHistogram_ != null + && storageBytesHistogram_ + != com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance()) { + getStorageBytesHistogramBuilder().mergeFrom(value); + } else { + storageBytesHistogram_ = value; + } + } else { + storageBytesHistogramBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + */ + public Builder clearStorageBytesHistogram() { + bitField0_ = (bitField0_ & ~0x00000200); + storageBytesHistogram_ = null; + if (storageBytesHistogramBuilder_ != null) { + storageBytesHistogramBuilder_.dispose(); + storageBytesHistogramBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder + getStorageBytesHistogramBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getStorageBytesHistogramFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder + getStorageBytesHistogramOrBuilder() { + if (storageBytesHistogramBuilder_ != null) { + return storageBytesHistogramBuilder_.getMessageOrBuilder(); + } else { + return storageBytesHistogram_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + .getDefaultInstance() + : storageBytesHistogram_; + } + } + /** + * + * + *
+       * Histogram showing a distribution of memory sizes.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder> + getStorageBytesHistogramFieldBuilder() { + if (storageBytesHistogramBuilder_ == null) { + storageBytesHistogramBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.HistogramChartDataOrBuilder>( + getStorageBytesHistogram(), getParentForChildren(), isClean()); + storageBytesHistogram_ = null; + } + return storageBytesHistogramBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats) + private static final com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats(); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssetAggregateStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MachineSeriesAllocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The Machine Series (e.g. "E2", "N2")
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + * + * @return Whether the machineSeries field is set. + */ + boolean hasMachineSeries(); + /** + * + * + *
+     * The Machine Series (e.g. "E2", "N2")
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + * + * @return The machineSeries. + */ + com.google.cloud.migrationcenter.v1.MachineSeries getMachineSeries(); + /** + * + * + *
+     * The Machine Series (e.g. "E2", "N2")
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + */ + com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder getMachineSeriesOrBuilder(); + + /** + * + * + *
+     * Count of assets allocated to this machine series.
+     * 
+ * + * int64 allocated_asset_count = 2; + * + * @return The allocatedAssetCount. + */ + long getAllocatedAssetCount(); + } + /** + * + * + *
+   * Represents a data point tracking the count of assets allocated for a
+   * specific Machine Series.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} + */ + public static final class MachineSeriesAllocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation) + MachineSeriesAllocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use MachineSeriesAllocation.newBuilder() to construct. + private MachineSeriesAllocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MachineSeriesAllocation() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MachineSeriesAllocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_MachineSeriesAllocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_MachineSeriesAllocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.class, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder + .class); + } + + public static final int MACHINE_SERIES_FIELD_NUMBER = 1; + private com.google.cloud.migrationcenter.v1.MachineSeries machineSeries_; + /** + * + * + *
+     * The Machine Series (e.g. "E2", "N2")
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + * + * @return Whether the machineSeries field is set. + */ + @java.lang.Override + public boolean hasMachineSeries() { + return machineSeries_ != null; + } + /** + * + * + *
+     * The Machine Series (e.g. "E2", "N2")
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + * + * @return The machineSeries. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineSeries getMachineSeries() { + return machineSeries_ == null + ? com.google.cloud.migrationcenter.v1.MachineSeries.getDefaultInstance() + : machineSeries_; + } + /** + * + * + *
+     * The Machine Series (e.g. "E2", "N2")
+     * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder getMachineSeriesOrBuilder() { + return machineSeries_ == null + ? com.google.cloud.migrationcenter.v1.MachineSeries.getDefaultInstance() + : machineSeries_; + } + + public static final int ALLOCATED_ASSET_COUNT_FIELD_NUMBER = 2; + private long allocatedAssetCount_ = 0L; + /** + * + * + *
+     * Count of assets allocated to this machine series.
+     * 
+ * + * int64 allocated_asset_count = 2; + * + * @return The allocatedAssetCount. + */ + @java.lang.Override + public long getAllocatedAssetCount() { + return allocatedAssetCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (machineSeries_ != null) { + output.writeMessage(1, getMachineSeries()); + } + if (allocatedAssetCount_ != 0L) { + output.writeInt64(2, allocatedAssetCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (machineSeries_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMachineSeries()); + } + if (allocatedAssetCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, allocatedAssetCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation other = + (com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation) obj; + + if (hasMachineSeries() != other.hasMachineSeries()) return false; + if (hasMachineSeries()) { + if (!getMachineSeries().equals(other.getMachineSeries())) return false; + } + if (getAllocatedAssetCount() != other.getAllocatedAssetCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMachineSeries()) { + hash = (37 * hash) + MACHINE_SERIES_FIELD_NUMBER; + hash = (53 * hash) + getMachineSeries().hashCode(); + } + hash = (37 * hash) + ALLOCATED_ASSET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAllocatedAssetCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents a data point tracking the count of assets allocated for a
+     * specific Machine Series.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation) + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_MachineSeriesAllocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_MachineSeriesAllocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.class, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + machineSeries_ = null; + if (machineSeriesBuilder_ != null) { + machineSeriesBuilder_.dispose(); + machineSeriesBuilder_ = null; + } + allocatedAssetCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_MachineSeriesAllocation_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation build() { + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + buildPartial() { + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation result = + new com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.machineSeries_ = + machineSeriesBuilder_ == null ? machineSeries_ : machineSeriesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.allocatedAssetCount_ = allocatedAssetCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + .getDefaultInstance()) return this; + if (other.hasMachineSeries()) { + mergeMachineSeries(other.getMachineSeries()); + } + if (other.getAllocatedAssetCount() != 0L) { + setAllocatedAssetCount(other.getAllocatedAssetCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getMachineSeriesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + allocatedAssetCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.migrationcenter.v1.MachineSeries machineSeries_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineSeries, + com.google.cloud.migrationcenter.v1.MachineSeries.Builder, + com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder> + machineSeriesBuilder_; + /** + * + * + *
+       * The Machine Series (e.g. "E2", "N2")
+       * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + * + * @return Whether the machineSeries field is set. + */ + public boolean hasMachineSeries() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * The Machine Series (e.g. "E2", "N2")
+       * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + * + * @return The machineSeries. + */ + public com.google.cloud.migrationcenter.v1.MachineSeries getMachineSeries() { + if (machineSeriesBuilder_ == null) { + return machineSeries_ == null + ? com.google.cloud.migrationcenter.v1.MachineSeries.getDefaultInstance() + : machineSeries_; + } else { + return machineSeriesBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The Machine Series (e.g. "E2", "N2")
+       * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + */ + public Builder setMachineSeries(com.google.cloud.migrationcenter.v1.MachineSeries value) { + if (machineSeriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + machineSeries_ = value; + } else { + machineSeriesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The Machine Series (e.g. "E2", "N2")
+       * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + */ + public Builder setMachineSeries( + com.google.cloud.migrationcenter.v1.MachineSeries.Builder builderForValue) { + if (machineSeriesBuilder_ == null) { + machineSeries_ = builderForValue.build(); + } else { + machineSeriesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The Machine Series (e.g. "E2", "N2")
+       * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + */ + public Builder mergeMachineSeries(com.google.cloud.migrationcenter.v1.MachineSeries value) { + if (machineSeriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && machineSeries_ != null + && machineSeries_ + != com.google.cloud.migrationcenter.v1.MachineSeries.getDefaultInstance()) { + getMachineSeriesBuilder().mergeFrom(value); + } else { + machineSeries_ = value; + } + } else { + machineSeriesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The Machine Series (e.g. "E2", "N2")
+       * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + */ + public Builder clearMachineSeries() { + bitField0_ = (bitField0_ & ~0x00000001); + machineSeries_ = null; + if (machineSeriesBuilder_ != null) { + machineSeriesBuilder_.dispose(); + machineSeriesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The Machine Series (e.g. "E2", "N2")
+       * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + */ + public com.google.cloud.migrationcenter.v1.MachineSeries.Builder getMachineSeriesBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getMachineSeriesFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The Machine Series (e.g. "E2", "N2")
+       * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + */ + public com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder + getMachineSeriesOrBuilder() { + if (machineSeriesBuilder_ != null) { + return machineSeriesBuilder_.getMessageOrBuilder(); + } else { + return machineSeries_ == null + ? com.google.cloud.migrationcenter.v1.MachineSeries.getDefaultInstance() + : machineSeries_; + } + } + /** + * + * + *
+       * The Machine Series (e.g. "E2", "N2")
+       * 
+ * + * .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineSeries, + com.google.cloud.migrationcenter.v1.MachineSeries.Builder, + com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder> + getMachineSeriesFieldBuilder() { + if (machineSeriesBuilder_ == null) { + machineSeriesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.MachineSeries, + com.google.cloud.migrationcenter.v1.MachineSeries.Builder, + com.google.cloud.migrationcenter.v1.MachineSeriesOrBuilder>( + getMachineSeries(), getParentForChildren(), isClean()); + machineSeries_ = null; + } + return machineSeriesBuilder_; + } + + private long allocatedAssetCount_; + /** + * + * + *
+       * Count of assets allocated to this machine series.
+       * 
+ * + * int64 allocated_asset_count = 2; + * + * @return The allocatedAssetCount. + */ + @java.lang.Override + public long getAllocatedAssetCount() { + return allocatedAssetCount_; + } + /** + * + * + *
+       * Count of assets allocated to this machine series.
+       * 
+ * + * int64 allocated_asset_count = 2; + * + * @param value The allocatedAssetCount to set. + * @return This builder for chaining. + */ + public Builder setAllocatedAssetCount(long value) { + + allocatedAssetCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Count of assets allocated to this machine series.
+       * 
+ * + * int64 allocated_asset_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearAllocatedAssetCount() { + bitField0_ = (bitField0_ & ~0x00000002); + allocatedAssetCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation) + private static final com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation(); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MachineSeriesAllocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ComputeEngineFindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Set of regions in which the assets were allocated.
+     * 
+ * + * repeated string allocated_regions = 1; + * + * @return A list containing the allocatedRegions. + */ + java.util.List getAllocatedRegionsList(); + /** + * + * + *
+     * Set of regions in which the assets were allocated.
+     * 
+ * + * repeated string allocated_regions = 1; + * + * @return The count of allocatedRegions. + */ + int getAllocatedRegionsCount(); + /** + * + * + *
+     * Set of regions in which the assets were allocated.
+     * 
+ * + * repeated string allocated_regions = 1; + * + * @param index The index of the element to return. + * @return The allocatedRegions at the given index. + */ + java.lang.String getAllocatedRegions(int index); + /** + * + * + *
+     * Set of regions in which the assets were allocated.
+     * 
+ * + * repeated string allocated_regions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the allocatedRegions at the given index. + */ + com.google.protobuf.ByteString getAllocatedRegionsBytes(int index); + + /** + * + * + *
+     * Count of assets which were allocated.
+     * 
+ * + * int64 allocated_asset_count = 2; + * + * @return The allocatedAssetCount. + */ + long getAllocatedAssetCount(); + + /** + * + * + *
+     * Distribution of assets based on the Machine Series.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + java.util.List + getMachineSeriesAllocationsList(); + /** + * + * + *
+     * Distribution of assets based on the Machine Series.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + getMachineSeriesAllocations(int index); + /** + * + * + *
+     * Distribution of assets based on the Machine Series.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + int getMachineSeriesAllocationsCount(); + /** + * + * + *
+     * Distribution of assets based on the Machine Series.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocationOrBuilder> + getMachineSeriesAllocationsOrBuilderList(); + /** + * + * + *
+     * Distribution of assets based on the Machine Series.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocationOrBuilder + getMachineSeriesAllocationsOrBuilder(int index); + + /** + * + * + *
+     * Set of disk types allocated to assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @return A list containing the allocatedDiskTypes. + */ + java.util.List + getAllocatedDiskTypesList(); + /** + * + * + *
+     * Set of disk types allocated to assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @return The count of allocatedDiskTypes. + */ + int getAllocatedDiskTypesCount(); + /** + * + * + *
+     * Set of disk types allocated to assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param index The index of the element to return. + * @return The allocatedDiskTypes at the given index. + */ + com.google.cloud.migrationcenter.v1.PersistentDiskType getAllocatedDiskTypes(int index); + /** + * + * + *
+     * Set of disk types allocated to assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @return A list containing the enum numeric values on the wire for allocatedDiskTypes. + */ + java.util.List getAllocatedDiskTypesValueList(); + /** + * + * + *
+     * Set of disk types allocated to assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of allocatedDiskTypes at the given index. + */ + int getAllocatedDiskTypesValue(int index); + } + /** + * + * + *
+   * A set of findings that applies to assets destined for Compute Engine.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} + */ + public static final class ComputeEngineFinding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding) + ComputeEngineFindingOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComputeEngineFinding.newBuilder() to construct. + private ComputeEngineFinding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ComputeEngineFinding() { + allocatedRegions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + machineSeriesAllocations_ = java.util.Collections.emptyList(); + allocatedDiskTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ComputeEngineFinding(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ComputeEngineFinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ComputeEngineFinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.class, + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.Builder.class); + } + + public static final int ALLOCATED_REGIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList allocatedRegions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Set of regions in which the assets were allocated.
+     * 
+ * + * repeated string allocated_regions = 1; + * + * @return A list containing the allocatedRegions. + */ + public com.google.protobuf.ProtocolStringList getAllocatedRegionsList() { + return allocatedRegions_; + } + /** + * + * + *
+     * Set of regions in which the assets were allocated.
+     * 
+ * + * repeated string allocated_regions = 1; + * + * @return The count of allocatedRegions. + */ + public int getAllocatedRegionsCount() { + return allocatedRegions_.size(); + } + /** + * + * + *
+     * Set of regions in which the assets were allocated.
+     * 
+ * + * repeated string allocated_regions = 1; + * + * @param index The index of the element to return. + * @return The allocatedRegions at the given index. + */ + public java.lang.String getAllocatedRegions(int index) { + return allocatedRegions_.get(index); + } + /** + * + * + *
+     * Set of regions in which the assets were allocated.
+     * 
+ * + * repeated string allocated_regions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the allocatedRegions at the given index. + */ + public com.google.protobuf.ByteString getAllocatedRegionsBytes(int index) { + return allocatedRegions_.getByteString(index); + } + + public static final int ALLOCATED_ASSET_COUNT_FIELD_NUMBER = 2; + private long allocatedAssetCount_ = 0L; + /** + * + * + *
+     * Count of assets which were allocated.
+     * 
+ * + * int64 allocated_asset_count = 2; + * + * @return The allocatedAssetCount. + */ + @java.lang.Override + public long getAllocatedAssetCount() { + return allocatedAssetCount_; + } + + public static final int MACHINE_SERIES_ALLOCATIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation> + machineSeriesAllocations_; + /** + * + * + *
+     * Distribution of assets based on the Machine Series.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + @java.lang.Override + public java.util.List + getMachineSeriesAllocationsList() { + return machineSeriesAllocations_; + } + /** + * + * + *
+     * Distribution of assets based on the Machine Series.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocationOrBuilder> + getMachineSeriesAllocationsOrBuilderList() { + return machineSeriesAllocations_; + } + /** + * + * + *
+     * Distribution of assets based on the Machine Series.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + @java.lang.Override + public int getMachineSeriesAllocationsCount() { + return machineSeriesAllocations_.size(); + } + /** + * + * + *
+     * Distribution of assets based on the Machine Series.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + getMachineSeriesAllocations(int index) { + return machineSeriesAllocations_.get(index); + } + /** + * + * + *
+     * Distribution of assets based on the Machine Series.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocationOrBuilder + getMachineSeriesAllocationsOrBuilder(int index) { + return machineSeriesAllocations_.get(index); + } + + public static final int ALLOCATED_DISK_TYPES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List allocatedDiskTypes_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.migrationcenter.v1.PersistentDiskType> + allocatedDiskTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.migrationcenter.v1.PersistentDiskType>() { + public com.google.cloud.migrationcenter.v1.PersistentDiskType convert( + java.lang.Integer from) { + com.google.cloud.migrationcenter.v1.PersistentDiskType result = + com.google.cloud.migrationcenter.v1.PersistentDiskType.forNumber(from); + return result == null + ? com.google.cloud.migrationcenter.v1.PersistentDiskType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+     * Set of disk types allocated to assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @return A list containing the allocatedDiskTypes. + */ + @java.lang.Override + public java.util.List + getAllocatedDiskTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.migrationcenter.v1.PersistentDiskType>( + allocatedDiskTypes_, allocatedDiskTypes_converter_); + } + /** + * + * + *
+     * Set of disk types allocated to assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @return The count of allocatedDiskTypes. + */ + @java.lang.Override + public int getAllocatedDiskTypesCount() { + return allocatedDiskTypes_.size(); + } + /** + * + * + *
+     * Set of disk types allocated to assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param index The index of the element to return. + * @return The allocatedDiskTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PersistentDiskType getAllocatedDiskTypes(int index) { + return allocatedDiskTypes_converter_.convert(allocatedDiskTypes_.get(index)); + } + /** + * + * + *
+     * Set of disk types allocated to assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @return A list containing the enum numeric values on the wire for allocatedDiskTypes. + */ + @java.lang.Override + public java.util.List getAllocatedDiskTypesValueList() { + return allocatedDiskTypes_; + } + /** + * + * + *
+     * Set of disk types allocated to assets.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of allocatedDiskTypes at the given index. + */ + @java.lang.Override + public int getAllocatedDiskTypesValue(int index) { + return allocatedDiskTypes_.get(index); + } + + private int allocatedDiskTypesMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < allocatedRegions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allocatedRegions_.getRaw(i)); + } + if (allocatedAssetCount_ != 0L) { + output.writeInt64(2, allocatedAssetCount_); + } + for (int i = 0; i < machineSeriesAllocations_.size(); i++) { + output.writeMessage(3, machineSeriesAllocations_.get(i)); + } + if (getAllocatedDiskTypesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(allocatedDiskTypesMemoizedSerializedSize); + } + for (int i = 0; i < allocatedDiskTypes_.size(); i++) { + output.writeEnumNoTag(allocatedDiskTypes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < allocatedRegions_.size(); i++) { + dataSize += computeStringSizeNoTag(allocatedRegions_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllocatedRegionsList().size(); + } + if (allocatedAssetCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, allocatedAssetCount_); + } + for (int i = 0; i < machineSeriesAllocations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, machineSeriesAllocations_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < allocatedDiskTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + allocatedDiskTypes_.get(i)); + } + size += dataSize; + if (!getAllocatedDiskTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + allocatedDiskTypesMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding other = + (com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding) obj; + + if (!getAllocatedRegionsList().equals(other.getAllocatedRegionsList())) return false; + if (getAllocatedAssetCount() != other.getAllocatedAssetCount()) return false; + if (!getMachineSeriesAllocationsList().equals(other.getMachineSeriesAllocationsList())) + return false; + if (!allocatedDiskTypes_.equals(other.allocatedDiskTypes_)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAllocatedRegionsCount() > 0) { + hash = (37 * hash) + ALLOCATED_REGIONS_FIELD_NUMBER; + hash = (53 * hash) + getAllocatedRegionsList().hashCode(); + } + hash = (37 * hash) + ALLOCATED_ASSET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAllocatedAssetCount()); + if (getMachineSeriesAllocationsCount() > 0) { + hash = (37 * hash) + MACHINE_SERIES_ALLOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getMachineSeriesAllocationsList().hashCode(); + } + if (getAllocatedDiskTypesCount() > 0) { + hash = (37 * hash) + ALLOCATED_DISK_TYPES_FIELD_NUMBER; + hash = (53 * hash) + allocatedDiskTypes_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A set of findings that applies to assets destined for Compute Engine.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding) + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ComputeEngineFinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ComputeEngineFinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.class, + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + allocatedRegions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + allocatedAssetCount_ = 0L; + if (machineSeriesAllocationsBuilder_ == null) { + machineSeriesAllocations_ = java.util.Collections.emptyList(); + } else { + machineSeriesAllocations_ = null; + machineSeriesAllocationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + allocatedDiskTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_ComputeEngineFinding_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding build() { + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding buildPartial() { + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding result = + new com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding result) { + if (machineSeriesAllocationsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + machineSeriesAllocations_ = + java.util.Collections.unmodifiableList(machineSeriesAllocations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.machineSeriesAllocations_ = machineSeriesAllocations_; + } else { + result.machineSeriesAllocations_ = machineSeriesAllocationsBuilder_.build(); + } + if (((bitField0_ & 0x00000008) != 0)) { + allocatedDiskTypes_ = java.util.Collections.unmodifiableList(allocatedDiskTypes_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.allocatedDiskTypes_ = allocatedDiskTypes_; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + allocatedRegions_.makeImmutable(); + result.allocatedRegions_ = allocatedRegions_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.allocatedAssetCount_ = allocatedAssetCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + .getDefaultInstance()) return this; + if (!other.allocatedRegions_.isEmpty()) { + if (allocatedRegions_.isEmpty()) { + allocatedRegions_ = other.allocatedRegions_; + bitField0_ |= 0x00000001; + } else { + ensureAllocatedRegionsIsMutable(); + allocatedRegions_.addAll(other.allocatedRegions_); + } + onChanged(); + } + if (other.getAllocatedAssetCount() != 0L) { + setAllocatedAssetCount(other.getAllocatedAssetCount()); + } + if (machineSeriesAllocationsBuilder_ == null) { + if (!other.machineSeriesAllocations_.isEmpty()) { + if (machineSeriesAllocations_.isEmpty()) { + machineSeriesAllocations_ = other.machineSeriesAllocations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureMachineSeriesAllocationsIsMutable(); + machineSeriesAllocations_.addAll(other.machineSeriesAllocations_); + } + onChanged(); + } + } else { + if (!other.machineSeriesAllocations_.isEmpty()) { + if (machineSeriesAllocationsBuilder_.isEmpty()) { + machineSeriesAllocationsBuilder_.dispose(); + machineSeriesAllocationsBuilder_ = null; + machineSeriesAllocations_ = other.machineSeriesAllocations_; + bitField0_ = (bitField0_ & ~0x00000004); + machineSeriesAllocationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMachineSeriesAllocationsFieldBuilder() + : null; + } else { + machineSeriesAllocationsBuilder_.addAllMessages(other.machineSeriesAllocations_); + } + } + } + if (!other.allocatedDiskTypes_.isEmpty()) { + if (allocatedDiskTypes_.isEmpty()) { + allocatedDiskTypes_ = other.allocatedDiskTypes_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAllocatedDiskTypesIsMutable(); + allocatedDiskTypes_.addAll(other.allocatedDiskTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllocatedRegionsIsMutable(); + allocatedRegions_.add(s); + break; + } // case 10 + case 16: + { + allocatedAssetCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + .parser(), + extensionRegistry); + if (machineSeriesAllocationsBuilder_ == null) { + ensureMachineSeriesAllocationsIsMutable(); + machineSeriesAllocations_.add(m); + } else { + machineSeriesAllocationsBuilder_.addMessage(m); + } + break; + } // case 26 + case 32: + { + int tmpRaw = input.readEnum(); + ensureAllocatedDiskTypesIsMutable(); + allocatedDiskTypes_.add(tmpRaw); + break; + } // case 32 + case 34: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureAllocatedDiskTypesIsMutable(); + allocatedDiskTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList allocatedRegions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAllocatedRegionsIsMutable() { + if (!allocatedRegions_.isModifiable()) { + allocatedRegions_ = new com.google.protobuf.LazyStringArrayList(allocatedRegions_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * Set of regions in which the assets were allocated.
+       * 
+ * + * repeated string allocated_regions = 1; + * + * @return A list containing the allocatedRegions. + */ + public com.google.protobuf.ProtocolStringList getAllocatedRegionsList() { + allocatedRegions_.makeImmutable(); + return allocatedRegions_; + } + /** + * + * + *
+       * Set of regions in which the assets were allocated.
+       * 
+ * + * repeated string allocated_regions = 1; + * + * @return The count of allocatedRegions. + */ + public int getAllocatedRegionsCount() { + return allocatedRegions_.size(); + } + /** + * + * + *
+       * Set of regions in which the assets were allocated.
+       * 
+ * + * repeated string allocated_regions = 1; + * + * @param index The index of the element to return. + * @return The allocatedRegions at the given index. + */ + public java.lang.String getAllocatedRegions(int index) { + return allocatedRegions_.get(index); + } + /** + * + * + *
+       * Set of regions in which the assets were allocated.
+       * 
+ * + * repeated string allocated_regions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the allocatedRegions at the given index. + */ + public com.google.protobuf.ByteString getAllocatedRegionsBytes(int index) { + return allocatedRegions_.getByteString(index); + } + /** + * + * + *
+       * Set of regions in which the assets were allocated.
+       * 
+ * + * repeated string allocated_regions = 1; + * + * @param index The index to set the value at. + * @param value The allocatedRegions to set. + * @return This builder for chaining. + */ + public Builder setAllocatedRegions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllocatedRegionsIsMutable(); + allocatedRegions_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Set of regions in which the assets were allocated.
+       * 
+ * + * repeated string allocated_regions = 1; + * + * @param value The allocatedRegions to add. + * @return This builder for chaining. + */ + public Builder addAllocatedRegions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllocatedRegionsIsMutable(); + allocatedRegions_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Set of regions in which the assets were allocated.
+       * 
+ * + * repeated string allocated_regions = 1; + * + * @param values The allocatedRegions to add. + * @return This builder for chaining. + */ + public Builder addAllAllocatedRegions(java.lang.Iterable values) { + ensureAllocatedRegionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allocatedRegions_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Set of regions in which the assets were allocated.
+       * 
+ * + * repeated string allocated_regions = 1; + * + * @return This builder for chaining. + */ + public Builder clearAllocatedRegions() { + allocatedRegions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Set of regions in which the assets were allocated.
+       * 
+ * + * repeated string allocated_regions = 1; + * + * @param value The bytes of the allocatedRegions to add. + * @return This builder for chaining. + */ + public Builder addAllocatedRegionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllocatedRegionsIsMutable(); + allocatedRegions_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long allocatedAssetCount_; + /** + * + * + *
+       * Count of assets which were allocated.
+       * 
+ * + * int64 allocated_asset_count = 2; + * + * @return The allocatedAssetCount. + */ + @java.lang.Override + public long getAllocatedAssetCount() { + return allocatedAssetCount_; + } + /** + * + * + *
+       * Count of assets which were allocated.
+       * 
+ * + * int64 allocated_asset_count = 2; + * + * @param value The allocatedAssetCount to set. + * @return This builder for chaining. + */ + public Builder setAllocatedAssetCount(long value) { + + allocatedAssetCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Count of assets which were allocated.
+       * 
+ * + * int64 allocated_asset_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearAllocatedAssetCount() { + bitField0_ = (bitField0_ & ~0x00000002); + allocatedAssetCount_ = 0L; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation> + machineSeriesAllocations_ = java.util.Collections.emptyList(); + + private void ensureMachineSeriesAllocationsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + machineSeriesAllocations_ = + new java.util.ArrayList< + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation>( + machineSeriesAllocations_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocationOrBuilder> + machineSeriesAllocationsBuilder_; + + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation> + getMachineSeriesAllocationsList() { + if (machineSeriesAllocationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(machineSeriesAllocations_); + } else { + return machineSeriesAllocationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public int getMachineSeriesAllocationsCount() { + if (machineSeriesAllocationsBuilder_ == null) { + return machineSeriesAllocations_.size(); + } else { + return machineSeriesAllocationsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + getMachineSeriesAllocations(int index) { + if (machineSeriesAllocationsBuilder_ == null) { + return machineSeriesAllocations_.get(index); + } else { + return machineSeriesAllocationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public Builder setMachineSeriesAllocations( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation value) { + if (machineSeriesAllocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMachineSeriesAllocationsIsMutable(); + machineSeriesAllocations_.set(index, value); + onChanged(); + } else { + machineSeriesAllocationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public Builder setMachineSeriesAllocations( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder + builderForValue) { + if (machineSeriesAllocationsBuilder_ == null) { + ensureMachineSeriesAllocationsIsMutable(); + machineSeriesAllocations_.set(index, builderForValue.build()); + onChanged(); + } else { + machineSeriesAllocationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public Builder addMachineSeriesAllocations( + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation value) { + if (machineSeriesAllocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMachineSeriesAllocationsIsMutable(); + machineSeriesAllocations_.add(value); + onChanged(); + } else { + machineSeriesAllocationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public Builder addMachineSeriesAllocations( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation value) { + if (machineSeriesAllocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMachineSeriesAllocationsIsMutable(); + machineSeriesAllocations_.add(index, value); + onChanged(); + } else { + machineSeriesAllocationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public Builder addMachineSeriesAllocations( + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder + builderForValue) { + if (machineSeriesAllocationsBuilder_ == null) { + ensureMachineSeriesAllocationsIsMutable(); + machineSeriesAllocations_.add(builderForValue.build()); + onChanged(); + } else { + machineSeriesAllocationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public Builder addMachineSeriesAllocations( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder + builderForValue) { + if (machineSeriesAllocationsBuilder_ == null) { + ensureMachineSeriesAllocationsIsMutable(); + machineSeriesAllocations_.add(index, builderForValue.build()); + onChanged(); + } else { + machineSeriesAllocationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public Builder addAllMachineSeriesAllocations( + java.lang.Iterable< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation> + values) { + if (machineSeriesAllocationsBuilder_ == null) { + ensureMachineSeriesAllocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, machineSeriesAllocations_); + onChanged(); + } else { + machineSeriesAllocationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public Builder clearMachineSeriesAllocations() { + if (machineSeriesAllocationsBuilder_ == null) { + machineSeriesAllocations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + machineSeriesAllocationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public Builder removeMachineSeriesAllocations(int index) { + if (machineSeriesAllocationsBuilder_ == null) { + ensureMachineSeriesAllocationsIsMutable(); + machineSeriesAllocations_.remove(index); + onChanged(); + } else { + machineSeriesAllocationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder + getMachineSeriesAllocationsBuilder(int index) { + return getMachineSeriesAllocationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocationOrBuilder + getMachineSeriesAllocationsOrBuilder(int index) { + if (machineSeriesAllocationsBuilder_ == null) { + return machineSeriesAllocations_.get(index); + } else { + return machineSeriesAllocationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary + .MachineSeriesAllocationOrBuilder> + getMachineSeriesAllocationsOrBuilderList() { + if (machineSeriesAllocationsBuilder_ != null) { + return machineSeriesAllocationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(machineSeriesAllocations_); + } + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder + addMachineSeriesAllocationsBuilder() { + return getMachineSeriesAllocationsFieldBuilder() + .addBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + .getDefaultInstance()); + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder + addMachineSeriesAllocationsBuilder(int index) { + return getMachineSeriesAllocationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + .getDefaultInstance()); + } + /** + * + * + *
+       * Distribution of assets based on the Machine Series.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * + */ + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder> + getMachineSeriesAllocationsBuilderList() { + return getMachineSeriesAllocationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocationOrBuilder> + getMachineSeriesAllocationsFieldBuilder() { + if (machineSeriesAllocationsBuilder_ == null) { + machineSeriesAllocationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation, + com.google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary + .MachineSeriesAllocationOrBuilder>( + machineSeriesAllocations_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + machineSeriesAllocations_ = null; + } + return machineSeriesAllocationsBuilder_; + } + + private java.util.List allocatedDiskTypes_ = + java.util.Collections.emptyList(); + + private void ensureAllocatedDiskTypesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + allocatedDiskTypes_ = new java.util.ArrayList(allocatedDiskTypes_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @return A list containing the allocatedDiskTypes. + */ + public java.util.List + getAllocatedDiskTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.migrationcenter.v1.PersistentDiskType>( + allocatedDiskTypes_, allocatedDiskTypes_converter_); + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @return The count of allocatedDiskTypes. + */ + public int getAllocatedDiskTypesCount() { + return allocatedDiskTypes_.size(); + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param index The index of the element to return. + * @return The allocatedDiskTypes at the given index. + */ + public com.google.cloud.migrationcenter.v1.PersistentDiskType getAllocatedDiskTypes( + int index) { + return allocatedDiskTypes_converter_.convert(allocatedDiskTypes_.get(index)); + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param index The index to set the value at. + * @param value The allocatedDiskTypes to set. + * @return This builder for chaining. + */ + public Builder setAllocatedDiskTypes( + int index, com.google.cloud.migrationcenter.v1.PersistentDiskType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllocatedDiskTypesIsMutable(); + allocatedDiskTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param value The allocatedDiskTypes to add. + * @return This builder for chaining. + */ + public Builder addAllocatedDiskTypes( + com.google.cloud.migrationcenter.v1.PersistentDiskType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllocatedDiskTypesIsMutable(); + allocatedDiskTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param values The allocatedDiskTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAllocatedDiskTypes( + java.lang.Iterable + values) { + ensureAllocatedDiskTypesIsMutable(); + for (com.google.cloud.migrationcenter.v1.PersistentDiskType value : values) { + allocatedDiskTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearAllocatedDiskTypes() { + allocatedDiskTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @return A list containing the enum numeric values on the wire for allocatedDiskTypes. + */ + public java.util.List getAllocatedDiskTypesValueList() { + return java.util.Collections.unmodifiableList(allocatedDiskTypes_); + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of allocatedDiskTypes at the given index. + */ + public int getAllocatedDiskTypesValue(int index) { + return allocatedDiskTypes_.get(index); + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for allocatedDiskTypes to set. + * @return This builder for chaining. + */ + public Builder setAllocatedDiskTypesValue(int index, int value) { + ensureAllocatedDiskTypesIsMutable(); + allocatedDiskTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param value The enum numeric value on the wire for allocatedDiskTypes to add. + * @return This builder for chaining. + */ + public Builder addAllocatedDiskTypesValue(int value) { + ensureAllocatedDiskTypesIsMutable(); + allocatedDiskTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Set of disk types allocated to assets.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * + * + * @param values The enum numeric values on the wire for allocatedDiskTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAllocatedDiskTypesValue(java.lang.Iterable values) { + ensureAllocatedDiskTypesIsMutable(); + for (int value : values) { + allocatedDiskTypes_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding) + private static final com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding(); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeEngineFinding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GroupPreferenceSetFindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Display Name of the Preference Set
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+     * Display Name of the Preference Set
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+     * Description for the Preference Set.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * Description for the Preference Set.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * A set of preferences that applies to all machines in the context.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + * + * @return Whether the machinePreferences field is set. + */ + boolean hasMachinePreferences(); + /** + * + * + *
+     * A set of preferences that applies to all machines in the context.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + * + * @return The machinePreferences. + */ + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences getMachinePreferences(); + /** + * + * + *
+     * A set of preferences that applies to all machines in the context.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + */ + com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder + getMachinePreferencesOrBuilder(); + + /** + * + * + *
+     * Total monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_total = 4; + * + * @return Whether the monthlyCostTotal field is set. + */ + boolean hasMonthlyCostTotal(); + /** + * + * + *
+     * Total monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_total = 4; + * + * @return The monthlyCostTotal. + */ + com.google.type.Money getMonthlyCostTotal(); + /** + * + * + *
+     * Total monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_total = 4; + */ + com.google.type.MoneyOrBuilder getMonthlyCostTotalOrBuilder(); + + /** + * + * + *
+     * Compute monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_compute = 5; + * + * @return Whether the monthlyCostCompute field is set. + */ + boolean hasMonthlyCostCompute(); + /** + * + * + *
+     * Compute monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_compute = 5; + * + * @return The monthlyCostCompute. + */ + com.google.type.Money getMonthlyCostCompute(); + /** + * + * + *
+     * Compute monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_compute = 5; + */ + com.google.type.MoneyOrBuilder getMonthlyCostComputeOrBuilder(); + + /** + * + * + *
+     * Licensing monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + * + * @return Whether the monthlyCostOsLicense field is set. + */ + boolean hasMonthlyCostOsLicense(); + /** + * + * + *
+     * Licensing monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + * + * @return The monthlyCostOsLicense. + */ + com.google.type.Money getMonthlyCostOsLicense(); + /** + * + * + *
+     * Licensing monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + */ + com.google.type.MoneyOrBuilder getMonthlyCostOsLicenseOrBuilder(); + + /** + * + * + *
+     * Network Egress monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + * + * @return Whether the monthlyCostNetworkEgress field is set. + */ + boolean hasMonthlyCostNetworkEgress(); + /** + * + * + *
+     * Network Egress monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + * + * @return The monthlyCostNetworkEgress. + */ + com.google.type.Money getMonthlyCostNetworkEgress(); + /** + * + * + *
+     * Network Egress monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + */ + com.google.type.MoneyOrBuilder getMonthlyCostNetworkEgressOrBuilder(); + + /** + * + * + *
+     * Storage monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_storage = 8; + * + * @return Whether the monthlyCostStorage field is set. + */ + boolean hasMonthlyCostStorage(); + /** + * + * + *
+     * Storage monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_storage = 8; + * + * @return The monthlyCostStorage. + */ + com.google.type.Money getMonthlyCostStorage(); + /** + * + * + *
+     * Storage monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_storage = 8; + */ + com.google.type.MoneyOrBuilder getMonthlyCostStorageOrBuilder(); + + /** + * + * + *
+     * Miscellaneous monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_other = 9; + * + * @return Whether the monthlyCostOther field is set. + */ + boolean hasMonthlyCostOther(); + /** + * + * + *
+     * Miscellaneous monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_other = 9; + * + * @return The monthlyCostOther. + */ + com.google.type.Money getMonthlyCostOther(); + /** + * + * + *
+     * Miscellaneous monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_other = 9; + */ + com.google.type.MoneyOrBuilder getMonthlyCostOtherOrBuilder(); + + /** + * + * + *
+     * A set of findings that applies to Compute Engine machines in the input.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + * + * @return Whether the computeEngineFinding field is set. + */ + boolean hasComputeEngineFinding(); + /** + * + * + *
+     * A set of findings that applies to Compute Engine machines in the input.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + * + * @return The computeEngineFinding. + */ + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + getComputeEngineFinding(); + /** + * + * + *
+     * A set of findings that applies to Compute Engine machines in the input.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFindingOrBuilder + getComputeEngineFindingOrBuilder(); + } + /** + * + * + *
+   * Summary Findings for a specific Group/PreferenceSet combination.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding} + */ + public static final class GroupPreferenceSetFinding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding) + GroupPreferenceSetFindingOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupPreferenceSetFinding.newBuilder() to construct. + private GroupPreferenceSetFinding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GroupPreferenceSetFinding() { + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GroupPreferenceSetFinding(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupPreferenceSetFinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupPreferenceSetFinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.class, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.Builder + .class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display Name of the Preference Set
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+     * Display Name of the Preference Set
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+     * Description for the Preference Set.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * Description for the Preference Set.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_PREFERENCES_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.VirtualMachinePreferences machinePreferences_; + /** + * + * + *
+     * A set of preferences that applies to all machines in the context.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + * + * @return Whether the machinePreferences field is set. + */ + @java.lang.Override + public boolean hasMachinePreferences() { + return machinePreferences_ != null; + } + /** + * + * + *
+     * A set of preferences that applies to all machines in the context.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + * + * @return The machinePreferences. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferences getMachinePreferences() { + return machinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.getDefaultInstance() + : machinePreferences_; + } + /** + * + * + *
+     * A set of preferences that applies to all machines in the context.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder + getMachinePreferencesOrBuilder() { + return machinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.getDefaultInstance() + : machinePreferences_; + } + + public static final int MONTHLY_COST_TOTAL_FIELD_NUMBER = 4; + private com.google.type.Money monthlyCostTotal_; + /** + * + * + *
+     * Total monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_total = 4; + * + * @return Whether the monthlyCostTotal field is set. + */ + @java.lang.Override + public boolean hasMonthlyCostTotal() { + return monthlyCostTotal_ != null; + } + /** + * + * + *
+     * Total monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_total = 4; + * + * @return The monthlyCostTotal. + */ + @java.lang.Override + public com.google.type.Money getMonthlyCostTotal() { + return monthlyCostTotal_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostTotal_; + } + /** + * + * + *
+     * Total monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_total = 4; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getMonthlyCostTotalOrBuilder() { + return monthlyCostTotal_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostTotal_; + } + + public static final int MONTHLY_COST_COMPUTE_FIELD_NUMBER = 5; + private com.google.type.Money monthlyCostCompute_; + /** + * + * + *
+     * Compute monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_compute = 5; + * + * @return Whether the monthlyCostCompute field is set. + */ + @java.lang.Override + public boolean hasMonthlyCostCompute() { + return monthlyCostCompute_ != null; + } + /** + * + * + *
+     * Compute monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_compute = 5; + * + * @return The monthlyCostCompute. + */ + @java.lang.Override + public com.google.type.Money getMonthlyCostCompute() { + return monthlyCostCompute_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostCompute_; + } + /** + * + * + *
+     * Compute monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_compute = 5; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getMonthlyCostComputeOrBuilder() { + return monthlyCostCompute_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostCompute_; + } + + public static final int MONTHLY_COST_OS_LICENSE_FIELD_NUMBER = 6; + private com.google.type.Money monthlyCostOsLicense_; + /** + * + * + *
+     * Licensing monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + * + * @return Whether the monthlyCostOsLicense field is set. + */ + @java.lang.Override + public boolean hasMonthlyCostOsLicense() { + return monthlyCostOsLicense_ != null; + } + /** + * + * + *
+     * Licensing monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + * + * @return The monthlyCostOsLicense. + */ + @java.lang.Override + public com.google.type.Money getMonthlyCostOsLicense() { + return monthlyCostOsLicense_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostOsLicense_; + } + /** + * + * + *
+     * Licensing monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getMonthlyCostOsLicenseOrBuilder() { + return monthlyCostOsLicense_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostOsLicense_; + } + + public static final int MONTHLY_COST_NETWORK_EGRESS_FIELD_NUMBER = 7; + private com.google.type.Money monthlyCostNetworkEgress_; + /** + * + * + *
+     * Network Egress monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + * + * @return Whether the monthlyCostNetworkEgress field is set. + */ + @java.lang.Override + public boolean hasMonthlyCostNetworkEgress() { + return monthlyCostNetworkEgress_ != null; + } + /** + * + * + *
+     * Network Egress monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + * + * @return The monthlyCostNetworkEgress. + */ + @java.lang.Override + public com.google.type.Money getMonthlyCostNetworkEgress() { + return monthlyCostNetworkEgress_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostNetworkEgress_; + } + /** + * + * + *
+     * Network Egress monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getMonthlyCostNetworkEgressOrBuilder() { + return monthlyCostNetworkEgress_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostNetworkEgress_; + } + + public static final int MONTHLY_COST_STORAGE_FIELD_NUMBER = 8; + private com.google.type.Money monthlyCostStorage_; + /** + * + * + *
+     * Storage monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_storage = 8; + * + * @return Whether the monthlyCostStorage field is set. + */ + @java.lang.Override + public boolean hasMonthlyCostStorage() { + return monthlyCostStorage_ != null; + } + /** + * + * + *
+     * Storage monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_storage = 8; + * + * @return The monthlyCostStorage. + */ + @java.lang.Override + public com.google.type.Money getMonthlyCostStorage() { + return monthlyCostStorage_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostStorage_; + } + /** + * + * + *
+     * Storage monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_storage = 8; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getMonthlyCostStorageOrBuilder() { + return monthlyCostStorage_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostStorage_; + } + + public static final int MONTHLY_COST_OTHER_FIELD_NUMBER = 9; + private com.google.type.Money monthlyCostOther_; + /** + * + * + *
+     * Miscellaneous monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_other = 9; + * + * @return Whether the monthlyCostOther field is set. + */ + @java.lang.Override + public boolean hasMonthlyCostOther() { + return monthlyCostOther_ != null; + } + /** + * + * + *
+     * Miscellaneous monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_other = 9; + * + * @return The monthlyCostOther. + */ + @java.lang.Override + public com.google.type.Money getMonthlyCostOther() { + return monthlyCostOther_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostOther_; + } + /** + * + * + *
+     * Miscellaneous monthly cost for this preference set.
+     * 
+ * + * .google.type.Money monthly_cost_other = 9; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getMonthlyCostOtherOrBuilder() { + return monthlyCostOther_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostOther_; + } + + public static final int COMPUTE_ENGINE_FINDING_FIELD_NUMBER = 10; + private com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + computeEngineFinding_; + /** + * + * + *
+     * A set of findings that applies to Compute Engine machines in the input.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + * + * @return Whether the computeEngineFinding field is set. + */ + @java.lang.Override + public boolean hasComputeEngineFinding() { + return computeEngineFinding_ != null; + } + /** + * + * + *
+     * A set of findings that applies to Compute Engine machines in the input.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + * + * @return The computeEngineFinding. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + getComputeEngineFinding() { + return computeEngineFinding_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + .getDefaultInstance() + : computeEngineFinding_; + } + /** + * + * + *
+     * A set of findings that applies to Compute Engine machines in the input.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFindingOrBuilder + getComputeEngineFindingOrBuilder() { + return computeEngineFinding_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + .getDefaultInstance() + : computeEngineFinding_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (machinePreferences_ != null) { + output.writeMessage(3, getMachinePreferences()); + } + if (monthlyCostTotal_ != null) { + output.writeMessage(4, getMonthlyCostTotal()); + } + if (monthlyCostCompute_ != null) { + output.writeMessage(5, getMonthlyCostCompute()); + } + if (monthlyCostOsLicense_ != null) { + output.writeMessage(6, getMonthlyCostOsLicense()); + } + if (monthlyCostNetworkEgress_ != null) { + output.writeMessage(7, getMonthlyCostNetworkEgress()); + } + if (monthlyCostStorage_ != null) { + output.writeMessage(8, getMonthlyCostStorage()); + } + if (monthlyCostOther_ != null) { + output.writeMessage(9, getMonthlyCostOther()); + } + if (computeEngineFinding_ != null) { + output.writeMessage(10, getComputeEngineFinding()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (machinePreferences_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMachinePreferences()); + } + if (monthlyCostTotal_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMonthlyCostTotal()); + } + if (monthlyCostCompute_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getMonthlyCostCompute()); + } + if (monthlyCostOsLicense_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMonthlyCostOsLicense()); + } + if (monthlyCostNetworkEgress_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getMonthlyCostNetworkEgress()); + } + if (monthlyCostStorage_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getMonthlyCostStorage()); + } + if (monthlyCostOther_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMonthlyCostOther()); + } + if (computeEngineFinding_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(10, getComputeEngineFinding()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding other = + (com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasMachinePreferences() != other.hasMachinePreferences()) return false; + if (hasMachinePreferences()) { + if (!getMachinePreferences().equals(other.getMachinePreferences())) return false; + } + if (hasMonthlyCostTotal() != other.hasMonthlyCostTotal()) return false; + if (hasMonthlyCostTotal()) { + if (!getMonthlyCostTotal().equals(other.getMonthlyCostTotal())) return false; + } + if (hasMonthlyCostCompute() != other.hasMonthlyCostCompute()) return false; + if (hasMonthlyCostCompute()) { + if (!getMonthlyCostCompute().equals(other.getMonthlyCostCompute())) return false; + } + if (hasMonthlyCostOsLicense() != other.hasMonthlyCostOsLicense()) return false; + if (hasMonthlyCostOsLicense()) { + if (!getMonthlyCostOsLicense().equals(other.getMonthlyCostOsLicense())) return false; + } + if (hasMonthlyCostNetworkEgress() != other.hasMonthlyCostNetworkEgress()) return false; + if (hasMonthlyCostNetworkEgress()) { + if (!getMonthlyCostNetworkEgress().equals(other.getMonthlyCostNetworkEgress())) + return false; + } + if (hasMonthlyCostStorage() != other.hasMonthlyCostStorage()) return false; + if (hasMonthlyCostStorage()) { + if (!getMonthlyCostStorage().equals(other.getMonthlyCostStorage())) return false; + } + if (hasMonthlyCostOther() != other.hasMonthlyCostOther()) return false; + if (hasMonthlyCostOther()) { + if (!getMonthlyCostOther().equals(other.getMonthlyCostOther())) return false; + } + if (hasComputeEngineFinding() != other.hasComputeEngineFinding()) return false; + if (hasComputeEngineFinding()) { + if (!getComputeEngineFinding().equals(other.getComputeEngineFinding())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasMachinePreferences()) { + hash = (37 * hash) + MACHINE_PREFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getMachinePreferences().hashCode(); + } + if (hasMonthlyCostTotal()) { + hash = (37 * hash) + MONTHLY_COST_TOTAL_FIELD_NUMBER; + hash = (53 * hash) + getMonthlyCostTotal().hashCode(); + } + if (hasMonthlyCostCompute()) { + hash = (37 * hash) + MONTHLY_COST_COMPUTE_FIELD_NUMBER; + hash = (53 * hash) + getMonthlyCostCompute().hashCode(); + } + if (hasMonthlyCostOsLicense()) { + hash = (37 * hash) + MONTHLY_COST_OS_LICENSE_FIELD_NUMBER; + hash = (53 * hash) + getMonthlyCostOsLicense().hashCode(); + } + if (hasMonthlyCostNetworkEgress()) { + hash = (37 * hash) + MONTHLY_COST_NETWORK_EGRESS_FIELD_NUMBER; + hash = (53 * hash) + getMonthlyCostNetworkEgress().hashCode(); + } + if (hasMonthlyCostStorage()) { + hash = (37 * hash) + MONTHLY_COST_STORAGE_FIELD_NUMBER; + hash = (53 * hash) + getMonthlyCostStorage().hashCode(); + } + if (hasMonthlyCostOther()) { + hash = (37 * hash) + MONTHLY_COST_OTHER_FIELD_NUMBER; + hash = (53 * hash) + getMonthlyCostOther().hashCode(); + } + if (hasComputeEngineFinding()) { + hash = (37 * hash) + COMPUTE_ENGINE_FINDING_FIELD_NUMBER; + hash = (53 * hash) + getComputeEngineFinding().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Summary Findings for a specific Group/PreferenceSet combination.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding) + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupPreferenceSetFinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupPreferenceSetFinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.class, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.Builder + .class); + } + + // Construct using + // com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + description_ = ""; + machinePreferences_ = null; + if (machinePreferencesBuilder_ != null) { + machinePreferencesBuilder_.dispose(); + machinePreferencesBuilder_ = null; + } + monthlyCostTotal_ = null; + if (monthlyCostTotalBuilder_ != null) { + monthlyCostTotalBuilder_.dispose(); + monthlyCostTotalBuilder_ = null; + } + monthlyCostCompute_ = null; + if (monthlyCostComputeBuilder_ != null) { + monthlyCostComputeBuilder_.dispose(); + monthlyCostComputeBuilder_ = null; + } + monthlyCostOsLicense_ = null; + if (monthlyCostOsLicenseBuilder_ != null) { + monthlyCostOsLicenseBuilder_.dispose(); + monthlyCostOsLicenseBuilder_ = null; + } + monthlyCostNetworkEgress_ = null; + if (monthlyCostNetworkEgressBuilder_ != null) { + monthlyCostNetworkEgressBuilder_.dispose(); + monthlyCostNetworkEgressBuilder_ = null; + } + monthlyCostStorage_ = null; + if (monthlyCostStorageBuilder_ != null) { + monthlyCostStorageBuilder_.dispose(); + monthlyCostStorageBuilder_ = null; + } + monthlyCostOther_ = null; + if (monthlyCostOtherBuilder_ != null) { + monthlyCostOtherBuilder_.dispose(); + monthlyCostOtherBuilder_ = null; + } + computeEngineFinding_ = null; + if (computeEngineFindingBuilder_ != null) { + computeEngineFindingBuilder_.dispose(); + computeEngineFindingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupPreferenceSetFinding_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding build() { + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + buildPartial() { + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding result = + new com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.machinePreferences_ = + machinePreferencesBuilder_ == null + ? machinePreferences_ + : machinePreferencesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.monthlyCostTotal_ = + monthlyCostTotalBuilder_ == null + ? monthlyCostTotal_ + : monthlyCostTotalBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.monthlyCostCompute_ = + monthlyCostComputeBuilder_ == null + ? monthlyCostCompute_ + : monthlyCostComputeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.monthlyCostOsLicense_ = + monthlyCostOsLicenseBuilder_ == null + ? monthlyCostOsLicense_ + : monthlyCostOsLicenseBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.monthlyCostNetworkEgress_ = + monthlyCostNetworkEgressBuilder_ == null + ? monthlyCostNetworkEgress_ + : monthlyCostNetworkEgressBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.monthlyCostStorage_ = + monthlyCostStorageBuilder_ == null + ? monthlyCostStorage_ + : monthlyCostStorageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.monthlyCostOther_ = + monthlyCostOtherBuilder_ == null + ? monthlyCostOther_ + : monthlyCostOtherBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.computeEngineFinding_ = + computeEngineFindingBuilder_ == null + ? computeEngineFinding_ + : computeEngineFindingBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding) { + return mergeFrom( + (com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + .getDefaultInstance()) return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasMachinePreferences()) { + mergeMachinePreferences(other.getMachinePreferences()); + } + if (other.hasMonthlyCostTotal()) { + mergeMonthlyCostTotal(other.getMonthlyCostTotal()); + } + if (other.hasMonthlyCostCompute()) { + mergeMonthlyCostCompute(other.getMonthlyCostCompute()); + } + if (other.hasMonthlyCostOsLicense()) { + mergeMonthlyCostOsLicense(other.getMonthlyCostOsLicense()); + } + if (other.hasMonthlyCostNetworkEgress()) { + mergeMonthlyCostNetworkEgress(other.getMonthlyCostNetworkEgress()); + } + if (other.hasMonthlyCostStorage()) { + mergeMonthlyCostStorage(other.getMonthlyCostStorage()); + } + if (other.hasMonthlyCostOther()) { + mergeMonthlyCostOther(other.getMonthlyCostOther()); + } + if (other.hasComputeEngineFinding()) { + mergeComputeEngineFinding(other.getComputeEngineFinding()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getMachinePreferencesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getMonthlyCostTotalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getMonthlyCostComputeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getMonthlyCostOsLicenseFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + getMonthlyCostNetworkEgressFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage( + getMonthlyCostStorageFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage( + getMonthlyCostOtherFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage( + getComputeEngineFindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+       * Display Name of the Preference Set
+       * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Display Name of the Preference Set
+       * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Display Name of the Preference Set
+       * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display Name of the Preference Set
+       * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Display Name of the Preference Set
+       * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * Description for the Preference Set.
+       * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Description for the Preference Set.
+       * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Description for the Preference Set.
+       * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Description for the Preference Set.
+       * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Description for the Preference Set.
+       * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.VirtualMachinePreferences machinePreferences_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder> + machinePreferencesBuilder_; + /** + * + * + *
+       * A set of preferences that applies to all machines in the context.
+       * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + * + * @return Whether the machinePreferences field is set. + */ + public boolean hasMachinePreferences() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * A set of preferences that applies to all machines in the context.
+       * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + * + * @return The machinePreferences. + */ + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferences getMachinePreferences() { + if (machinePreferencesBuilder_ == null) { + return machinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.getDefaultInstance() + : machinePreferences_; + } else { + return machinePreferencesBuilder_.getMessage(); + } + } + /** + * + * + *
+       * A set of preferences that applies to all machines in the context.
+       * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + */ + public Builder setMachinePreferences( + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences value) { + if (machinePreferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + machinePreferences_ = value; + } else { + machinePreferencesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * A set of preferences that applies to all machines in the context.
+       * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + */ + public Builder setMachinePreferences( + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder builderForValue) { + if (machinePreferencesBuilder_ == null) { + machinePreferences_ = builderForValue.build(); + } else { + machinePreferencesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * A set of preferences that applies to all machines in the context.
+       * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + */ + public Builder mergeMachinePreferences( + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences value) { + if (machinePreferencesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && machinePreferences_ != null + && machinePreferences_ + != com.google.cloud.migrationcenter.v1.VirtualMachinePreferences + .getDefaultInstance()) { + getMachinePreferencesBuilder().mergeFrom(value); + } else { + machinePreferences_ = value; + } + } else { + machinePreferencesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * A set of preferences that applies to all machines in the context.
+       * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + */ + public Builder clearMachinePreferences() { + bitField0_ = (bitField0_ & ~0x00000004); + machinePreferences_ = null; + if (machinePreferencesBuilder_ != null) { + machinePreferencesBuilder_.dispose(); + machinePreferencesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * A set of preferences that applies to all machines in the context.
+       * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + */ + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder + getMachinePreferencesBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMachinePreferencesFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A set of preferences that applies to all machines in the context.
+       * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + */ + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder + getMachinePreferencesOrBuilder() { + if (machinePreferencesBuilder_ != null) { + return machinePreferencesBuilder_.getMessageOrBuilder(); + } else { + return machinePreferences_ == null + ? com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.getDefaultInstance() + : machinePreferences_; + } + } + /** + * + * + *
+       * A set of preferences that applies to all machines in the context.
+       * 
+ * + * .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder> + getMachinePreferencesFieldBuilder() { + if (machinePreferencesBuilder_ == null) { + machinePreferencesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder>( + getMachinePreferences(), getParentForChildren(), isClean()); + machinePreferences_ = null; + } + return machinePreferencesBuilder_; + } + + private com.google.type.Money monthlyCostTotal_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + monthlyCostTotalBuilder_; + /** + * + * + *
+       * Total monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_total = 4; + * + * @return Whether the monthlyCostTotal field is set. + */ + public boolean hasMonthlyCostTotal() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Total monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_total = 4; + * + * @return The monthlyCostTotal. + */ + public com.google.type.Money getMonthlyCostTotal() { + if (monthlyCostTotalBuilder_ == null) { + return monthlyCostTotal_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostTotal_; + } else { + return monthlyCostTotalBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Total monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_total = 4; + */ + public Builder setMonthlyCostTotal(com.google.type.Money value) { + if (monthlyCostTotalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + monthlyCostTotal_ = value; + } else { + monthlyCostTotalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Total monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_total = 4; + */ + public Builder setMonthlyCostTotal(com.google.type.Money.Builder builderForValue) { + if (monthlyCostTotalBuilder_ == null) { + monthlyCostTotal_ = builderForValue.build(); + } else { + monthlyCostTotalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Total monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_total = 4; + */ + public Builder mergeMonthlyCostTotal(com.google.type.Money value) { + if (monthlyCostTotalBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && monthlyCostTotal_ != null + && monthlyCostTotal_ != com.google.type.Money.getDefaultInstance()) { + getMonthlyCostTotalBuilder().mergeFrom(value); + } else { + monthlyCostTotal_ = value; + } + } else { + monthlyCostTotalBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Total monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_total = 4; + */ + public Builder clearMonthlyCostTotal() { + bitField0_ = (bitField0_ & ~0x00000008); + monthlyCostTotal_ = null; + if (monthlyCostTotalBuilder_ != null) { + monthlyCostTotalBuilder_.dispose(); + monthlyCostTotalBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Total monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_total = 4; + */ + public com.google.type.Money.Builder getMonthlyCostTotalBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMonthlyCostTotalFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Total monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_total = 4; + */ + public com.google.type.MoneyOrBuilder getMonthlyCostTotalOrBuilder() { + if (monthlyCostTotalBuilder_ != null) { + return monthlyCostTotalBuilder_.getMessageOrBuilder(); + } else { + return monthlyCostTotal_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostTotal_; + } + } + /** + * + * + *
+       * Total monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_total = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getMonthlyCostTotalFieldBuilder() { + if (monthlyCostTotalBuilder_ == null) { + monthlyCostTotalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + getMonthlyCostTotal(), getParentForChildren(), isClean()); + monthlyCostTotal_ = null; + } + return monthlyCostTotalBuilder_; + } + + private com.google.type.Money monthlyCostCompute_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + monthlyCostComputeBuilder_; + /** + * + * + *
+       * Compute monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_compute = 5; + * + * @return Whether the monthlyCostCompute field is set. + */ + public boolean hasMonthlyCostCompute() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * Compute monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_compute = 5; + * + * @return The monthlyCostCompute. + */ + public com.google.type.Money getMonthlyCostCompute() { + if (monthlyCostComputeBuilder_ == null) { + return monthlyCostCompute_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostCompute_; + } else { + return monthlyCostComputeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Compute monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_compute = 5; + */ + public Builder setMonthlyCostCompute(com.google.type.Money value) { + if (monthlyCostComputeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + monthlyCostCompute_ = value; + } else { + monthlyCostComputeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Compute monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_compute = 5; + */ + public Builder setMonthlyCostCompute(com.google.type.Money.Builder builderForValue) { + if (monthlyCostComputeBuilder_ == null) { + monthlyCostCompute_ = builderForValue.build(); + } else { + monthlyCostComputeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Compute monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_compute = 5; + */ + public Builder mergeMonthlyCostCompute(com.google.type.Money value) { + if (monthlyCostComputeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && monthlyCostCompute_ != null + && monthlyCostCompute_ != com.google.type.Money.getDefaultInstance()) { + getMonthlyCostComputeBuilder().mergeFrom(value); + } else { + monthlyCostCompute_ = value; + } + } else { + monthlyCostComputeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Compute monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_compute = 5; + */ + public Builder clearMonthlyCostCompute() { + bitField0_ = (bitField0_ & ~0x00000010); + monthlyCostCompute_ = null; + if (monthlyCostComputeBuilder_ != null) { + monthlyCostComputeBuilder_.dispose(); + monthlyCostComputeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Compute monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_compute = 5; + */ + public com.google.type.Money.Builder getMonthlyCostComputeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMonthlyCostComputeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Compute monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_compute = 5; + */ + public com.google.type.MoneyOrBuilder getMonthlyCostComputeOrBuilder() { + if (monthlyCostComputeBuilder_ != null) { + return monthlyCostComputeBuilder_.getMessageOrBuilder(); + } else { + return monthlyCostCompute_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostCompute_; + } + } + /** + * + * + *
+       * Compute monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_compute = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getMonthlyCostComputeFieldBuilder() { + if (monthlyCostComputeBuilder_ == null) { + monthlyCostComputeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + getMonthlyCostCompute(), getParentForChildren(), isClean()); + monthlyCostCompute_ = null; + } + return monthlyCostComputeBuilder_; + } + + private com.google.type.Money monthlyCostOsLicense_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + monthlyCostOsLicenseBuilder_; + /** + * + * + *
+       * Licensing monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + * + * @return Whether the monthlyCostOsLicense field is set. + */ + public boolean hasMonthlyCostOsLicense() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * Licensing monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + * + * @return The monthlyCostOsLicense. + */ + public com.google.type.Money getMonthlyCostOsLicense() { + if (monthlyCostOsLicenseBuilder_ == null) { + return monthlyCostOsLicense_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostOsLicense_; + } else { + return monthlyCostOsLicenseBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Licensing monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + */ + public Builder setMonthlyCostOsLicense(com.google.type.Money value) { + if (monthlyCostOsLicenseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + monthlyCostOsLicense_ = value; + } else { + monthlyCostOsLicenseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Licensing monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + */ + public Builder setMonthlyCostOsLicense(com.google.type.Money.Builder builderForValue) { + if (monthlyCostOsLicenseBuilder_ == null) { + monthlyCostOsLicense_ = builderForValue.build(); + } else { + monthlyCostOsLicenseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Licensing monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + */ + public Builder mergeMonthlyCostOsLicense(com.google.type.Money value) { + if (monthlyCostOsLicenseBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && monthlyCostOsLicense_ != null + && monthlyCostOsLicense_ != com.google.type.Money.getDefaultInstance()) { + getMonthlyCostOsLicenseBuilder().mergeFrom(value); + } else { + monthlyCostOsLicense_ = value; + } + } else { + monthlyCostOsLicenseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Licensing monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + */ + public Builder clearMonthlyCostOsLicense() { + bitField0_ = (bitField0_ & ~0x00000020); + monthlyCostOsLicense_ = null; + if (monthlyCostOsLicenseBuilder_ != null) { + monthlyCostOsLicenseBuilder_.dispose(); + monthlyCostOsLicenseBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Licensing monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + */ + public com.google.type.Money.Builder getMonthlyCostOsLicenseBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getMonthlyCostOsLicenseFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Licensing monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + */ + public com.google.type.MoneyOrBuilder getMonthlyCostOsLicenseOrBuilder() { + if (monthlyCostOsLicenseBuilder_ != null) { + return monthlyCostOsLicenseBuilder_.getMessageOrBuilder(); + } else { + return monthlyCostOsLicense_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostOsLicense_; + } + } + /** + * + * + *
+       * Licensing monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_os_license = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getMonthlyCostOsLicenseFieldBuilder() { + if (monthlyCostOsLicenseBuilder_ == null) { + monthlyCostOsLicenseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + getMonthlyCostOsLicense(), getParentForChildren(), isClean()); + monthlyCostOsLicense_ = null; + } + return monthlyCostOsLicenseBuilder_; + } + + private com.google.type.Money monthlyCostNetworkEgress_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + monthlyCostNetworkEgressBuilder_; + /** + * + * + *
+       * Network Egress monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + * + * @return Whether the monthlyCostNetworkEgress field is set. + */ + public boolean hasMonthlyCostNetworkEgress() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+       * Network Egress monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + * + * @return The monthlyCostNetworkEgress. + */ + public com.google.type.Money getMonthlyCostNetworkEgress() { + if (monthlyCostNetworkEgressBuilder_ == null) { + return monthlyCostNetworkEgress_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostNetworkEgress_; + } else { + return monthlyCostNetworkEgressBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Network Egress monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + */ + public Builder setMonthlyCostNetworkEgress(com.google.type.Money value) { + if (monthlyCostNetworkEgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + monthlyCostNetworkEgress_ = value; + } else { + monthlyCostNetworkEgressBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Network Egress monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + */ + public Builder setMonthlyCostNetworkEgress(com.google.type.Money.Builder builderForValue) { + if (monthlyCostNetworkEgressBuilder_ == null) { + monthlyCostNetworkEgress_ = builderForValue.build(); + } else { + monthlyCostNetworkEgressBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Network Egress monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + */ + public Builder mergeMonthlyCostNetworkEgress(com.google.type.Money value) { + if (monthlyCostNetworkEgressBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && monthlyCostNetworkEgress_ != null + && monthlyCostNetworkEgress_ != com.google.type.Money.getDefaultInstance()) { + getMonthlyCostNetworkEgressBuilder().mergeFrom(value); + } else { + monthlyCostNetworkEgress_ = value; + } + } else { + monthlyCostNetworkEgressBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Network Egress monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + */ + public Builder clearMonthlyCostNetworkEgress() { + bitField0_ = (bitField0_ & ~0x00000040); + monthlyCostNetworkEgress_ = null; + if (monthlyCostNetworkEgressBuilder_ != null) { + monthlyCostNetworkEgressBuilder_.dispose(); + monthlyCostNetworkEgressBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Network Egress monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + */ + public com.google.type.Money.Builder getMonthlyCostNetworkEgressBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getMonthlyCostNetworkEgressFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Network Egress monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + */ + public com.google.type.MoneyOrBuilder getMonthlyCostNetworkEgressOrBuilder() { + if (monthlyCostNetworkEgressBuilder_ != null) { + return monthlyCostNetworkEgressBuilder_.getMessageOrBuilder(); + } else { + return monthlyCostNetworkEgress_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostNetworkEgress_; + } + } + /** + * + * + *
+       * Network Egress monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_network_egress = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getMonthlyCostNetworkEgressFieldBuilder() { + if (monthlyCostNetworkEgressBuilder_ == null) { + monthlyCostNetworkEgressBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + getMonthlyCostNetworkEgress(), getParentForChildren(), isClean()); + monthlyCostNetworkEgress_ = null; + } + return monthlyCostNetworkEgressBuilder_; + } + + private com.google.type.Money monthlyCostStorage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + monthlyCostStorageBuilder_; + /** + * + * + *
+       * Storage monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_storage = 8; + * + * @return Whether the monthlyCostStorage field is set. + */ + public boolean hasMonthlyCostStorage() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+       * Storage monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_storage = 8; + * + * @return The monthlyCostStorage. + */ + public com.google.type.Money getMonthlyCostStorage() { + if (monthlyCostStorageBuilder_ == null) { + return monthlyCostStorage_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostStorage_; + } else { + return monthlyCostStorageBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Storage monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_storage = 8; + */ + public Builder setMonthlyCostStorage(com.google.type.Money value) { + if (monthlyCostStorageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + monthlyCostStorage_ = value; + } else { + monthlyCostStorageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Storage monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_storage = 8; + */ + public Builder setMonthlyCostStorage(com.google.type.Money.Builder builderForValue) { + if (monthlyCostStorageBuilder_ == null) { + monthlyCostStorage_ = builderForValue.build(); + } else { + monthlyCostStorageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Storage monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_storage = 8; + */ + public Builder mergeMonthlyCostStorage(com.google.type.Money value) { + if (monthlyCostStorageBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && monthlyCostStorage_ != null + && monthlyCostStorage_ != com.google.type.Money.getDefaultInstance()) { + getMonthlyCostStorageBuilder().mergeFrom(value); + } else { + monthlyCostStorage_ = value; + } + } else { + monthlyCostStorageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Storage monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_storage = 8; + */ + public Builder clearMonthlyCostStorage() { + bitField0_ = (bitField0_ & ~0x00000080); + monthlyCostStorage_ = null; + if (monthlyCostStorageBuilder_ != null) { + monthlyCostStorageBuilder_.dispose(); + monthlyCostStorageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Storage monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_storage = 8; + */ + public com.google.type.Money.Builder getMonthlyCostStorageBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getMonthlyCostStorageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Storage monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_storage = 8; + */ + public com.google.type.MoneyOrBuilder getMonthlyCostStorageOrBuilder() { + if (monthlyCostStorageBuilder_ != null) { + return monthlyCostStorageBuilder_.getMessageOrBuilder(); + } else { + return monthlyCostStorage_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostStorage_; + } + } + /** + * + * + *
+       * Storage monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_storage = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getMonthlyCostStorageFieldBuilder() { + if (monthlyCostStorageBuilder_ == null) { + monthlyCostStorageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + getMonthlyCostStorage(), getParentForChildren(), isClean()); + monthlyCostStorage_ = null; + } + return monthlyCostStorageBuilder_; + } + + private com.google.type.Money monthlyCostOther_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + monthlyCostOtherBuilder_; + /** + * + * + *
+       * Miscellaneous monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_other = 9; + * + * @return Whether the monthlyCostOther field is set. + */ + public boolean hasMonthlyCostOther() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+       * Miscellaneous monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_other = 9; + * + * @return The monthlyCostOther. + */ + public com.google.type.Money getMonthlyCostOther() { + if (monthlyCostOtherBuilder_ == null) { + return monthlyCostOther_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostOther_; + } else { + return monthlyCostOtherBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Miscellaneous monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_other = 9; + */ + public Builder setMonthlyCostOther(com.google.type.Money value) { + if (monthlyCostOtherBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + monthlyCostOther_ = value; + } else { + monthlyCostOtherBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+       * Miscellaneous monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_other = 9; + */ + public Builder setMonthlyCostOther(com.google.type.Money.Builder builderForValue) { + if (monthlyCostOtherBuilder_ == null) { + monthlyCostOther_ = builderForValue.build(); + } else { + monthlyCostOtherBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+       * Miscellaneous monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_other = 9; + */ + public Builder mergeMonthlyCostOther(com.google.type.Money value) { + if (monthlyCostOtherBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && monthlyCostOther_ != null + && monthlyCostOther_ != com.google.type.Money.getDefaultInstance()) { + getMonthlyCostOtherBuilder().mergeFrom(value); + } else { + monthlyCostOther_ = value; + } + } else { + monthlyCostOtherBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+       * Miscellaneous monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_other = 9; + */ + public Builder clearMonthlyCostOther() { + bitField0_ = (bitField0_ & ~0x00000100); + monthlyCostOther_ = null; + if (monthlyCostOtherBuilder_ != null) { + monthlyCostOtherBuilder_.dispose(); + monthlyCostOtherBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Miscellaneous monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_other = 9; + */ + public com.google.type.Money.Builder getMonthlyCostOtherBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getMonthlyCostOtherFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Miscellaneous monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_other = 9; + */ + public com.google.type.MoneyOrBuilder getMonthlyCostOtherOrBuilder() { + if (monthlyCostOtherBuilder_ != null) { + return monthlyCostOtherBuilder_.getMessageOrBuilder(); + } else { + return monthlyCostOther_ == null + ? com.google.type.Money.getDefaultInstance() + : monthlyCostOther_; + } + } + /** + * + * + *
+       * Miscellaneous monthly cost for this preference set.
+       * 
+ * + * .google.type.Money monthly_cost_other = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getMonthlyCostOtherFieldBuilder() { + if (monthlyCostOtherBuilder_ == null) { + monthlyCostOtherBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + getMonthlyCostOther(), getParentForChildren(), isClean()); + monthlyCostOther_ = null; + } + return monthlyCostOtherBuilder_; + } + + private com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + computeEngineFinding_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding, + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFindingOrBuilder> + computeEngineFindingBuilder_; + /** + * + * + *
+       * A set of findings that applies to Compute Engine machines in the input.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + * + * @return Whether the computeEngineFinding field is set. + */ + public boolean hasComputeEngineFinding() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+       * A set of findings that applies to Compute Engine machines in the input.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + * + * @return The computeEngineFinding. + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + getComputeEngineFinding() { + if (computeEngineFindingBuilder_ == null) { + return computeEngineFinding_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + .getDefaultInstance() + : computeEngineFinding_; + } else { + return computeEngineFindingBuilder_.getMessage(); + } + } + /** + * + * + *
+       * A set of findings that applies to Compute Engine machines in the input.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + */ + public Builder setComputeEngineFinding( + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding value) { + if (computeEngineFindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + computeEngineFinding_ = value; + } else { + computeEngineFindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+       * A set of findings that applies to Compute Engine machines in the input.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + */ + public Builder setComputeEngineFinding( + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.Builder + builderForValue) { + if (computeEngineFindingBuilder_ == null) { + computeEngineFinding_ = builderForValue.build(); + } else { + computeEngineFindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+       * A set of findings that applies to Compute Engine machines in the input.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + */ + public Builder mergeComputeEngineFinding( + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding value) { + if (computeEngineFindingBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && computeEngineFinding_ != null + && computeEngineFinding_ + != com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + .getDefaultInstance()) { + getComputeEngineFindingBuilder().mergeFrom(value); + } else { + computeEngineFinding_ = value; + } + } else { + computeEngineFindingBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+       * A set of findings that applies to Compute Engine machines in the input.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + */ + public Builder clearComputeEngineFinding() { + bitField0_ = (bitField0_ & ~0x00000200); + computeEngineFinding_ = null; + if (computeEngineFindingBuilder_ != null) { + computeEngineFindingBuilder_.dispose(); + computeEngineFindingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * A set of findings that applies to Compute Engine machines in the input.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.Builder + getComputeEngineFindingBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getComputeEngineFindingFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A set of findings that applies to Compute Engine machines in the input.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFindingOrBuilder + getComputeEngineFindingOrBuilder() { + if (computeEngineFindingBuilder_ != null) { + return computeEngineFindingBuilder_.getMessageOrBuilder(); + } else { + return computeEngineFinding_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + .getDefaultInstance() + : computeEngineFinding_; + } + } + /** + * + * + *
+       * A set of findings that applies to Compute Engine machines in the input.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding, + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFindingOrBuilder> + getComputeEngineFindingFieldBuilder() { + if (computeEngineFindingBuilder_ == null) { + computeEngineFindingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding, + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFindingOrBuilder>( + getComputeEngineFinding(), getParentForChildren(), isClean()); + computeEngineFinding_ = null; + } + return computeEngineFindingBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding) + private static final com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding(); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupPreferenceSetFinding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GroupFindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportSummary.GroupFinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Display Name for the Group.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+     * Display Name for the Group.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+     * Description for the Group.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * Description for the Group.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Summary statistics for all the assets in this group.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + * + * @return Whether the assetAggregateStats field is set. + */ + boolean hasAssetAggregateStats(); + /** + * + * + *
+     * Summary statistics for all the assets in this group.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + * + * @return The assetAggregateStats. + */ + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats getAssetAggregateStats(); + /** + * + * + *
+     * Summary statistics for all the assets in this group.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder + getAssetAggregateStatsOrBuilder(); + + /** + * + * + *
+     * Count of the number of assets in this group which are also included
+     * in another group within the same report.
+     * 
+ * + * int64 overlapping_asset_count = 4; + * + * @return The overlappingAssetCount. + */ + long getOverlappingAssetCount(); + + /** + * + * + *
+     * Findings for each of the PreferenceSets for this group.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + java.util.List + getPreferenceSetFindingsList(); + /** + * + * + *
+     * Findings for each of the PreferenceSets for this group.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + getPreferenceSetFindings(int index); + /** + * + * + *
+     * Findings for each of the PreferenceSets for this group.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + int getPreferenceSetFindingsCount(); + /** + * + * + *
+     * Findings for each of the PreferenceSets for this group.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary + .GroupPreferenceSetFindingOrBuilder> + getPreferenceSetFindingsOrBuilderList(); + /** + * + * + *
+     * Findings for each of the PreferenceSets for this group.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFindingOrBuilder + getPreferenceSetFindingsOrBuilder(int index); + } + /** + * + * + *
+   * Summary Findings for a specific Group.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.GroupFinding} + */ + public static final class GroupFinding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ReportSummary.GroupFinding) + GroupFindingOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupFinding.newBuilder() to construct. + private GroupFinding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GroupFinding() { + displayName_ = ""; + description_ = ""; + preferenceSetFindings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GroupFinding(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupFinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupFinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.class, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display Name for the Group.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+     * Display Name for the Group.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+     * Description for the Group.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * Description for the Group.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_AGGREGATE_STATS_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + assetAggregateStats_; + /** + * + * + *
+     * Summary statistics for all the assets in this group.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + * + * @return Whether the assetAggregateStats field is set. + */ + @java.lang.Override + public boolean hasAssetAggregateStats() { + return assetAggregateStats_ != null; + } + /** + * + * + *
+     * Summary statistics for all the assets in this group.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + * + * @return The assetAggregateStats. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + getAssetAggregateStats() { + return assetAggregateStats_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + .getDefaultInstance() + : assetAggregateStats_; + } + /** + * + * + *
+     * Summary statistics for all the assets in this group.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder + getAssetAggregateStatsOrBuilder() { + return assetAggregateStats_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + .getDefaultInstance() + : assetAggregateStats_; + } + + public static final int OVERLAPPING_ASSET_COUNT_FIELD_NUMBER = 4; + private long overlappingAssetCount_ = 0L; + /** + * + * + *
+     * Count of the number of assets in this group which are also included
+     * in another group within the same report.
+     * 
+ * + * int64 overlapping_asset_count = 4; + * + * @return The overlappingAssetCount. + */ + @java.lang.Override + public long getOverlappingAssetCount() { + return overlappingAssetCount_; + } + + public static final int PREFERENCE_SET_FINDINGS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding> + preferenceSetFindings_; + /** + * + * + *
+     * Findings for each of the PreferenceSets for this group.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding> + getPreferenceSetFindingsList() { + return preferenceSetFindings_; + } + /** + * + * + *
+     * Findings for each of the PreferenceSets for this group.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary + .GroupPreferenceSetFindingOrBuilder> + getPreferenceSetFindingsOrBuilderList() { + return preferenceSetFindings_; + } + /** + * + * + *
+     * Findings for each of the PreferenceSets for this group.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + @java.lang.Override + public int getPreferenceSetFindingsCount() { + return preferenceSetFindings_.size(); + } + /** + * + * + *
+     * Findings for each of the PreferenceSets for this group.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + getPreferenceSetFindings(int index) { + return preferenceSetFindings_.get(index); + } + /** + * + * + *
+     * Findings for each of the PreferenceSets for this group.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFindingOrBuilder + getPreferenceSetFindingsOrBuilder(int index) { + return preferenceSetFindings_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (assetAggregateStats_ != null) { + output.writeMessage(3, getAssetAggregateStats()); + } + if (overlappingAssetCount_ != 0L) { + output.writeInt64(4, overlappingAssetCount_); + } + for (int i = 0; i < preferenceSetFindings_.size(); i++) { + output.writeMessage(5, preferenceSetFindings_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (assetAggregateStats_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAssetAggregateStats()); + } + if (overlappingAssetCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, overlappingAssetCount_); + } + for (int i = 0; i < preferenceSetFindings_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, preferenceSetFindings_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding other = + (com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasAssetAggregateStats() != other.hasAssetAggregateStats()) return false; + if (hasAssetAggregateStats()) { + if (!getAssetAggregateStats().equals(other.getAssetAggregateStats())) return false; + } + if (getOverlappingAssetCount() != other.getOverlappingAssetCount()) return false; + if (!getPreferenceSetFindingsList().equals(other.getPreferenceSetFindingsList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasAssetAggregateStats()) { + hash = (37 * hash) + ASSET_AGGREGATE_STATS_FIELD_NUMBER; + hash = (53 * hash) + getAssetAggregateStats().hashCode(); + } + hash = (37 * hash) + OVERLAPPING_ASSET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOverlappingAssetCount()); + if (getPreferenceSetFindingsCount() > 0) { + hash = (37 * hash) + PREFERENCE_SET_FINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getPreferenceSetFindingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Summary Findings for a specific Group.
+     * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary.GroupFinding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportSummary.GroupFinding) + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupFinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupFinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.class, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + description_ = ""; + assetAggregateStats_ = null; + if (assetAggregateStatsBuilder_ != null) { + assetAggregateStatsBuilder_.dispose(); + assetAggregateStatsBuilder_ = null; + } + overlappingAssetCount_ = 0L; + if (preferenceSetFindingsBuilder_ == null) { + preferenceSetFindings_ = java.util.Collections.emptyList(); + } else { + preferenceSetFindings_ = null; + preferenceSetFindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_GroupFinding_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding build() { + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding buildPartial() { + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding result = + new com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding result) { + if (preferenceSetFindingsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + preferenceSetFindings_ = java.util.Collections.unmodifiableList(preferenceSetFindings_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.preferenceSetFindings_ = preferenceSetFindings_; + } else { + result.preferenceSetFindings_ = preferenceSetFindingsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.assetAggregateStats_ = + assetAggregateStatsBuilder_ == null + ? assetAggregateStats_ + : assetAggregateStatsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.overlappingAssetCount_ = overlappingAssetCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding other) { + if (other + == com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAssetAggregateStats()) { + mergeAssetAggregateStats(other.getAssetAggregateStats()); + } + if (other.getOverlappingAssetCount() != 0L) { + setOverlappingAssetCount(other.getOverlappingAssetCount()); + } + if (preferenceSetFindingsBuilder_ == null) { + if (!other.preferenceSetFindings_.isEmpty()) { + if (preferenceSetFindings_.isEmpty()) { + preferenceSetFindings_ = other.preferenceSetFindings_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensurePreferenceSetFindingsIsMutable(); + preferenceSetFindings_.addAll(other.preferenceSetFindings_); + } + onChanged(); + } + } else { + if (!other.preferenceSetFindings_.isEmpty()) { + if (preferenceSetFindingsBuilder_.isEmpty()) { + preferenceSetFindingsBuilder_.dispose(); + preferenceSetFindingsBuilder_ = null; + preferenceSetFindings_ = other.preferenceSetFindings_; + bitField0_ = (bitField0_ & ~0x00000010); + preferenceSetFindingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPreferenceSetFindingsFieldBuilder() + : null; + } else { + preferenceSetFindingsBuilder_.addAllMessages(other.preferenceSetFindings_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getAssetAggregateStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + overlappingAssetCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ReportSummary + .GroupPreferenceSetFinding.parser(), + extensionRegistry); + if (preferenceSetFindingsBuilder_ == null) { + ensurePreferenceSetFindingsIsMutable(); + preferenceSetFindings_.add(m); + } else { + preferenceSetFindingsBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+       * Display Name for the Group.
+       * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Display Name for the Group.
+       * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Display Name for the Group.
+       * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display Name for the Group.
+       * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Display Name for the Group.
+       * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * Description for the Group.
+       * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Description for the Group.
+       * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Description for the Group.
+       * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Description for the Group.
+       * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Description for the Group.
+       * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + assetAggregateStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder> + assetAggregateStatsBuilder_; + /** + * + * + *
+       * Summary statistics for all the assets in this group.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + * + * @return Whether the assetAggregateStats field is set. + */ + public boolean hasAssetAggregateStats() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Summary statistics for all the assets in this group.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + * + * @return The assetAggregateStats. + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + getAssetAggregateStats() { + if (assetAggregateStatsBuilder_ == null) { + return assetAggregateStats_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + .getDefaultInstance() + : assetAggregateStats_; + } else { + return assetAggregateStatsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Summary statistics for all the assets in this group.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + */ + public Builder setAssetAggregateStats( + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats value) { + if (assetAggregateStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + assetAggregateStats_ = value; + } else { + assetAggregateStatsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Summary statistics for all the assets in this group.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + */ + public Builder setAssetAggregateStats( + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder + builderForValue) { + if (assetAggregateStatsBuilder_ == null) { + assetAggregateStats_ = builderForValue.build(); + } else { + assetAggregateStatsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Summary statistics for all the assets in this group.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + */ + public Builder mergeAssetAggregateStats( + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats value) { + if (assetAggregateStatsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && assetAggregateStats_ != null + && assetAggregateStats_ + != com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + .getDefaultInstance()) { + getAssetAggregateStatsBuilder().mergeFrom(value); + } else { + assetAggregateStats_ = value; + } + } else { + assetAggregateStatsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Summary statistics for all the assets in this group.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + */ + public Builder clearAssetAggregateStats() { + bitField0_ = (bitField0_ & ~0x00000004); + assetAggregateStats_ = null; + if (assetAggregateStatsBuilder_ != null) { + assetAggregateStatsBuilder_.dispose(); + assetAggregateStatsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Summary statistics for all the assets in this group.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder + getAssetAggregateStatsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAssetAggregateStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Summary statistics for all the assets in this group.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder + getAssetAggregateStatsOrBuilder() { + if (assetAggregateStatsBuilder_ != null) { + return assetAggregateStatsBuilder_.getMessageOrBuilder(); + } else { + return assetAggregateStats_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + .getDefaultInstance() + : assetAggregateStats_; + } + } + /** + * + * + *
+       * Summary statistics for all the assets in this group.
+       * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder> + getAssetAggregateStatsFieldBuilder() { + if (assetAggregateStatsBuilder_ == null) { + assetAggregateStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder>( + getAssetAggregateStats(), getParentForChildren(), isClean()); + assetAggregateStats_ = null; + } + return assetAggregateStatsBuilder_; + } + + private long overlappingAssetCount_; + /** + * + * + *
+       * Count of the number of assets in this group which are also included
+       * in another group within the same report.
+       * 
+ * + * int64 overlapping_asset_count = 4; + * + * @return The overlappingAssetCount. + */ + @java.lang.Override + public long getOverlappingAssetCount() { + return overlappingAssetCount_; + } + /** + * + * + *
+       * Count of the number of assets in this group which are also included
+       * in another group within the same report.
+       * 
+ * + * int64 overlapping_asset_count = 4; + * + * @param value The overlappingAssetCount to set. + * @return This builder for chaining. + */ + public Builder setOverlappingAssetCount(long value) { + + overlappingAssetCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Count of the number of assets in this group which are also included
+       * in another group within the same report.
+       * 
+ * + * int64 overlapping_asset_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearOverlappingAssetCount() { + bitField0_ = (bitField0_ & ~0x00000008); + overlappingAssetCount_ = 0L; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding> + preferenceSetFindings_ = java.util.Collections.emptyList(); + + private void ensurePreferenceSetFindingsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + preferenceSetFindings_ = + new java.util.ArrayList< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding>( + preferenceSetFindings_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFindingOrBuilder> + preferenceSetFindingsBuilder_; + + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding> + getPreferenceSetFindingsList() { + if (preferenceSetFindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(preferenceSetFindings_); + } else { + return preferenceSetFindingsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public int getPreferenceSetFindingsCount() { + if (preferenceSetFindingsBuilder_ == null) { + return preferenceSetFindings_.size(); + } else { + return preferenceSetFindingsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + getPreferenceSetFindings(int index) { + if (preferenceSetFindingsBuilder_ == null) { + return preferenceSetFindings_.get(index); + } else { + return preferenceSetFindingsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public Builder setPreferenceSetFindings( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding value) { + if (preferenceSetFindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePreferenceSetFindingsIsMutable(); + preferenceSetFindings_.set(index, value); + onChanged(); + } else { + preferenceSetFindingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public Builder setPreferenceSetFindings( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.Builder + builderForValue) { + if (preferenceSetFindingsBuilder_ == null) { + ensurePreferenceSetFindingsIsMutable(); + preferenceSetFindings_.set(index, builderForValue.build()); + onChanged(); + } else { + preferenceSetFindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public Builder addPreferenceSetFindings( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding value) { + if (preferenceSetFindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePreferenceSetFindingsIsMutable(); + preferenceSetFindings_.add(value); + onChanged(); + } else { + preferenceSetFindingsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public Builder addPreferenceSetFindings( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding value) { + if (preferenceSetFindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePreferenceSetFindingsIsMutable(); + preferenceSetFindings_.add(index, value); + onChanged(); + } else { + preferenceSetFindingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public Builder addPreferenceSetFindings( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.Builder + builderForValue) { + if (preferenceSetFindingsBuilder_ == null) { + ensurePreferenceSetFindingsIsMutable(); + preferenceSetFindings_.add(builderForValue.build()); + onChanged(); + } else { + preferenceSetFindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public Builder addPreferenceSetFindings( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.Builder + builderForValue) { + if (preferenceSetFindingsBuilder_ == null) { + ensurePreferenceSetFindingsIsMutable(); + preferenceSetFindings_.add(index, builderForValue.build()); + onChanged(); + } else { + preferenceSetFindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public Builder addAllPreferenceSetFindings( + java.lang.Iterable< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding> + values) { + if (preferenceSetFindingsBuilder_ == null) { + ensurePreferenceSetFindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, preferenceSetFindings_); + onChanged(); + } else { + preferenceSetFindingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public Builder clearPreferenceSetFindings() { + if (preferenceSetFindingsBuilder_ == null) { + preferenceSetFindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + preferenceSetFindingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public Builder removePreferenceSetFindings(int index) { + if (preferenceSetFindingsBuilder_ == null) { + ensurePreferenceSetFindingsIsMutable(); + preferenceSetFindings_.remove(index); + onChanged(); + } else { + preferenceSetFindingsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.Builder + getPreferenceSetFindingsBuilder(int index) { + return getPreferenceSetFindingsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFindingOrBuilder + getPreferenceSetFindingsOrBuilder(int index) { + if (preferenceSetFindingsBuilder_ == null) { + return preferenceSetFindings_.get(index); + } else { + return preferenceSetFindingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public java.util.List< + ? extends + com.google.cloud.migrationcenter.v1.ReportSummary + .GroupPreferenceSetFindingOrBuilder> + getPreferenceSetFindingsOrBuilderList() { + if (preferenceSetFindingsBuilder_ != null) { + return preferenceSetFindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(preferenceSetFindings_); + } + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.Builder + addPreferenceSetFindingsBuilder() { + return getPreferenceSetFindingsFieldBuilder() + .addBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + .getDefaultInstance()); + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.Builder + addPreferenceSetFindingsBuilder(int index) { + return getPreferenceSetFindingsFieldBuilder() + .addBuilder( + index, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + .getDefaultInstance()); + } + /** + * + * + *
+       * Findings for each of the PreferenceSets for this group.
+       * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * + */ + public java.util.List< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.Builder> + getPreferenceSetFindingsBuilderList() { + return getPreferenceSetFindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFindingOrBuilder> + getPreferenceSetFindingsFieldBuilder() { + if (preferenceSetFindingsBuilder_ == null) { + preferenceSetFindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + .Builder, + com.google.cloud.migrationcenter.v1.ReportSummary + .GroupPreferenceSetFindingOrBuilder>( + preferenceSetFindings_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + preferenceSetFindings_ = null; + } + return preferenceSetFindingsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportSummary.GroupFinding) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportSummary.GroupFinding) + private static final com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding(); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupFinding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ALL_ASSETS_STATS_FIELD_NUMBER = 1; + private com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats allAssetsStats_; + /** + * + * + *
+   * Aggregate statistics for all the assets across all the groups.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + * + * @return Whether the allAssetsStats field is set. + */ + @java.lang.Override + public boolean hasAllAssetsStats() { + return allAssetsStats_ != null; + } + /** + * + * + *
+   * Aggregate statistics for all the assets across all the groups.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + * + * @return The allAssetsStats. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats getAllAssetsStats() { + return allAssetsStats_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.getDefaultInstance() + : allAssetsStats_; + } + /** + * + * + *
+   * Aggregate statistics for all the assets across all the groups.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder + getAllAssetsStatsOrBuilder() { + return allAssetsStats_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.getDefaultInstance() + : allAssetsStats_; + } + + public static final int GROUP_FINDINGS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + groupFindings_; + /** + * + * + *
+   * Findings for each Group included in this report.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + @java.lang.Override + public java.util.List + getGroupFindingsList() { + return groupFindings_; + } + /** + * + * + *
+   * Findings for each Group included in this report.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.migrationcenter.v1.ReportSummary.GroupFindingOrBuilder> + getGroupFindingsOrBuilderList() { + return groupFindings_; + } + /** + * + * + *
+   * Findings for each Group included in this report.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + @java.lang.Override + public int getGroupFindingsCount() { + return groupFindings_.size(); + } + /** + * + * + *
+   * Findings for each Group included in this report.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding getGroupFindings( + int index) { + return groupFindings_.get(index); + } + /** + * + * + *
+   * Findings for each Group included in this report.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupFindingOrBuilder + getGroupFindingsOrBuilder(int index) { + return groupFindings_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (allAssetsStats_ != null) { + output.writeMessage(1, getAllAssetsStats()); + } + for (int i = 0; i < groupFindings_.size(); i++) { + output.writeMessage(2, groupFindings_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (allAssetsStats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAllAssetsStats()); + } + for (int i = 0; i < groupFindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, groupFindings_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ReportSummary)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ReportSummary other = + (com.google.cloud.migrationcenter.v1.ReportSummary) obj; + + if (hasAllAssetsStats() != other.hasAllAssetsStats()) return false; + if (hasAllAssetsStats()) { + if (!getAllAssetsStats().equals(other.getAllAssetsStats())) return false; + } + if (!getGroupFindingsList().equals(other.getGroupFindingsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAllAssetsStats()) { + hash = (37 * hash) + ALL_ASSETS_STATS_FIELD_NUMBER; + hash = (53 * hash) + getAllAssetsStats().hashCode(); + } + if (getGroupFindingsCount() > 0) { + hash = (37 * hash) + GROUP_FINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getGroupFindingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.ReportSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes the Summary view of a Report, which contains aggregated values
+   * for all the groups and preference sets included in this Report.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ReportSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ReportSummary) + com.google.cloud.migrationcenter.v1.ReportSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ReportSummary.class, + com.google.cloud.migrationcenter.v1.ReportSummary.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ReportSummary.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + allAssetsStats_ = null; + if (allAssetsStatsBuilder_ != null) { + allAssetsStatsBuilder_.dispose(); + allAssetsStatsBuilder_ = null; + } + if (groupFindingsBuilder_ == null) { + groupFindings_ = java.util.Collections.emptyList(); + } else { + groupFindings_ = null; + groupFindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ReportSummary_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ReportSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary build() { + com.google.cloud.migrationcenter.v1.ReportSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary buildPartial() { + com.google.cloud.migrationcenter.v1.ReportSummary result = + new com.google.cloud.migrationcenter.v1.ReportSummary(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ReportSummary result) { + if (groupFindingsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + groupFindings_ = java.util.Collections.unmodifiableList(groupFindings_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.groupFindings_ = groupFindings_; + } else { + result.groupFindings_ = groupFindingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ReportSummary result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.allAssetsStats_ = + allAssetsStatsBuilder_ == null ? allAssetsStats_ : allAssetsStatsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ReportSummary) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ReportSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ReportSummary other) { + if (other == com.google.cloud.migrationcenter.v1.ReportSummary.getDefaultInstance()) + return this; + if (other.hasAllAssetsStats()) { + mergeAllAssetsStats(other.getAllAssetsStats()); + } + if (groupFindingsBuilder_ == null) { + if (!other.groupFindings_.isEmpty()) { + if (groupFindings_.isEmpty()) { + groupFindings_ = other.groupFindings_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureGroupFindingsIsMutable(); + groupFindings_.addAll(other.groupFindings_); + } + onChanged(); + } + } else { + if (!other.groupFindings_.isEmpty()) { + if (groupFindingsBuilder_.isEmpty()) { + groupFindingsBuilder_.dispose(); + groupFindingsBuilder_ = null; + groupFindings_ = other.groupFindings_; + bitField0_ = (bitField0_ & ~0x00000002); + groupFindingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGroupFindingsFieldBuilder() + : null; + } else { + groupFindingsBuilder_.addAllMessages(other.groupFindings_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAllAssetsStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.parser(), + extensionRegistry); + if (groupFindingsBuilder_ == null) { + ensureGroupFindingsIsMutable(); + groupFindings_.add(m); + } else { + groupFindingsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats allAssetsStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder> + allAssetsStatsBuilder_; + /** + * + * + *
+     * Aggregate statistics for all the assets across all the groups.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + * + * @return Whether the allAssetsStats field is set. + */ + public boolean hasAllAssetsStats() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Aggregate statistics for all the assets across all the groups.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + * + * @return The allAssetsStats. + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + getAllAssetsStats() { + if (allAssetsStatsBuilder_ == null) { + return allAssetsStats_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + .getDefaultInstance() + : allAssetsStats_; + } else { + return allAssetsStatsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Aggregate statistics for all the assets across all the groups.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + */ + public Builder setAllAssetsStats( + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats value) { + if (allAssetsStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + allAssetsStats_ = value; + } else { + allAssetsStatsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregate statistics for all the assets across all the groups.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + */ + public Builder setAllAssetsStats( + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder + builderForValue) { + if (allAssetsStatsBuilder_ == null) { + allAssetsStats_ = builderForValue.build(); + } else { + allAssetsStatsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregate statistics for all the assets across all the groups.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + */ + public Builder mergeAllAssetsStats( + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats value) { + if (allAssetsStatsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && allAssetsStats_ != null + && allAssetsStats_ + != com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + .getDefaultInstance()) { + getAllAssetsStatsBuilder().mergeFrom(value); + } else { + allAssetsStats_ = value; + } + } else { + allAssetsStatsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregate statistics for all the assets across all the groups.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + */ + public Builder clearAllAssetsStats() { + bitField0_ = (bitField0_ & ~0x00000001); + allAssetsStats_ = null; + if (allAssetsStatsBuilder_ != null) { + allAssetsStatsBuilder_.dispose(); + allAssetsStatsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregate statistics for all the assets across all the groups.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder + getAllAssetsStatsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAllAssetsStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Aggregate statistics for all the assets across all the groups.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder + getAllAssetsStatsOrBuilder() { + if (allAssetsStatsBuilder_ != null) { + return allAssetsStatsBuilder_.getMessageOrBuilder(); + } else { + return allAssetsStats_ == null + ? com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + .getDefaultInstance() + : allAssetsStats_; + } + } + /** + * + * + *
+     * Aggregate statistics for all the assets across all the groups.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder> + getAllAssetsStatsFieldBuilder() { + if (allAssetsStatsBuilder_ == null) { + allAssetsStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder>( + getAllAssetsStats(), getParentForChildren(), isClean()); + allAssetsStats_ = null; + } + return allAssetsStatsBuilder_; + } + + private java.util.List + groupFindings_ = java.util.Collections.emptyList(); + + private void ensureGroupFindingsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + groupFindings_ = + new java.util.ArrayList( + groupFindings_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFindingOrBuilder> + groupFindingsBuilder_; + + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public java.util.List + getGroupFindingsList() { + if (groupFindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupFindings_); + } else { + return groupFindingsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public int getGroupFindingsCount() { + if (groupFindingsBuilder_ == null) { + return groupFindings_.size(); + } else { + return groupFindingsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding getGroupFindings( + int index) { + if (groupFindingsBuilder_ == null) { + return groupFindings_.get(index); + } else { + return groupFindingsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public Builder setGroupFindings( + int index, com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding value) { + if (groupFindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupFindingsIsMutable(); + groupFindings_.set(index, value); + onChanged(); + } else { + groupFindingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public Builder setGroupFindings( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.Builder builderForValue) { + if (groupFindingsBuilder_ == null) { + ensureGroupFindingsIsMutable(); + groupFindings_.set(index, builderForValue.build()); + onChanged(); + } else { + groupFindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public Builder addGroupFindings( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding value) { + if (groupFindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupFindingsIsMutable(); + groupFindings_.add(value); + onChanged(); + } else { + groupFindingsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public Builder addGroupFindings( + int index, com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding value) { + if (groupFindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupFindingsIsMutable(); + groupFindings_.add(index, value); + onChanged(); + } else { + groupFindingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public Builder addGroupFindings( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.Builder builderForValue) { + if (groupFindingsBuilder_ == null) { + ensureGroupFindingsIsMutable(); + groupFindings_.add(builderForValue.build()); + onChanged(); + } else { + groupFindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public Builder addGroupFindings( + int index, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.Builder builderForValue) { + if (groupFindingsBuilder_ == null) { + ensureGroupFindingsIsMutable(); + groupFindings_.add(index, builderForValue.build()); + onChanged(); + } else { + groupFindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public Builder addAllGroupFindings( + java.lang.Iterable + values) { + if (groupFindingsBuilder_ == null) { + ensureGroupFindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groupFindings_); + onChanged(); + } else { + groupFindingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public Builder clearGroupFindings() { + if (groupFindingsBuilder_ == null) { + groupFindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + groupFindingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public Builder removeGroupFindings(int index) { + if (groupFindingsBuilder_ == null) { + ensureGroupFindingsIsMutable(); + groupFindings_.remove(index); + onChanged(); + } else { + groupFindingsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.Builder + getGroupFindingsBuilder(int index) { + return getGroupFindingsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupFindingOrBuilder + getGroupFindingsOrBuilder(int index) { + if (groupFindingsBuilder_ == null) { + return groupFindings_.get(index); + } else { + return groupFindingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.migrationcenter.v1.ReportSummary.GroupFindingOrBuilder> + getGroupFindingsOrBuilderList() { + if (groupFindingsBuilder_ != null) { + return groupFindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupFindings_); + } + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.Builder + addGroupFindingsBuilder() { + return getGroupFindingsFieldBuilder() + .addBuilder( + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.getDefaultInstance()); + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.Builder + addGroupFindingsBuilder(int index) { + return getGroupFindingsFieldBuilder() + .addBuilder( + index, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.getDefaultInstance()); + } + /** + * + * + *
+     * Findings for each Group included in this report.
+     * 
+ * + * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + public java.util.List + getGroupFindingsBuilderList() { + return getGroupFindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFindingOrBuilder> + getGroupFindingsFieldBuilder() { + if (groupFindingsBuilder_ == null) { + groupFindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding.Builder, + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFindingOrBuilder>( + groupFindings_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + groupFindings_ = null; + } + return groupFindingsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ReportSummary) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ReportSummary) + private static final com.google.cloud.migrationcenter.v1.ReportSummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ReportSummary(); + } + + public static com.google.cloud.migrationcenter.v1.ReportSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ReportSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportSummaryOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportSummaryOrBuilder.java new file mode 100644 index 000000000000..517b729a256a --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportSummaryOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ReportSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ReportSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Aggregate statistics for all the assets across all the groups.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + * + * @return Whether the allAssetsStats field is set. + */ + boolean hasAllAssetsStats(); + /** + * + * + *
+   * Aggregate statistics for all the assets across all the groups.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + * + * @return The allAssetsStats. + */ + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats getAllAssetsStats(); + /** + * + * + *
+   * Aggregate statistics for all the assets across all the groups.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStatsOrBuilder + getAllAssetsStatsOrBuilder(); + + /** + * + * + *
+   * Findings for each Group included in this report.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + java.util.List + getGroupFindingsList(); + /** + * + * + *
+   * Findings for each Group included in this report.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFinding getGroupFindings(int index); + /** + * + * + *
+   * Findings for each Group included in this report.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + int getGroupFindingsCount(); + /** + * + * + *
+   * Findings for each Group included in this report.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + java.util.List + getGroupFindingsOrBuilderList(); + /** + * + * + *
+   * Findings for each Group included in this report.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * + */ + com.google.cloud.migrationcenter.v1.ReportSummary.GroupFindingOrBuilder getGroupFindingsOrBuilder( + int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportView.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportView.java new file mode 100644 index 000000000000..7716a80941d9 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ReportView.java @@ -0,0 +1,209 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Specifies the types of views that provide complete or partial details
+ * of a Report.
+ * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.ReportView} + */ +public enum ReportView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The report view is not specified. The API displays the basic view by
+   * default.
+   * 
+ * + * REPORT_VIEW_UNSPECIFIED = 0; + */ + REPORT_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * The report view includes only basic metadata of the Report. Useful for
+   * list views.
+   * 
+ * + * REPORT_VIEW_BASIC = 1; + */ + REPORT_VIEW_BASIC(1), + /** + * + * + *
+   * The report view includes all the metadata of the Report. Useful for
+   * preview.
+   * 
+ * + * REPORT_VIEW_FULL = 2; + */ + REPORT_VIEW_FULL(2), + /** + * + * + *
+   * The report view includes the standard metadata of an report. Useful for
+   * detail view.
+   * 
+ * + * REPORT_VIEW_STANDARD = 3; + */ + REPORT_VIEW_STANDARD(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The report view is not specified. The API displays the basic view by
+   * default.
+   * 
+ * + * REPORT_VIEW_UNSPECIFIED = 0; + */ + public static final int REPORT_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The report view includes only basic metadata of the Report. Useful for
+   * list views.
+   * 
+ * + * REPORT_VIEW_BASIC = 1; + */ + public static final int REPORT_VIEW_BASIC_VALUE = 1; + /** + * + * + *
+   * The report view includes all the metadata of the Report. Useful for
+   * preview.
+   * 
+ * + * REPORT_VIEW_FULL = 2; + */ + public static final int REPORT_VIEW_FULL_VALUE = 2; + /** + * + * + *
+   * The report view includes the standard metadata of an report. Useful for
+   * detail view.
+   * 
+ * + * REPORT_VIEW_STANDARD = 3; + */ + public static final int REPORT_VIEW_STANDARD_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ReportView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ReportView forNumber(int value) { + switch (value) { + case 0: + return REPORT_VIEW_UNSPECIFIED; + case 1: + return REPORT_VIEW_BASIC; + case 2: + return REPORT_VIEW_FULL; + case 3: + return REPORT_VIEW_STANDARD; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ReportView findValueByNumber(int number) { + return ReportView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto.getDescriptor() + .getEnumTypes() + .get(9); + } + + private static final ReportView[] VALUES = values(); + + public static ReportView valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ReportView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.ReportView) +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunImportJobRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunImportJobRequest.java new file mode 100644 index 000000000000..1802ec80b8c1 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunImportJobRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to run an import job.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RunImportJobRequest} + */ +public final class RunImportJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.RunImportJobRequest) + RunImportJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunImportJobRequest.newBuilder() to construct. + private RunImportJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunImportJobRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunImportJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RunImportJobRequest.class, + com.google.cloud.migrationcenter.v1.RunImportJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the import job to run.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the import job to run.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.RunImportJobRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.RunImportJobRequest other = + (com.google.cloud.migrationcenter.v1.RunImportJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.RunImportJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to run an import job.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RunImportJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.RunImportJobRequest) + com.google.cloud.migrationcenter.v1.RunImportJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RunImportJobRequest.class, + com.google.cloud.migrationcenter.v1.RunImportJobRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.RunImportJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunImportJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunImportJobRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.RunImportJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunImportJobRequest build() { + com.google.cloud.migrationcenter.v1.RunImportJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunImportJobRequest buildPartial() { + com.google.cloud.migrationcenter.v1.RunImportJobRequest result = + new com.google.cloud.migrationcenter.v1.RunImportJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.RunImportJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.RunImportJobRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.RunImportJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.RunImportJobRequest other) { + if (other == com.google.cloud.migrationcenter.v1.RunImportJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the import job to run.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the import job to run.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the import job to run.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the import job to run.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the import job to run.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.RunImportJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.RunImportJobRequest) + private static final com.google.cloud.migrationcenter.v1.RunImportJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.RunImportJobRequest(); + } + + public static com.google.cloud.migrationcenter.v1.RunImportJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunImportJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunImportJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunImportJobRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunImportJobRequestOrBuilder.java new file mode 100644 index 000000000000..1cfe8920ef7c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunImportJobRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface RunImportJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.RunImportJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the import job to run.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the import job to run.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcess.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcess.java new file mode 100644 index 000000000000..b01321e4c999 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcess.java @@ -0,0 +1,1416 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Guest OS running process details.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RunningProcess} + */ +public final class RunningProcess extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.RunningProcess) + RunningProcessOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunningProcess.newBuilder() to construct. + private RunningProcess(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunningProcess() { + exePath_ = ""; + cmdline_ = ""; + user_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunningProcess(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningProcess_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 100: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningProcess_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RunningProcess.class, + com.google.cloud.migrationcenter.v1.RunningProcess.Builder.class); + } + + public static final int PID_FIELD_NUMBER = 1; + private long pid_ = 0L; + /** + * + * + *
+   * Process ID.
+   * 
+ * + * int64 pid = 1; + * + * @return The pid. + */ + @java.lang.Override + public long getPid() { + return pid_; + } + + public static final int EXE_PATH_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object exePath_ = ""; + /** + * + * + *
+   * Process binary path.
+   * 
+ * + * string exe_path = 2; + * + * @return The exePath. + */ + @java.lang.Override + public java.lang.String getExePath() { + java.lang.Object ref = exePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + exePath_ = s; + return s; + } + } + /** + * + * + *
+   * Process binary path.
+   * 
+ * + * string exe_path = 2; + * + * @return The bytes for exePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExePathBytes() { + java.lang.Object ref = exePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + exePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CMDLINE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object cmdline_ = ""; + /** + * + * + *
+   * Process full command line.
+   * 
+ * + * string cmdline = 3; + * + * @return The cmdline. + */ + @java.lang.Override + public java.lang.String getCmdline() { + java.lang.Object ref = cmdline_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cmdline_ = s; + return s; + } + } + /** + * + * + *
+   * Process full command line.
+   * 
+ * + * string cmdline = 3; + * + * @return The bytes for cmdline. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCmdlineBytes() { + java.lang.Object ref = cmdline_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cmdline_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object user_ = ""; + /** + * + * + *
+   * User running the process.
+   * 
+ * + * string user = 4; + * + * @return The user. + */ + @java.lang.Override + public java.lang.String getUser() { + java.lang.Object ref = user_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + user_ = s; + return s; + } + } + /** + * + * + *
+   * User running the process.
+   * 
+ * + * string user = 4; + * + * @return The bytes for user. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserBytes() { + java.lang.Object ref = user_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + user_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 100; + + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningProcess_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+   * Process extended attributes.
+   * 
+ * + * map<string, string> attributes = 100; + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+   * Process extended attributes.
+   * 
+ * + * map<string, string> attributes = 100; + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+   * Process extended attributes.
+   * 
+ * + * map<string, string> attributes = 100; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Process extended attributes.
+   * 
+ * + * map<string, string> attributes = 100; + */ + @java.lang.Override + public java.lang.String getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (pid_ != 0L) { + output.writeInt64(1, pid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exePath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, exePath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmdline_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, cmdline_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(user_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, user_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 100); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, pid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exePath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, exePath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmdline_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, cmdline_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(user_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, user_); + } + for (java.util.Map.Entry entry : + internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry attributes__ = + AttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(100, attributes__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.RunningProcess)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.RunningProcess other = + (com.google.cloud.migrationcenter.v1.RunningProcess) obj; + + if (getPid() != other.getPid()) return false; + if (!getExePath().equals(other.getExePath())) return false; + if (!getCmdline().equals(other.getCmdline())) return false; + if (!getUser().equals(other.getUser())) return false; + if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPid()); + hash = (37 * hash) + EXE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getExePath().hashCode(); + hash = (37 * hash) + CMDLINE_FIELD_NUMBER; + hash = (53 * hash) + getCmdline().hashCode(); + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.RunningProcess prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Guest OS running process details.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RunningProcess} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.RunningProcess) + com.google.cloud.migrationcenter.v1.RunningProcessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningProcess_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 100: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 100: + return internalGetMutableAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningProcess_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RunningProcess.class, + com.google.cloud.migrationcenter.v1.RunningProcess.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.RunningProcess.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pid_ = 0L; + exePath_ = ""; + cmdline_ = ""; + user_ = ""; + internalGetMutableAttributes().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningProcess_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcess getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.RunningProcess.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcess build() { + com.google.cloud.migrationcenter.v1.RunningProcess result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcess buildPartial() { + com.google.cloud.migrationcenter.v1.RunningProcess result = + new com.google.cloud.migrationcenter.v1.RunningProcess(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.RunningProcess result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pid_ = pid_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.exePath_ = exePath_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cmdline_ = cmdline_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.user_ = user_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.attributes_ = internalGetAttributes(); + result.attributes_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.RunningProcess) { + return mergeFrom((com.google.cloud.migrationcenter.v1.RunningProcess) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.RunningProcess other) { + if (other == com.google.cloud.migrationcenter.v1.RunningProcess.getDefaultInstance()) + return this; + if (other.getPid() != 0L) { + setPid(other.getPid()); + } + if (!other.getExePath().isEmpty()) { + exePath_ = other.exePath_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getCmdline().isEmpty()) { + cmdline_ = other.cmdline_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getUser().isEmpty()) { + user_ = other.user_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + bitField0_ |= 0x00000010; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + pid_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + exePath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + cmdline_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + user_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 802: + { + com.google.protobuf.MapEntry attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 802 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long pid_; + /** + * + * + *
+     * Process ID.
+     * 
+ * + * int64 pid = 1; + * + * @return The pid. + */ + @java.lang.Override + public long getPid() { + return pid_; + } + /** + * + * + *
+     * Process ID.
+     * 
+ * + * int64 pid = 1; + * + * @param value The pid to set. + * @return This builder for chaining. + */ + public Builder setPid(long value) { + + pid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Process ID.
+     * 
+ * + * int64 pid = 1; + * + * @return This builder for chaining. + */ + public Builder clearPid() { + bitField0_ = (bitField0_ & ~0x00000001); + pid_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object exePath_ = ""; + /** + * + * + *
+     * Process binary path.
+     * 
+ * + * string exe_path = 2; + * + * @return The exePath. + */ + public java.lang.String getExePath() { + java.lang.Object ref = exePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + exePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Process binary path.
+     * 
+ * + * string exe_path = 2; + * + * @return The bytes for exePath. + */ + public com.google.protobuf.ByteString getExePathBytes() { + java.lang.Object ref = exePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + exePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Process binary path.
+     * 
+ * + * string exe_path = 2; + * + * @param value The exePath to set. + * @return This builder for chaining. + */ + public Builder setExePath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + exePath_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Process binary path.
+     * 
+ * + * string exe_path = 2; + * + * @return This builder for chaining. + */ + public Builder clearExePath() { + exePath_ = getDefaultInstance().getExePath(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Process binary path.
+     * 
+ * + * string exe_path = 2; + * + * @param value The bytes for exePath to set. + * @return This builder for chaining. + */ + public Builder setExePathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + exePath_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object cmdline_ = ""; + /** + * + * + *
+     * Process full command line.
+     * 
+ * + * string cmdline = 3; + * + * @return The cmdline. + */ + public java.lang.String getCmdline() { + java.lang.Object ref = cmdline_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cmdline_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Process full command line.
+     * 
+ * + * string cmdline = 3; + * + * @return The bytes for cmdline. + */ + public com.google.protobuf.ByteString getCmdlineBytes() { + java.lang.Object ref = cmdline_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cmdline_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Process full command line.
+     * 
+ * + * string cmdline = 3; + * + * @param value The cmdline to set. + * @return This builder for chaining. + */ + public Builder setCmdline(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cmdline_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Process full command line.
+     * 
+ * + * string cmdline = 3; + * + * @return This builder for chaining. + */ + public Builder clearCmdline() { + cmdline_ = getDefaultInstance().getCmdline(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Process full command line.
+     * 
+ * + * string cmdline = 3; + * + * @param value The bytes for cmdline to set. + * @return This builder for chaining. + */ + public Builder setCmdlineBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cmdline_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object user_ = ""; + /** + * + * + *
+     * User running the process.
+     * 
+ * + * string user = 4; + * + * @return The user. + */ + public java.lang.String getUser() { + java.lang.Object ref = user_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + user_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User running the process.
+     * 
+ * + * string user = 4; + * + * @return The bytes for user. + */ + public com.google.protobuf.ByteString getUserBytes() { + java.lang.Object ref = user_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + user_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User running the process.
+     * 
+ * + * string user = 4; + * + * @param value The user to set. + * @return This builder for chaining. + */ + public Builder setUser(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * User running the process.
+     * 
+ * + * string user = 4; + * + * @return This builder for chaining. + */ + public Builder clearUser() { + user_ = getDefaultInstance().getUser(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * User running the process.
+     * 
+ * + * string user = 4; + * + * @param value The bytes for user to set. + * @return This builder for chaining. + */ + public Builder setUserBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + user_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + private com.google.protobuf.MapField + internalGetMutableAttributes() { + if (attributes_ == null) { + attributes_ = + com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); + } + if (!attributes_.isMutable()) { + attributes_ = attributes_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+     * Process extended attributes.
+     * 
+ * + * map<string, string> attributes = 100; + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+     * Process extended attributes.
+     * 
+ * + * map<string, string> attributes = 100; + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+     * Process extended attributes.
+     * 
+ * + * map<string, string> attributes = 100; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Process extended attributes.
+     * 
+ * + * map<string, string> attributes = 100; + */ + @java.lang.Override + public java.lang.String getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttributes() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAttributes().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Process extended attributes.
+     * 
+ * + * map<string, string> attributes = 100; + */ + public Builder removeAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAttributes().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAttributes() { + bitField0_ |= 0x00000010; + return internalGetMutableAttributes().getMutableMap(); + } + /** + * + * + *
+     * Process extended attributes.
+     * 
+ * + * map<string, string> attributes = 100; + */ + public Builder putAttributes(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAttributes().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
+     * Process extended attributes.
+     * 
+ * + * map<string, string> attributes = 100; + */ + public Builder putAllAttributes(java.util.Map values) { + internalGetMutableAttributes().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.RunningProcess) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.RunningProcess) + private static final com.google.cloud.migrationcenter.v1.RunningProcess DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.RunningProcess(); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcess getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunningProcess parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcess getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessList.java new file mode 100644 index 000000000000..fb09f0d68411 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessList.java @@ -0,0 +1,942 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * List of running guest OS processes.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RunningProcessList} + */ +public final class RunningProcessList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.RunningProcessList) + RunningProcessListOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunningProcessList.newBuilder() to construct. + private RunningProcessList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunningProcessList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunningProcessList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningProcessList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningProcessList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RunningProcessList.class, + com.google.cloud.migrationcenter.v1.RunningProcessList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * Running process entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Running process entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Running process entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Running process entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcess getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Running process entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcessOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.RunningProcessList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.RunningProcessList other = + (com.google.cloud.migrationcenter.v1.RunningProcessList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.RunningProcessList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List of running guest OS processes.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RunningProcessList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.RunningProcessList) + com.google.cloud.migrationcenter.v1.RunningProcessListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningProcessList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningProcessList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RunningProcessList.class, + com.google.cloud.migrationcenter.v1.RunningProcessList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.RunningProcessList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningProcessList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcessList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.RunningProcessList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcessList build() { + com.google.cloud.migrationcenter.v1.RunningProcessList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcessList buildPartial() { + com.google.cloud.migrationcenter.v1.RunningProcessList result = + new com.google.cloud.migrationcenter.v1.RunningProcessList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.RunningProcessList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.RunningProcessList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.RunningProcessList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.RunningProcessList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.RunningProcessList other) { + if (other == com.google.cloud.migrationcenter.v1.RunningProcessList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.RunningProcess m = + input.readMessage( + com.google.cloud.migrationcenter.v1.RunningProcess.parser(), + extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningProcess, + com.google.cloud.migrationcenter.v1.RunningProcess.Builder, + com.google.cloud.migrationcenter.v1.RunningProcessOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningProcess getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public Builder setEntries(int index, com.google.cloud.migrationcenter.v1.RunningProcess value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.RunningProcess.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.RunningProcess value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public Builder addEntries(int index, com.google.cloud.migrationcenter.v1.RunningProcess value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.RunningProcess.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.RunningProcess.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningProcess.Builder getEntriesBuilder(int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningProcessOrBuilder getEntriesOrBuilder( + int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningProcess.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.RunningProcess.getDefaultInstance()); + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningProcess.Builder addEntriesBuilder(int index) { + return getEntriesFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.RunningProcess.getDefaultInstance()); + } + /** + * + * + *
+     * Running process entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningProcess, + com.google.cloud.migrationcenter.v1.RunningProcess.Builder, + com.google.cloud.migrationcenter.v1.RunningProcessOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningProcess, + com.google.cloud.migrationcenter.v1.RunningProcess.Builder, + com.google.cloud.migrationcenter.v1.RunningProcessOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.RunningProcessList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.RunningProcessList) + private static final com.google.cloud.migrationcenter.v1.RunningProcessList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.RunningProcessList(); + } + + public static com.google.cloud.migrationcenter.v1.RunningProcessList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunningProcessList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningProcessList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessListOrBuilder.java new file mode 100644 index 000000000000..b3c01ef717a7 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface RunningProcessListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.RunningProcessList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Running process entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Running process entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + com.google.cloud.migrationcenter.v1.RunningProcess getEntries(int index); + /** + * + * + *
+   * Running process entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Running process entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Running process entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + com.google.cloud.migrationcenter.v1.RunningProcessOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessOrBuilder.java new file mode 100644 index 000000000000..c273a54c5f00 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningProcessOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface RunningProcessOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.RunningProcess) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Process ID.
+   * 
+ * + * int64 pid = 1; + * + * @return The pid. + */ + long getPid(); + + /** + * + * + *
+   * Process binary path.
+   * 
+ * + * string exe_path = 2; + * + * @return The exePath. + */ + java.lang.String getExePath(); + /** + * + * + *
+   * Process binary path.
+   * 
+ * + * string exe_path = 2; + * + * @return The bytes for exePath. + */ + com.google.protobuf.ByteString getExePathBytes(); + + /** + * + * + *
+   * Process full command line.
+   * 
+ * + * string cmdline = 3; + * + * @return The cmdline. + */ + java.lang.String getCmdline(); + /** + * + * + *
+   * Process full command line.
+   * 
+ * + * string cmdline = 3; + * + * @return The bytes for cmdline. + */ + com.google.protobuf.ByteString getCmdlineBytes(); + + /** + * + * + *
+   * User running the process.
+   * 
+ * + * string user = 4; + * + * @return The user. + */ + java.lang.String getUser(); + /** + * + * + *
+   * User running the process.
+   * 
+ * + * string user = 4; + * + * @return The bytes for user. + */ + com.google.protobuf.ByteString getUserBytes(); + + /** + * + * + *
+   * Process extended attributes.
+   * 
+ * + * map<string, string> attributes = 100; + */ + int getAttributesCount(); + /** + * + * + *
+   * Process extended attributes.
+   * 
+ * + * map<string, string> attributes = 100; + */ + boolean containsAttributes(java.lang.String key); + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAttributes(); + /** + * + * + *
+   * Process extended attributes.
+   * 
+ * + * map<string, string> attributes = 100; + */ + java.util.Map getAttributesMap(); + /** + * + * + *
+   * Process extended attributes.
+   * 
+ * + * map<string, string> attributes = 100; + */ + /* nullable */ + java.lang.String getAttributesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Process extended attributes.
+   * 
+ * + * map<string, string> attributes = 100; + */ + java.lang.String getAttributesOrThrow(java.lang.String key); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningService.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningService.java new file mode 100644 index 000000000000..4c977427febe --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningService.java @@ -0,0 +1,1798 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Guest OS running service details.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RunningService} + */ +public final class RunningService extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.RunningService) + RunningServiceOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunningService.newBuilder() to construct. + private RunningService(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunningService() { + serviceName_ = ""; + state_ = 0; + startMode_ = 0; + exePath_ = ""; + cmdline_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunningService(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RunningService.class, + com.google.cloud.migrationcenter.v1.RunningService.Builder.class); + } + + /** + * + * + *
+   * Service state (OS-agnostic).
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.RunningService.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Service state unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Service is active.
+     * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+     * Service is paused.
+     * 
+ * + * PAUSED = 2; + */ + PAUSED(2), + /** + * + * + *
+     * Service is stopped.
+     * 
+ * + * STOPPED = 3; + */ + STOPPED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Service state unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Service is active.
+     * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + * + * + *
+     * Service is paused.
+     * 
+ * + * PAUSED = 2; + */ + public static final int PAUSED_VALUE = 2; + /** + * + * + *
+     * Service is stopped.
+     * 
+ * + * STOPPED = 3; + */ + public static final int STOPPED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return PAUSED; + case 3: + return STOPPED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.RunningService.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.RunningService.State) + } + + /** + * + * + *
+   * Service start mode (OS-agnostic).
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.RunningService.StartMode} + */ + public enum StartMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Start mode unspecified.
+     * 
+ * + * START_MODE_UNSPECIFIED = 0; + */ + START_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * The service is a device driver started by the system loader.
+     * 
+ * + * BOOT = 1; + */ + BOOT(1), + /** + * + * + *
+     * The service is a device driver started by the IOInitSystem function.
+     * 
+ * + * SYSTEM = 2; + */ + SYSTEM(2), + /** + * + * + *
+     * The service is started by the operating system, at system start-up
+     * 
+ * + * AUTO = 3; + */ + AUTO(3), + /** + * + * + *
+     * The service is started only manually, by a user.
+     * 
+ * + * MANUAL = 4; + */ + MANUAL(4), + /** + * + * + *
+     * The service is disabled.
+     * 
+ * + * DISABLED = 5; + */ + DISABLED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Start mode unspecified.
+     * 
+ * + * START_MODE_UNSPECIFIED = 0; + */ + public static final int START_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The service is a device driver started by the system loader.
+     * 
+ * + * BOOT = 1; + */ + public static final int BOOT_VALUE = 1; + /** + * + * + *
+     * The service is a device driver started by the IOInitSystem function.
+     * 
+ * + * SYSTEM = 2; + */ + public static final int SYSTEM_VALUE = 2; + /** + * + * + *
+     * The service is started by the operating system, at system start-up
+     * 
+ * + * AUTO = 3; + */ + public static final int AUTO_VALUE = 3; + /** + * + * + *
+     * The service is started only manually, by a user.
+     * 
+ * + * MANUAL = 4; + */ + public static final int MANUAL_VALUE = 4; + /** + * + * + *
+     * The service is disabled.
+     * 
+ * + * DISABLED = 5; + */ + public static final int DISABLED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StartMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static StartMode forNumber(int value) { + switch (value) { + case 0: + return START_MODE_UNSPECIFIED; + case 1: + return BOOT; + case 2: + return SYSTEM; + case 3: + return AUTO; + case 4: + return MANUAL; + case 5: + return DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StartMode findValueByNumber(int number) { + return StartMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.RunningService.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final StartMode[] VALUES = values(); + + public static StartMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private StartMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.RunningService.StartMode) + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceName_ = ""; + /** + * + * + *
+   * Service name.
+   * 
+ * + * string service_name = 1; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Service name.
+   * 
+ * + * string service_name = 1; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_ = 0; + /** + * + * + *
+   * Service state (OS-agnostic).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Service state (OS-agnostic).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningService.State getState() { + com.google.cloud.migrationcenter.v1.RunningService.State result = + com.google.cloud.migrationcenter.v1.RunningService.State.forNumber(state_); + return result == null + ? com.google.cloud.migrationcenter.v1.RunningService.State.UNRECOGNIZED + : result; + } + + public static final int START_MODE_FIELD_NUMBER = 3; + private int startMode_ = 0; + /** + * + * + *
+   * Service start mode (OS-agnostic).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + * + * @return The enum numeric value on the wire for startMode. + */ + @java.lang.Override + public int getStartModeValue() { + return startMode_; + } + /** + * + * + *
+   * Service start mode (OS-agnostic).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + * + * @return The startMode. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningService.StartMode getStartMode() { + com.google.cloud.migrationcenter.v1.RunningService.StartMode result = + com.google.cloud.migrationcenter.v1.RunningService.StartMode.forNumber(startMode_); + return result == null + ? com.google.cloud.migrationcenter.v1.RunningService.StartMode.UNRECOGNIZED + : result; + } + + public static final int EXE_PATH_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object exePath_ = ""; + /** + * + * + *
+   * Service binary path.
+   * 
+ * + * string exe_path = 4; + * + * @return The exePath. + */ + @java.lang.Override + public java.lang.String getExePath() { + java.lang.Object ref = exePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + exePath_ = s; + return s; + } + } + /** + * + * + *
+   * Service binary path.
+   * 
+ * + * string exe_path = 4; + * + * @return The bytes for exePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExePathBytes() { + java.lang.Object ref = exePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + exePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CMDLINE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object cmdline_ = ""; + /** + * + * + *
+   * Service command line.
+   * 
+ * + * string cmdline = 5; + * + * @return The cmdline. + */ + @java.lang.Override + public java.lang.String getCmdline() { + java.lang.Object ref = cmdline_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cmdline_ = s; + return s; + } + } + /** + * + * + *
+   * Service command line.
+   * 
+ * + * string cmdline = 5; + * + * @return The bytes for cmdline. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCmdlineBytes() { + java.lang.Object ref = cmdline_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cmdline_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PID_FIELD_NUMBER = 6; + private long pid_ = 0L; + /** + * + * + *
+   * Service pid.
+   * 
+ * + * int64 pid = 6; + * + * @return The pid. + */ + @java.lang.Override + public long getPid() { + return pid_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (state_ + != com.google.cloud.migrationcenter.v1.RunningService.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (startMode_ + != com.google.cloud.migrationcenter.v1.RunningService.StartMode.START_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, startMode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exePath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, exePath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmdline_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, cmdline_); + } + if (pid_ != 0L) { + output.writeInt64(6, pid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (state_ + != com.google.cloud.migrationcenter.v1.RunningService.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (startMode_ + != com.google.cloud.migrationcenter.v1.RunningService.StartMode.START_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, startMode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exePath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, exePath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmdline_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, cmdline_); + } + if (pid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, pid_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.RunningService)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.RunningService other = + (com.google.cloud.migrationcenter.v1.RunningService) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (state_ != other.state_) return false; + if (startMode_ != other.startMode_) return false; + if (!getExePath().equals(other.getExePath())) return false; + if (!getCmdline().equals(other.getCmdline())) return false; + if (getPid() != other.getPid()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + START_MODE_FIELD_NUMBER; + hash = (53 * hash) + startMode_; + hash = (37 * hash) + EXE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getExePath().hashCode(); + hash = (37 * hash) + CMDLINE_FIELD_NUMBER; + hash = (53 * hash) + getCmdline().hashCode(); + hash = (37 * hash) + PID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPid()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningService parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.RunningService prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Guest OS running service details.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RunningService} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.RunningService) + com.google.cloud.migrationcenter.v1.RunningServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RunningService.class, + com.google.cloud.migrationcenter.v1.RunningService.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.RunningService.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serviceName_ = ""; + state_ = 0; + startMode_ = 0; + exePath_ = ""; + cmdline_ = ""; + pid_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningService_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningService getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.RunningService.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningService build() { + com.google.cloud.migrationcenter.v1.RunningService result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningService buildPartial() { + com.google.cloud.migrationcenter.v1.RunningService result = + new com.google.cloud.migrationcenter.v1.RunningService(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.RunningService result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceName_ = serviceName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.startMode_ = startMode_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.exePath_ = exePath_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.cmdline_ = cmdline_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pid_ = pid_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.RunningService) { + return mergeFrom((com.google.cloud.migrationcenter.v1.RunningService) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.RunningService other) { + if (other == com.google.cloud.migrationcenter.v1.RunningService.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.startMode_ != 0) { + setStartModeValue(other.getStartModeValue()); + } + if (!other.getExePath().isEmpty()) { + exePath_ = other.exePath_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getCmdline().isEmpty()) { + cmdline_ = other.cmdline_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getPid() != 0L) { + setPid(other.getPid()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + serviceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + startMode_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + exePath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + cmdline_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + pid_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Service name.
+     * 
+ * + * string service_name = 1; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Service name.
+     * 
+ * + * string service_name = 1; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Service name.
+     * 
+ * + * string service_name = 1; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Service name.
+     * 
+ * + * string service_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + serviceName_ = getDefaultInstance().getServiceName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Service name.
+     * 
+ * + * string service_name = 1; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Service state (OS-agnostic).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Service state (OS-agnostic).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.State state = 2; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Service state (OS-agnostic).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningService.State getState() { + com.google.cloud.migrationcenter.v1.RunningService.State result = + com.google.cloud.migrationcenter.v1.RunningService.State.forNumber(state_); + return result == null + ? com.google.cloud.migrationcenter.v1.RunningService.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Service state (OS-agnostic).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.State state = 2; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.migrationcenter.v1.RunningService.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Service state (OS-agnostic).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.State state = 2; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + onChanged(); + return this; + } + + private int startMode_ = 0; + /** + * + * + *
+     * Service start mode (OS-agnostic).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + * + * @return The enum numeric value on the wire for startMode. + */ + @java.lang.Override + public int getStartModeValue() { + return startMode_; + } + /** + * + * + *
+     * Service start mode (OS-agnostic).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + * + * @param value The enum numeric value on the wire for startMode to set. + * @return This builder for chaining. + */ + public Builder setStartModeValue(int value) { + startMode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Service start mode (OS-agnostic).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + * + * @return The startMode. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningService.StartMode getStartMode() { + com.google.cloud.migrationcenter.v1.RunningService.StartMode result = + com.google.cloud.migrationcenter.v1.RunningService.StartMode.forNumber(startMode_); + return result == null + ? com.google.cloud.migrationcenter.v1.RunningService.StartMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Service start mode (OS-agnostic).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + * + * @param value The startMode to set. + * @return This builder for chaining. + */ + public Builder setStartMode( + com.google.cloud.migrationcenter.v1.RunningService.StartMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + startMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Service start mode (OS-agnostic).
+     * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + * + * @return This builder for chaining. + */ + public Builder clearStartMode() { + bitField0_ = (bitField0_ & ~0x00000004); + startMode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object exePath_ = ""; + /** + * + * + *
+     * Service binary path.
+     * 
+ * + * string exe_path = 4; + * + * @return The exePath. + */ + public java.lang.String getExePath() { + java.lang.Object ref = exePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + exePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Service binary path.
+     * 
+ * + * string exe_path = 4; + * + * @return The bytes for exePath. + */ + public com.google.protobuf.ByteString getExePathBytes() { + java.lang.Object ref = exePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + exePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Service binary path.
+     * 
+ * + * string exe_path = 4; + * + * @param value The exePath to set. + * @return This builder for chaining. + */ + public Builder setExePath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + exePath_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Service binary path.
+     * 
+ * + * string exe_path = 4; + * + * @return This builder for chaining. + */ + public Builder clearExePath() { + exePath_ = getDefaultInstance().getExePath(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Service binary path.
+     * 
+ * + * string exe_path = 4; + * + * @param value The bytes for exePath to set. + * @return This builder for chaining. + */ + public Builder setExePathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + exePath_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object cmdline_ = ""; + /** + * + * + *
+     * Service command line.
+     * 
+ * + * string cmdline = 5; + * + * @return The cmdline. + */ + public java.lang.String getCmdline() { + java.lang.Object ref = cmdline_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cmdline_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Service command line.
+     * 
+ * + * string cmdline = 5; + * + * @return The bytes for cmdline. + */ + public com.google.protobuf.ByteString getCmdlineBytes() { + java.lang.Object ref = cmdline_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cmdline_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Service command line.
+     * 
+ * + * string cmdline = 5; + * + * @param value The cmdline to set. + * @return This builder for chaining. + */ + public Builder setCmdline(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cmdline_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Service command line.
+     * 
+ * + * string cmdline = 5; + * + * @return This builder for chaining. + */ + public Builder clearCmdline() { + cmdline_ = getDefaultInstance().getCmdline(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Service command line.
+     * 
+ * + * string cmdline = 5; + * + * @param value The bytes for cmdline to set. + * @return This builder for chaining. + */ + public Builder setCmdlineBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cmdline_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private long pid_; + /** + * + * + *
+     * Service pid.
+     * 
+ * + * int64 pid = 6; + * + * @return The pid. + */ + @java.lang.Override + public long getPid() { + return pid_; + } + /** + * + * + *
+     * Service pid.
+     * 
+ * + * int64 pid = 6; + * + * @param value The pid to set. + * @return This builder for chaining. + */ + public Builder setPid(long value) { + + pid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Service pid.
+     * 
+ * + * int64 pid = 6; + * + * @return This builder for chaining. + */ + public Builder clearPid() { + bitField0_ = (bitField0_ & ~0x00000020); + pid_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.RunningService) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.RunningService) + private static final com.google.cloud.migrationcenter.v1.RunningService DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.RunningService(); + } + + public static com.google.cloud.migrationcenter.v1.RunningService getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunningService parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningService getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceList.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceList.java new file mode 100644 index 000000000000..124480ee2f22 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceList.java @@ -0,0 +1,942 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * List of running guest OS services.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RunningServiceList} + */ +public final class RunningServiceList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.RunningServiceList) + RunningServiceListOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunningServiceList.newBuilder() to construct. + private RunningServiceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunningServiceList() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunningServiceList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningServiceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningServiceList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RunningServiceList.class, + com.google.cloud.migrationcenter.v1.RunningServiceList.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * Running service entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Running service entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Running service entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Running service entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningService getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Running service entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningServiceOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.RunningServiceList)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.RunningServiceList other = + (com.google.cloud.migrationcenter.v1.RunningServiceList) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.RunningServiceList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List of running guest OS services.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RunningServiceList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.RunningServiceList) + com.google.cloud.migrationcenter.v1.RunningServiceListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningServiceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningServiceList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RunningServiceList.class, + com.google.cloud.migrationcenter.v1.RunningServiceList.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.RunningServiceList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RunningServiceList_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningServiceList getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.RunningServiceList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningServiceList build() { + com.google.cloud.migrationcenter.v1.RunningServiceList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningServiceList buildPartial() { + com.google.cloud.migrationcenter.v1.RunningServiceList result = + new com.google.cloud.migrationcenter.v1.RunningServiceList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.RunningServiceList result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.RunningServiceList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.RunningServiceList) { + return mergeFrom((com.google.cloud.migrationcenter.v1.RunningServiceList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.RunningServiceList other) { + if (other == com.google.cloud.migrationcenter.v1.RunningServiceList.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.RunningService m = + input.readMessage( + com.google.cloud.migrationcenter.v1.RunningService.parser(), + extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningService, + com.google.cloud.migrationcenter.v1.RunningService.Builder, + com.google.cloud.migrationcenter.v1.RunningServiceOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningService getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public Builder setEntries(int index, com.google.cloud.migrationcenter.v1.RunningService value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.migrationcenter.v1.RunningService.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public Builder addEntries(com.google.cloud.migrationcenter.v1.RunningService value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public Builder addEntries(int index, com.google.cloud.migrationcenter.v1.RunningService value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public Builder addEntries( + com.google.cloud.migrationcenter.v1.RunningService.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.migrationcenter.v1.RunningService.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningService.Builder getEntriesBuilder(int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningServiceOrBuilder getEntriesOrBuilder( + int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningService.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.RunningService.getDefaultInstance()); + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public com.google.cloud.migrationcenter.v1.RunningService.Builder addEntriesBuilder(int index) { + return getEntriesFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.RunningService.getDefaultInstance()); + } + /** + * + * + *
+     * Running service entries.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningService, + com.google.cloud.migrationcenter.v1.RunningService.Builder, + com.google.cloud.migrationcenter.v1.RunningServiceOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RunningService, + com.google.cloud.migrationcenter.v1.RunningService.Builder, + com.google.cloud.migrationcenter.v1.RunningServiceOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.RunningServiceList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.RunningServiceList) + private static final com.google.cloud.migrationcenter.v1.RunningServiceList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.RunningServiceList(); + } + + public static com.google.cloud.migrationcenter.v1.RunningServiceList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunningServiceList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RunningServiceList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceListOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceListOrBuilder.java new file mode 100644 index 000000000000..a311bb689e4e --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface RunningServiceListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.RunningServiceList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Running service entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Running service entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + com.google.cloud.migrationcenter.v1.RunningService getEntries(int index); + /** + * + * + *
+   * Running service entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Running service entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Running service entries.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + com.google.cloud.migrationcenter.v1.RunningServiceOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceOrBuilder.java new file mode 100644 index 000000000000..260109c6ae77 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RunningServiceOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface RunningServiceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.RunningService) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Service name.
+   * 
+ * + * string service_name = 1; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Service name.
+   * 
+ * + * string service_name = 1; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * Service state (OS-agnostic).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Service state (OS-agnostic).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.State state = 2; + * + * @return The state. + */ + com.google.cloud.migrationcenter.v1.RunningService.State getState(); + + /** + * + * + *
+   * Service start mode (OS-agnostic).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + * + * @return The enum numeric value on the wire for startMode. + */ + int getStartModeValue(); + /** + * + * + *
+   * Service start mode (OS-agnostic).
+   * 
+ * + * .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + * + * @return The startMode. + */ + com.google.cloud.migrationcenter.v1.RunningService.StartMode getStartMode(); + + /** + * + * + *
+   * Service binary path.
+   * 
+ * + * string exe_path = 4; + * + * @return The exePath. + */ + java.lang.String getExePath(); + /** + * + * + *
+   * Service binary path.
+   * 
+ * + * string exe_path = 4; + * + * @return The bytes for exePath. + */ + com.google.protobuf.ByteString getExePathBytes(); + + /** + * + * + *
+   * Service command line.
+   * 
+ * + * string cmdline = 5; + * + * @return The cmdline. + */ + java.lang.String getCmdline(); + /** + * + * + *
+   * Service command line.
+   * 
+ * + * string cmdline = 5; + * + * @return The bytes for cmdline. + */ + com.google.protobuf.ByteString getCmdlineBytes(); + + /** + * + * + *
+   * Service pid.
+   * 
+ * + * int64 pid = 6; + * + * @return The pid. + */ + long getPid(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RuntimeNetworkInfo.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RuntimeNetworkInfo.java new file mode 100644 index 000000000000..4870b86e88eb --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RuntimeNetworkInfo.java @@ -0,0 +1,969 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Runtime networking information.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RuntimeNetworkInfo} + */ +public final class RuntimeNetworkInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.RuntimeNetworkInfo) + RuntimeNetworkInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeNetworkInfo.newBuilder() to construct. + private RuntimeNetworkInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeNetworkInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeNetworkInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RuntimeNetworkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RuntimeNetworkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.class, + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.Builder.class); + } + + public static final int SCAN_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp scanTime_; + /** + * + * + *
+   * Time of the last network scan.
+   * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + * + * @return Whether the scanTime field is set. + */ + @java.lang.Override + public boolean hasScanTime() { + return scanTime_ != null; + } + /** + * + * + *
+   * Time of the last network scan.
+   * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + * + * @return The scanTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getScanTime() { + return scanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scanTime_; + } + /** + * + * + *
+   * Time of the last network scan.
+   * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getScanTimeOrBuilder() { + return scanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scanTime_; + } + + public static final int CONNECTIONS_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.NetworkConnectionList connections_; + /** + * + * + *
+   * Network connections.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + * + * @return Whether the connections field is set. + */ + @java.lang.Override + public boolean hasConnections() { + return connections_ != null; + } + /** + * + * + *
+   * Network connections.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + * + * @return The connections. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnectionList getConnections() { + return connections_ == null + ? com.google.cloud.migrationcenter.v1.NetworkConnectionList.getDefaultInstance() + : connections_; + } + /** + * + * + *
+   * Network connections.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.NetworkConnectionListOrBuilder + getConnectionsOrBuilder() { + return connections_ == null + ? com.google.cloud.migrationcenter.v1.NetworkConnectionList.getDefaultInstance() + : connections_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (scanTime_ != null) { + output.writeMessage(1, getScanTime()); + } + if (connections_ != null) { + output.writeMessage(2, getConnections()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scanTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getScanTime()); + } + if (connections_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConnections()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo other = + (com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo) obj; + + if (hasScanTime() != other.hasScanTime()) return false; + if (hasScanTime()) { + if (!getScanTime().equals(other.getScanTime())) return false; + } + if (hasConnections() != other.hasConnections()) return false; + if (hasConnections()) { + if (!getConnections().equals(other.getConnections())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasScanTime()) { + hash = (37 * hash) + SCAN_TIME_FIELD_NUMBER; + hash = (53 * hash) + getScanTime().hashCode(); + } + if (hasConnections()) { + hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getConnections().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Runtime networking information.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.RuntimeNetworkInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.RuntimeNetworkInfo) + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RuntimeNetworkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RuntimeNetworkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.class, + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scanTime_ = null; + if (scanTimeBuilder_ != null) { + scanTimeBuilder_.dispose(); + scanTimeBuilder_ = null; + } + connections_ = null; + if (connectionsBuilder_ != null) { + connectionsBuilder_.dispose(); + connectionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_RuntimeNetworkInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo build() { + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo buildPartial() { + com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo result = + new com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.scanTime_ = scanTimeBuilder_ == null ? scanTime_ : scanTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.connections_ = + connectionsBuilder_ == null ? connections_ : connectionsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo) { + return mergeFrom((com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo other) { + if (other == com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo.getDefaultInstance()) + return this; + if (other.hasScanTime()) { + mergeScanTime(other.getScanTime()); + } + if (other.hasConnections()) { + mergeConnections(other.getConnections()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getScanTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getConnectionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp scanTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + scanTimeBuilder_; + /** + * + * + *
+     * Time of the last network scan.
+     * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + * + * @return Whether the scanTime field is set. + */ + public boolean hasScanTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Time of the last network scan.
+     * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + * + * @return The scanTime. + */ + public com.google.protobuf.Timestamp getScanTime() { + if (scanTimeBuilder_ == null) { + return scanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scanTime_; + } else { + return scanTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time of the last network scan.
+     * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + */ + public Builder setScanTime(com.google.protobuf.Timestamp value) { + if (scanTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scanTime_ = value; + } else { + scanTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Time of the last network scan.
+     * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + */ + public Builder setScanTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (scanTimeBuilder_ == null) { + scanTime_ = builderForValue.build(); + } else { + scanTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Time of the last network scan.
+     * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + */ + public Builder mergeScanTime(com.google.protobuf.Timestamp value) { + if (scanTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && scanTime_ != null + && scanTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getScanTimeBuilder().mergeFrom(value); + } else { + scanTime_ = value; + } + } else { + scanTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Time of the last network scan.
+     * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + */ + public Builder clearScanTime() { + bitField0_ = (bitField0_ & ~0x00000001); + scanTime_ = null; + if (scanTimeBuilder_ != null) { + scanTimeBuilder_.dispose(); + scanTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Time of the last network scan.
+     * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getScanTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getScanTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time of the last network scan.
+     * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getScanTimeOrBuilder() { + if (scanTimeBuilder_ != null) { + return scanTimeBuilder_.getMessageOrBuilder(); + } else { + return scanTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scanTime_; + } + } + /** + * + * + *
+     * Time of the last network scan.
+     * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getScanTimeFieldBuilder() { + if (scanTimeBuilder_ == null) { + scanTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getScanTime(), getParentForChildren(), isClean()); + scanTime_ = null; + } + return scanTimeBuilder_; + } + + private com.google.cloud.migrationcenter.v1.NetworkConnectionList connections_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkConnectionList, + com.google.cloud.migrationcenter.v1.NetworkConnectionList.Builder, + com.google.cloud.migrationcenter.v1.NetworkConnectionListOrBuilder> + connectionsBuilder_; + /** + * + * + *
+     * Network connections.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + * + * @return Whether the connections field is set. + */ + public boolean hasConnections() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Network connections.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + * + * @return The connections. + */ + public com.google.cloud.migrationcenter.v1.NetworkConnectionList getConnections() { + if (connectionsBuilder_ == null) { + return connections_ == null + ? com.google.cloud.migrationcenter.v1.NetworkConnectionList.getDefaultInstance() + : connections_; + } else { + return connectionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Network connections.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + */ + public Builder setConnections(com.google.cloud.migrationcenter.v1.NetworkConnectionList value) { + if (connectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connections_ = value; + } else { + connectionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Network connections.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + */ + public Builder setConnections( + com.google.cloud.migrationcenter.v1.NetworkConnectionList.Builder builderForValue) { + if (connectionsBuilder_ == null) { + connections_ = builderForValue.build(); + } else { + connectionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Network connections.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + */ + public Builder mergeConnections( + com.google.cloud.migrationcenter.v1.NetworkConnectionList value) { + if (connectionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && connections_ != null + && connections_ + != com.google.cloud.migrationcenter.v1.NetworkConnectionList.getDefaultInstance()) { + getConnectionsBuilder().mergeFrom(value); + } else { + connections_ = value; + } + } else { + connectionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Network connections.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + */ + public Builder clearConnections() { + bitField0_ = (bitField0_ & ~0x00000002); + connections_ = null; + if (connectionsBuilder_ != null) { + connectionsBuilder_.dispose(); + connectionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Network connections.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + */ + public com.google.cloud.migrationcenter.v1.NetworkConnectionList.Builder + getConnectionsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getConnectionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Network connections.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + */ + public com.google.cloud.migrationcenter.v1.NetworkConnectionListOrBuilder + getConnectionsOrBuilder() { + if (connectionsBuilder_ != null) { + return connectionsBuilder_.getMessageOrBuilder(); + } else { + return connections_ == null + ? com.google.cloud.migrationcenter.v1.NetworkConnectionList.getDefaultInstance() + : connections_; + } + } + /** + * + * + *
+     * Network connections.
+     * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkConnectionList, + com.google.cloud.migrationcenter.v1.NetworkConnectionList.Builder, + com.google.cloud.migrationcenter.v1.NetworkConnectionListOrBuilder> + getConnectionsFieldBuilder() { + if (connectionsBuilder_ == null) { + connectionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.NetworkConnectionList, + com.google.cloud.migrationcenter.v1.NetworkConnectionList.Builder, + com.google.cloud.migrationcenter.v1.NetworkConnectionListOrBuilder>( + getConnections(), getParentForChildren(), isClean()); + connections_ = null; + } + return connectionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.RuntimeNetworkInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.RuntimeNetworkInfo) + private static final com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo(); + } + + public static com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeNetworkInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RuntimeNetworkInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RuntimeNetworkInfoOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RuntimeNetworkInfoOrBuilder.java new file mode 100644 index 000000000000..78cfedf3a104 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/RuntimeNetworkInfoOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface RuntimeNetworkInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.RuntimeNetworkInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Time of the last network scan.
+   * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + * + * @return Whether the scanTime field is set. + */ + boolean hasScanTime(); + /** + * + * + *
+   * Time of the last network scan.
+   * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + * + * @return The scanTime. + */ + com.google.protobuf.Timestamp getScanTime(); + /** + * + * + *
+   * Time of the last network scan.
+   * 
+ * + * .google.protobuf.Timestamp scan_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getScanTimeOrBuilder(); + + /** + * + * + *
+   * Network connections.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + * + * @return Whether the connections field is set. + */ + boolean hasConnections(); + /** + * + * + *
+   * Network connections.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + * + * @return The connections. + */ + com.google.cloud.migrationcenter.v1.NetworkConnectionList getConnections(); + /** + * + * + *
+   * Network connections.
+   * 
+ * + * .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + */ + com.google.cloud.migrationcenter.v1.NetworkConnectionListOrBuilder getConnectionsOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Settings.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Settings.java new file mode 100644 index 000000000000..a5416293f0f3 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Settings.java @@ -0,0 +1,805 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Describes the Migration Center settings related to the project.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Settings} + */ +public final class Settings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Settings) + SettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Settings.newBuilder() to construct. + private Settings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Settings() { + name_ = ""; + preferenceSet_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Settings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Settings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Settings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Settings.class, + com.google.cloud.migrationcenter.v1.Settings.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREFERENCE_SET_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object preferenceSet_ = ""; + /** + * + * + *
+   * The preference set used by default for a project.
+   * 
+ * + * string preference_set = 2 [(.google.api.resource_reference) = { ... } + * + * @return The preferenceSet. + */ + @java.lang.Override + public java.lang.String getPreferenceSet() { + java.lang.Object ref = preferenceSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + preferenceSet_ = s; + return s; + } + } + /** + * + * + *
+   * The preference set used by default for a project.
+   * 
+ * + * string preference_set = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for preferenceSet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPreferenceSetBytes() { + java.lang.Object ref = preferenceSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preferenceSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preferenceSet_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, preferenceSet_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preferenceSet_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, preferenceSet_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Settings)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Settings other = + (com.google.cloud.migrationcenter.v1.Settings) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPreferenceSet().equals(other.getPreferenceSet())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PREFERENCE_SET_FIELD_NUMBER; + hash = (53 * hash) + getPreferenceSet().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Settings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Settings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Settings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Settings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Settings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Settings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Settings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Settings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Settings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Settings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Settings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Settings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.Settings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes the Migration Center settings related to the project.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Settings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Settings) + com.google.cloud.migrationcenter.v1.SettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Settings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Settings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Settings.class, + com.google.cloud.migrationcenter.v1.Settings.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Settings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + preferenceSet_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Settings_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Settings getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Settings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Settings build() { + com.google.cloud.migrationcenter.v1.Settings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Settings buildPartial() { + com.google.cloud.migrationcenter.v1.Settings result = + new com.google.cloud.migrationcenter.v1.Settings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.Settings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.preferenceSet_ = preferenceSet_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Settings) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Settings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Settings other) { + if (other == com.google.cloud.migrationcenter.v1.Settings.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPreferenceSet().isEmpty()) { + preferenceSet_ = other.preferenceSet_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + preferenceSet_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object preferenceSet_ = ""; + /** + * + * + *
+     * The preference set used by default for a project.
+     * 
+ * + * string preference_set = 2 [(.google.api.resource_reference) = { ... } + * + * @return The preferenceSet. + */ + public java.lang.String getPreferenceSet() { + java.lang.Object ref = preferenceSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + preferenceSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The preference set used by default for a project.
+     * 
+ * + * string preference_set = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for preferenceSet. + */ + public com.google.protobuf.ByteString getPreferenceSetBytes() { + java.lang.Object ref = preferenceSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preferenceSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The preference set used by default for a project.
+     * 
+ * + * string preference_set = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The preferenceSet to set. + * @return This builder for chaining. + */ + public Builder setPreferenceSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + preferenceSet_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The preference set used by default for a project.
+     * 
+ * + * string preference_set = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearPreferenceSet() { + preferenceSet_ = getDefaultInstance().getPreferenceSet(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The preference set used by default for a project.
+     * 
+ * + * string preference_set = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for preferenceSet to set. + * @return This builder for chaining. + */ + public Builder setPreferenceSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + preferenceSet_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Settings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Settings) + private static final com.google.cloud.migrationcenter.v1.Settings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Settings(); + } + + public static com.google.cloud.migrationcenter.v1.Settings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Settings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Settings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SettingsName.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SettingsName.java new file mode 100644 index 000000000000..b1447b0f201b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SettingsName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class SettingsName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/settings"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected SettingsName() { + project = null; + location = null; + } + + private SettingsName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SettingsName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static SettingsName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "SettingsName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (SettingsName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + SettingsName that = ((SettingsName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}/settings. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(SettingsName settingsName) { + this.project = settingsName.project; + this.location = settingsName.location; + } + + public SettingsName build() { + return new SettingsName(this); + } + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SettingsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SettingsOrBuilder.java new file mode 100644 index 000000000000..f0588ba20a9f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SettingsOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface SettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Settings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The preference set used by default for a project.
+   * 
+ * + * string preference_set = 2 [(.google.api.resource_reference) = { ... } + * + * @return The preferenceSet. + */ + java.lang.String getPreferenceSet(); + /** + * + * + *
+   * The preference set used by default for a project.
+   * 
+ * + * string preference_set = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for preferenceSet. + */ + com.google.protobuf.ByteString getPreferenceSetBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SizingOptimizationStrategy.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SizingOptimizationStrategy.java new file mode 100644 index 000000000000..7e407e7325bd --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SizingOptimizationStrategy.java @@ -0,0 +1,213 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * The sizing optimization strategy preferences of a virtual machine. This
+ * strategy, in addition to actual usage data of the virtual machine, can help
+ * determine the recommended shape on the target platform.
+ * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.SizingOptimizationStrategy} + */ +public enum SizingOptimizationStrategy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified (default value).
+   * 
+ * + * SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; + */ + SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED(0), + /** + * + * + *
+   * No optimization applied. Virtual machine sizing matches as closely as
+   * possible the machine shape on the source site, not considering any actual
+   * performance data.
+   * 
+ * + * SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE = 1; + */ + SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE(1), + /** + * + * + *
+   * Virtual machine sizing will match the reported usage and shape, with some
+   * slack. This a good value to start with.
+   * 
+ * + * SIZING_OPTIMIZATION_STRATEGY_MODERATE = 2; + */ + SIZING_OPTIMIZATION_STRATEGY_MODERATE(2), + /** + * + * + *
+   * Virtual machine sizing will match the reported usage, with little slack.
+   * Using this option can help reduce costs.
+   * 
+ * + * SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE = 3; + */ + SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified (default value).
+   * 
+ * + * SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; + */ + public static final int SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * No optimization applied. Virtual machine sizing matches as closely as
+   * possible the machine shape on the source site, not considering any actual
+   * performance data.
+   * 
+ * + * SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE = 1; + */ + public static final int SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE_VALUE = 1; + /** + * + * + *
+   * Virtual machine sizing will match the reported usage and shape, with some
+   * slack. This a good value to start with.
+   * 
+ * + * SIZING_OPTIMIZATION_STRATEGY_MODERATE = 2; + */ + public static final int SIZING_OPTIMIZATION_STRATEGY_MODERATE_VALUE = 2; + /** + * + * + *
+   * Virtual machine sizing will match the reported usage, with little slack.
+   * Using this option can help reduce costs.
+   * 
+ * + * SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE = 3; + */ + public static final int SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SizingOptimizationStrategy valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SizingOptimizationStrategy forNumber(int value) { + switch (value) { + case 0: + return SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED; + case 1: + return SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE; + case 2: + return SIZING_OPTIMIZATION_STRATEGY_MODERATE; + case 3: + return SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SizingOptimizationStrategy findValueByNumber(int number) { + return SizingOptimizationStrategy.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto.getDescriptor() + .getEnumTypes() + .get(7); + } + + private static final SizingOptimizationStrategy[] VALUES = values(); + + public static SizingOptimizationStrategy valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SizingOptimizationStrategy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.SizingOptimizationStrategy) +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Source.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Source.java new file mode 100644 index 000000000000..72b01f6b641b --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/Source.java @@ -0,0 +1,2623 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * Source represents an object from which asset information is
+ * streamed to Migration Center.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Source} + */ +public final class Source extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.Source) + SourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Source.newBuilder() to construct. + private Source(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Source() { + name_ = ""; + displayName_ = ""; + description_ = ""; + type_ = 0; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Source(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Source_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Source_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Source.class, + com.google.cloud.migrationcenter.v1.Source.Builder.class); + } + + /** Protobuf enum {@code google.cloud.migrationcenter.v1.Source.SourceType} */ + public enum SourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified
+     * 
+ * + * SOURCE_TYPE_UNKNOWN = 0; + */ + SOURCE_TYPE_UNKNOWN(0), + /** + * + * + *
+     * Manually uploaded file (e.g. CSV)
+     * 
+ * + * SOURCE_TYPE_UPLOAD = 1; + */ + SOURCE_TYPE_UPLOAD(1), + /** + * + * + *
+     * Guest-level info
+     * 
+ * + * SOURCE_TYPE_GUEST_OS_SCAN = 2; + */ + SOURCE_TYPE_GUEST_OS_SCAN(2), + /** + * + * + *
+     * Inventory-level scan
+     * 
+ * + * SOURCE_TYPE_INVENTORY_SCAN = 3; + */ + SOURCE_TYPE_INVENTORY_SCAN(3), + /** + * + * + *
+     * Third-party owned sources.
+     * 
+ * + * SOURCE_TYPE_CUSTOM = 4; + */ + SOURCE_TYPE_CUSTOM(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified
+     * 
+ * + * SOURCE_TYPE_UNKNOWN = 0; + */ + public static final int SOURCE_TYPE_UNKNOWN_VALUE = 0; + /** + * + * + *
+     * Manually uploaded file (e.g. CSV)
+     * 
+ * + * SOURCE_TYPE_UPLOAD = 1; + */ + public static final int SOURCE_TYPE_UPLOAD_VALUE = 1; + /** + * + * + *
+     * Guest-level info
+     * 
+ * + * SOURCE_TYPE_GUEST_OS_SCAN = 2; + */ + public static final int SOURCE_TYPE_GUEST_OS_SCAN_VALUE = 2; + /** + * + * + *
+     * Inventory-level scan
+     * 
+ * + * SOURCE_TYPE_INVENTORY_SCAN = 3; + */ + public static final int SOURCE_TYPE_INVENTORY_SCAN_VALUE = 3; + /** + * + * + *
+     * Third-party owned sources.
+     * 
+ * + * SOURCE_TYPE_CUSTOM = 4; + */ + public static final int SOURCE_TYPE_CUSTOM_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SourceType forNumber(int value) { + switch (value) { + case 0: + return SOURCE_TYPE_UNKNOWN; + case 1: + return SOURCE_TYPE_UPLOAD; + case 2: + return SOURCE_TYPE_GUEST_OS_SCAN; + case 3: + return SOURCE_TYPE_INVENTORY_SCAN; + case 4: + return SOURCE_TYPE_CUSTOM; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SourceType findValueByNumber(int number) { + return SourceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.Source.getDescriptor().getEnumTypes().get(0); + } + + private static final SourceType[] VALUES = values(); + + public static SourceType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.Source.SourceType) + } + + /** + * + * + *
+   * Enumerates possible states of a source.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.Source.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The source is active and ready to be used.
+     * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+     * In the process of being deleted.
+     * 
+ * + * DELETING = 2; + */ + DELETING(2), + /** + * + * + *
+     * Source is in an invalid state. Asset frames reported to it will be
+     * ignored.
+     * 
+ * + * INVALID = 3; + */ + INVALID(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The source is active and ready to be used.
+     * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + * + * + *
+     * In the process of being deleted.
+     * 
+ * + * DELETING = 2; + */ + public static final int DELETING_VALUE = 2; + /** + * + * + *
+     * Source is in an invalid state. Asset frames reported to it will be
+     * ignored.
+     * 
+ * + * INVALID = 3; + */ + public static final int INVALID_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return DELETING; + case 3: + return INVALID; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.Source.getDescriptor().getEnumTypes().get(1); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.Source.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The full name of the source.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The full name of the source.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp when the source was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the source was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the source was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The timestamp when the source was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the source was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the source was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * User-friendly display name.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * User-friendly display name.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 6; + private int type_ = 0; + /** + * + * + *
+   * Data source type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Data source type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Source.SourceType getType() { + com.google.cloud.migrationcenter.v1.Source.SourceType result = + com.google.cloud.migrationcenter.v1.Source.SourceType.forNumber(type_); + return result == null + ? com.google.cloud.migrationcenter.v1.Source.SourceType.UNRECOGNIZED + : result; + } + + public static final int PRIORITY_FIELD_NUMBER = 7; + private int priority_ = 0; + /** + * + * + *
+   * The information confidence of the source.
+   * The higher the value, the higher the confidence.
+   * 
+ * + * int32 priority = 7; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int MANAGED_FIELD_NUMBER = 8; + private boolean managed_ = false; + /** + * + * + *
+   * If `true`, the source is managed by other service(s).
+   * 
+ * + * bool managed = 8; + * + * @return The managed. + */ + @java.lang.Override + public boolean getManaged() { + return managed_; + } + + public static final int PENDING_FRAME_COUNT_FIELD_NUMBER = 9; + private int pendingFrameCount_ = 0; + /** + * + * + *
+   * Output only. Number of frames that are still being processed.
+   * 
+ * + * int32 pending_frame_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pendingFrameCount. + */ + @java.lang.Override + public int getPendingFrameCount() { + return pendingFrameCount_; + } + + public static final int ERROR_FRAME_COUNT_FIELD_NUMBER = 10; + private int errorFrameCount_ = 0; + /** + * + * + *
+   * Output only. The number of frames that were reported by the source and
+   * contained errors.
+   * 
+ * + * int32 error_frame_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorFrameCount. + */ + @java.lang.Override + public int getErrorFrameCount() { + return errorFrameCount_; + } + + public static final int STATE_FIELD_NUMBER = 11; + private int state_ = 0; + /** + * + * + *
+   * Output only. The state of the source.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The state of the source.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Source.State getState() { + com.google.cloud.migrationcenter.v1.Source.State result = + com.google.cloud.migrationcenter.v1.Source.State.forNumber(state_); + return result == null ? com.google.cloud.migrationcenter.v1.Source.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (type_ + != com.google.cloud.migrationcenter.v1.Source.SourceType.SOURCE_TYPE_UNKNOWN.getNumber()) { + output.writeEnum(6, type_); + } + if (priority_ != 0) { + output.writeInt32(7, priority_); + } + if (managed_ != false) { + output.writeBool(8, managed_); + } + if (pendingFrameCount_ != 0) { + output.writeInt32(9, pendingFrameCount_); + } + if (errorFrameCount_ != 0) { + output.writeInt32(10, errorFrameCount_); + } + if (state_ != com.google.cloud.migrationcenter.v1.Source.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(11, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (type_ + != com.google.cloud.migrationcenter.v1.Source.SourceType.SOURCE_TYPE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, type_); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, priority_); + } + if (managed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, managed_); + } + if (pendingFrameCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, pendingFrameCount_); + } + if (errorFrameCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, errorFrameCount_); + } + if (state_ != com.google.cloud.migrationcenter.v1.Source.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, state_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.Source)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.Source other = + (com.google.cloud.migrationcenter.v1.Source) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (type_ != other.type_) return false; + if (getPriority() != other.getPriority()) return false; + if (getManaged() != other.getManaged()) return false; + if (getPendingFrameCount() != other.getPendingFrameCount()) return false; + if (getErrorFrameCount() != other.getErrorFrameCount()) return false; + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + hash = (37 * hash) + MANAGED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getManaged()); + hash = (37 * hash) + PENDING_FRAME_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getPendingFrameCount(); + hash = (37 * hash) + ERROR_FRAME_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getErrorFrameCount(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.Source parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Source parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Source parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Source parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Source parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.Source parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Source parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Source parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Source parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Source parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.Source parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.Source parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.Source prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Source represents an object from which asset information is
+   * streamed to Migration Center.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.Source} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.Source) + com.google.cloud.migrationcenter.v1.SourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Source_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Source_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.Source.class, + com.google.cloud.migrationcenter.v1.Source.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.Source.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + displayName_ = ""; + description_ = ""; + type_ = 0; + priority_ = 0; + managed_ = false; + pendingFrameCount_ = 0; + errorFrameCount_ = 0; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_Source_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Source getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.Source.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Source build() { + com.google.cloud.migrationcenter.v1.Source result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Source buildPartial() { + com.google.cloud.migrationcenter.v1.Source result = + new com.google.cloud.migrationcenter.v1.Source(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.Source result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.priority_ = priority_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.managed_ = managed_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.pendingFrameCount_ = pendingFrameCount_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.errorFrameCount_ = errorFrameCount_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.state_ = state_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.Source) { + return mergeFrom((com.google.cloud.migrationcenter.v1.Source) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.Source other) { + if (other == com.google.cloud.migrationcenter.v1.Source.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + if (other.getManaged() != false) { + setManaged(other.getManaged()); + } + if (other.getPendingFrameCount() != 0) { + setPendingFrameCount(other.getPendingFrameCount()); + } + if (other.getErrorFrameCount() != 0) { + setErrorFrameCount(other.getErrorFrameCount()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + managed_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: + { + pendingFrameCount_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: + { + errorFrameCount_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The full name of the source.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The full name of the source.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The full name of the source.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The full name of the source.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The full name of the source.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the source was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the source was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the source was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the source was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the source was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the source was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the source was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the source was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the source was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the source was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The timestamp when the source was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the source was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the source was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the source was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the source was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the source was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the source was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the source was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * User-friendly display name.
+     * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User-friendly display name.
+     * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User-friendly display name.
+     * 
+ * + * string display_name = 4; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name.
+     * 
+ * + * string display_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * User-friendly display name.
+     * 
+ * + * string display_name = 4; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Free-text description.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Data source type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Data source type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Data source type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Source.SourceType getType() { + com.google.cloud.migrationcenter.v1.Source.SourceType result = + com.google.cloud.migrationcenter.v1.Source.SourceType.forNumber(type_); + return result == null + ? com.google.cloud.migrationcenter.v1.Source.SourceType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Data source type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.migrationcenter.v1.Source.SourceType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Data source type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000020); + type_ = 0; + onChanged(); + return this; + } + + private int priority_; + /** + * + * + *
+     * The information confidence of the source.
+     * The higher the value, the higher the confidence.
+     * 
+ * + * int32 priority = 7; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + /** + * + * + *
+     * The information confidence of the source.
+     * The higher the value, the higher the confidence.
+     * 
+ * + * int32 priority = 7; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The information confidence of the source.
+     * The higher the value, the higher the confidence.
+     * 
+ * + * int32 priority = 7; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000040); + priority_ = 0; + onChanged(); + return this; + } + + private boolean managed_; + /** + * + * + *
+     * If `true`, the source is managed by other service(s).
+     * 
+ * + * bool managed = 8; + * + * @return The managed. + */ + @java.lang.Override + public boolean getManaged() { + return managed_; + } + /** + * + * + *
+     * If `true`, the source is managed by other service(s).
+     * 
+ * + * bool managed = 8; + * + * @param value The managed to set. + * @return This builder for chaining. + */ + public Builder setManaged(boolean value) { + + managed_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * If `true`, the source is managed by other service(s).
+     * 
+ * + * bool managed = 8; + * + * @return This builder for chaining. + */ + public Builder clearManaged() { + bitField0_ = (bitField0_ & ~0x00000080); + managed_ = false; + onChanged(); + return this; + } + + private int pendingFrameCount_; + /** + * + * + *
+     * Output only. Number of frames that are still being processed.
+     * 
+ * + * int32 pending_frame_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pendingFrameCount. + */ + @java.lang.Override + public int getPendingFrameCount() { + return pendingFrameCount_; + } + /** + * + * + *
+     * Output only. Number of frames that are still being processed.
+     * 
+ * + * int32 pending_frame_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pendingFrameCount to set. + * @return This builder for chaining. + */ + public Builder setPendingFrameCount(int value) { + + pendingFrameCount_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of frames that are still being processed.
+     * 
+ * + * int32 pending_frame_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPendingFrameCount() { + bitField0_ = (bitField0_ & ~0x00000100); + pendingFrameCount_ = 0; + onChanged(); + return this; + } + + private int errorFrameCount_; + /** + * + * + *
+     * Output only. The number of frames that were reported by the source and
+     * contained errors.
+     * 
+ * + * int32 error_frame_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorFrameCount. + */ + @java.lang.Override + public int getErrorFrameCount() { + return errorFrameCount_; + } + /** + * + * + *
+     * Output only. The number of frames that were reported by the source and
+     * contained errors.
+     * 
+ * + * int32 error_frame_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The errorFrameCount to set. + * @return This builder for chaining. + */ + public Builder setErrorFrameCount(int value) { + + errorFrameCount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of frames that were reported by the source and
+     * contained errors.
+     * 
+ * + * int32 error_frame_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearErrorFrameCount() { + bitField0_ = (bitField0_ & ~0x00000200); + errorFrameCount_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The state of the source.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The state of the source.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of the source.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Source.State getState() { + com.google.cloud.migrationcenter.v1.Source.State result = + com.google.cloud.migrationcenter.v1.Source.State.forNumber(state_); + return result == null + ? com.google.cloud.migrationcenter.v1.Source.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The state of the source.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.migrationcenter.v1.Source.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of the source.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000400); + state_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.Source) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.Source) + private static final com.google.cloud.migrationcenter.v1.Source DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.Source(); + } + + public static com.google.cloud.migrationcenter.v1.Source getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Source parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Source getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SourceName.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SourceName.java new file mode 100644 index 000000000000..f63be3158240 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SourceName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class SourceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_SOURCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/sources/{source}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String source; + + @Deprecated + protected SourceName() { + project = null; + location = null; + source = null; + } + + private SourceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + source = Preconditions.checkNotNull(builder.getSource()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSource() { + return source; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SourceName of(String project, String location, String source) { + return newBuilder().setProject(project).setLocation(location).setSource(source).build(); + } + + public static String format(String project, String location, String source) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setSource(source) + .build() + .toString(); + } + + public static SourceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_SOURCE.validatedMatch( + formattedString, "SourceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("source")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (SourceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_SOURCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (source != null) { + fieldMapBuilder.put("source", source); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SOURCE.instantiate( + "project", project, "location", location, "source", source); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + SourceName that = ((SourceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.source, that.source); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(source); + return h; + } + + /** Builder for projects/{project}/locations/{location}/sources/{source}. */ + public static class Builder { + private String project; + private String location; + private String source; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSource() { + return source; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setSource(String source) { + this.source = source; + return this; + } + + private Builder(SourceName sourceName) { + this.project = sourceName.project; + this.location = sourceName.location; + this.source = sourceName.source; + } + + public SourceName build() { + return new SourceName(this); + } + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SourceOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SourceOrBuilder.java new file mode 100644 index 000000000000..388fb11613e0 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/SourceOrBuilder.java @@ -0,0 +1,284 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface SourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.Source) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The full name of the source.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The full name of the source.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the source was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the source was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the source was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the source was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the source was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the source was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * User-friendly display name.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * User-friendly display name.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Free-text description.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Data source type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Data source type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + * + * @return The type. + */ + com.google.cloud.migrationcenter.v1.Source.SourceType getType(); + + /** + * + * + *
+   * The information confidence of the source.
+   * The higher the value, the higher the confidence.
+   * 
+ * + * int32 priority = 7; + * + * @return The priority. + */ + int getPriority(); + + /** + * + * + *
+   * If `true`, the source is managed by other service(s).
+   * 
+ * + * bool managed = 8; + * + * @return The managed. + */ + boolean getManaged(); + + /** + * + * + *
+   * Output only. Number of frames that are still being processed.
+   * 
+ * + * int32 pending_frame_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pendingFrameCount. + */ + int getPendingFrameCount(); + + /** + * + * + *
+   * Output only. The number of frames that were reported by the source and
+   * contained errors.
+   * 
+ * + * int32 error_frame_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorFrameCount. + */ + int getErrorFrameCount(); + + /** + * + * + *
+   * Output only. The state of the source.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The state of the source.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.migrationcenter.v1.Source.State getState(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateAssetRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateAssetRequest.java new file mode 100644 index 000000000000..93fe886ff709 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateAssetRequest.java @@ -0,0 +1,1325 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to update an asset.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdateAssetRequest} + */ +public final class UpdateAssetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.UpdateAssetRequest) + UpdateAssetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateAssetRequest.newBuilder() to construct. + private UpdateAssetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAssetRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAssetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdateAssetRequest.class, + com.google.cloud.migrationcenter.v1.UpdateAssetRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int ASSET_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.Asset asset_; + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the asset field is set. + */ + @java.lang.Override + public boolean hasAsset() { + return asset_ != null; + } + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The asset. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Asset getAsset() { + return asset_ == null ? com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance() : asset_; + } + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.AssetOrBuilder getAssetOrBuilder() { + return asset_ == null ? com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance() : asset_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (asset_ != null) { + output.writeMessage(2, getAsset()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (asset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAsset()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.UpdateAssetRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.UpdateAssetRequest other = + (com.google.cloud.migrationcenter.v1.UpdateAssetRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasAsset() != other.hasAsset()) return false; + if (hasAsset()) { + if (!getAsset().equals(other.getAsset())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasAsset()) { + hash = (37 * hash) + ASSET_FIELD_NUMBER; + hash = (53 * hash) + getAsset().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.UpdateAssetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update an asset.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdateAssetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.UpdateAssetRequest) + com.google.cloud.migrationcenter.v1.UpdateAssetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdateAssetRequest.class, + com.google.cloud.migrationcenter.v1.UpdateAssetRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.UpdateAssetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + asset_ = null; + if (assetBuilder_ != null) { + assetBuilder_.dispose(); + assetBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateAssetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateAssetRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.UpdateAssetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateAssetRequest build() { + com.google.cloud.migrationcenter.v1.UpdateAssetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateAssetRequest buildPartial() { + com.google.cloud.migrationcenter.v1.UpdateAssetRequest result = + new com.google.cloud.migrationcenter.v1.UpdateAssetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.UpdateAssetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.asset_ = assetBuilder_ == null ? asset_ : assetBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.UpdateAssetRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.UpdateAssetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.UpdateAssetRequest other) { + if (other == com.google.cloud.migrationcenter.v1.UpdateAssetRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasAsset()) { + mergeAsset(other.getAsset()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getAssetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.migrationcenter.v1.Asset asset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Asset, + com.google.cloud.migrationcenter.v1.Asset.Builder, + com.google.cloud.migrationcenter.v1.AssetOrBuilder> + assetBuilder_; + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the asset field is set. + */ + public boolean hasAsset() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The asset. + */ + public com.google.cloud.migrationcenter.v1.Asset getAsset() { + if (assetBuilder_ == null) { + return asset_ == null + ? com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance() + : asset_; + } else { + return assetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAsset(com.google.cloud.migrationcenter.v1.Asset value) { + if (assetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + asset_ = value; + } else { + assetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAsset(com.google.cloud.migrationcenter.v1.Asset.Builder builderForValue) { + if (assetBuilder_ == null) { + asset_ = builderForValue.build(); + } else { + assetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAsset(com.google.cloud.migrationcenter.v1.Asset value) { + if (assetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && asset_ != null + && asset_ != com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance()) { + getAssetBuilder().mergeFrom(value); + } else { + asset_ = value; + } + } else { + assetBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAsset() { + bitField0_ = (bitField0_ & ~0x00000002); + asset_ = null; + if (assetBuilder_ != null) { + assetBuilder_.dispose(); + assetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.Asset.Builder getAssetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAssetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.AssetOrBuilder getAssetOrBuilder() { + if (assetBuilder_ != null) { + return assetBuilder_.getMessageOrBuilder(); + } else { + return asset_ == null + ? com.google.cloud.migrationcenter.v1.Asset.getDefaultInstance() + : asset_; + } + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Asset, + com.google.cloud.migrationcenter.v1.Asset.Builder, + com.google.cloud.migrationcenter.v1.AssetOrBuilder> + getAssetFieldBuilder() { + if (assetBuilder_ == null) { + assetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Asset, + com.google.cloud.migrationcenter.v1.Asset.Builder, + com.google.cloud.migrationcenter.v1.AssetOrBuilder>( + getAsset(), getParentForChildren(), isClean()); + asset_ = null; + } + return assetBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.UpdateAssetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.UpdateAssetRequest) + private static final com.google.cloud.migrationcenter.v1.UpdateAssetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.UpdateAssetRequest(); + } + + public static com.google.cloud.migrationcenter.v1.UpdateAssetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAssetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateAssetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateAssetRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateAssetRequestOrBuilder.java new file mode 100644 index 000000000000..026e79624217 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateAssetRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface UpdateAssetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.UpdateAssetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the asset field is set. + */ + boolean hasAsset(); + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The asset. + */ + com.google.cloud.migrationcenter.v1.Asset getAsset(); + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.AssetOrBuilder getAssetOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateGroupRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateGroupRequest.java new file mode 100644 index 000000000000..6b05b5d431a1 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateGroupRequest.java @@ -0,0 +1,1313 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to update a group.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdateGroupRequest} + */ +public final class UpdateGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.UpdateGroupRequest) + UpdateGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateGroupRequest.newBuilder() to construct. + private UpdateGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateGroupRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdateGroupRequest.class, + com.google.cloud.migrationcenter.v1.UpdateGroupRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Group` resource by the update.
+   * The values specified in the `update_mask` are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Group` resource by the update.
+   * The values specified in the `update_mask` are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Group` resource by the update.
+   * The values specified in the `update_mask` are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int GROUP_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.Group group_; + /** + * + * + *
+   * Required. The group resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the group field is set. + */ + @java.lang.Override + public boolean hasGroup() { + return group_ != null; + } + /** + * + * + *
+   * Required. The group resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The group. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Group getGroup() { + return group_ == null ? com.google.cloud.migrationcenter.v1.Group.getDefaultInstance() : group_; + } + /** + * + * + *
+   * Required. The group resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.GroupOrBuilder getGroupOrBuilder() { + return group_ == null ? com.google.cloud.migrationcenter.v1.Group.getDefaultInstance() : group_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (group_ != null) { + output.writeMessage(2, getGroup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (group_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGroup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.UpdateGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.UpdateGroupRequest other = + (com.google.cloud.migrationcenter.v1.UpdateGroupRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasGroup() != other.hasGroup()) return false; + if (hasGroup()) { + if (!getGroup().equals(other.getGroup())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasGroup()) { + hash = (37 * hash) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.UpdateGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update a group.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdateGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.UpdateGroupRequest) + com.google.cloud.migrationcenter.v1.UpdateGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdateGroupRequest.class, + com.google.cloud.migrationcenter.v1.UpdateGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.UpdateGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + group_ = null; + if (groupBuilder_ != null) { + groupBuilder_.dispose(); + groupBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateGroupRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.UpdateGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateGroupRequest build() { + com.google.cloud.migrationcenter.v1.UpdateGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateGroupRequest buildPartial() { + com.google.cloud.migrationcenter.v1.UpdateGroupRequest result = + new com.google.cloud.migrationcenter.v1.UpdateGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.UpdateGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.group_ = groupBuilder_ == null ? group_ : groupBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.UpdateGroupRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.UpdateGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.UpdateGroupRequest other) { + if (other == com.google.cloud.migrationcenter.v1.UpdateGroupRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasGroup()) { + mergeGroup(other.getGroup()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getGroupFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Group` resource by the update.
+     * The values specified in the `update_mask` are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Group` resource by the update.
+     * The values specified in the `update_mask` are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Group` resource by the update.
+     * The values specified in the `update_mask` are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Group` resource by the update.
+     * The values specified in the `update_mask` are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Group` resource by the update.
+     * The values specified in the `update_mask` are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Group` resource by the update.
+     * The values specified in the `update_mask` are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Group` resource by the update.
+     * The values specified in the `update_mask` are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Group` resource by the update.
+     * The values specified in the `update_mask` are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Group` resource by the update.
+     * The values specified in the `update_mask` are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.migrationcenter.v1.Group group_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Group, + com.google.cloud.migrationcenter.v1.Group.Builder, + com.google.cloud.migrationcenter.v1.GroupOrBuilder> + groupBuilder_; + /** + * + * + *
+     * Required. The group resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the group field is set. + */ + public boolean hasGroup() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The group resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The group. + */ + public com.google.cloud.migrationcenter.v1.Group getGroup() { + if (groupBuilder_ == null) { + return group_ == null + ? com.google.cloud.migrationcenter.v1.Group.getDefaultInstance() + : group_; + } else { + return groupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The group resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGroup(com.google.cloud.migrationcenter.v1.Group value) { + if (groupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + group_ = value; + } else { + groupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The group resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGroup(com.google.cloud.migrationcenter.v1.Group.Builder builderForValue) { + if (groupBuilder_ == null) { + group_ = builderForValue.build(); + } else { + groupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The group resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeGroup(com.google.cloud.migrationcenter.v1.Group value) { + if (groupBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && group_ != null + && group_ != com.google.cloud.migrationcenter.v1.Group.getDefaultInstance()) { + getGroupBuilder().mergeFrom(value); + } else { + group_ = value; + } + } else { + groupBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The group resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGroup() { + bitField0_ = (bitField0_ & ~0x00000002); + group_ = null; + if (groupBuilder_ != null) { + groupBuilder_.dispose(); + groupBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The group resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.Group.Builder getGroupBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The group resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.GroupOrBuilder getGroupOrBuilder() { + if (groupBuilder_ != null) { + return groupBuilder_.getMessageOrBuilder(); + } else { + return group_ == null + ? com.google.cloud.migrationcenter.v1.Group.getDefaultInstance() + : group_; + } + } + /** + * + * + *
+     * Required. The group resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Group, + com.google.cloud.migrationcenter.v1.Group.Builder, + com.google.cloud.migrationcenter.v1.GroupOrBuilder> + getGroupFieldBuilder() { + if (groupBuilder_ == null) { + groupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Group, + com.google.cloud.migrationcenter.v1.Group.Builder, + com.google.cloud.migrationcenter.v1.GroupOrBuilder>( + getGroup(), getParentForChildren(), isClean()); + group_ = null; + } + return groupBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.UpdateGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.UpdateGroupRequest) + private static final com.google.cloud.migrationcenter.v1.UpdateGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.UpdateGroupRequest(); + } + + public static com.google.cloud.migrationcenter.v1.UpdateGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateGroupRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateGroupRequestOrBuilder.java new file mode 100644 index 000000000000..acee177e2670 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateGroupRequestOrBuilder.java @@ -0,0 +1,165 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface UpdateGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.UpdateGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Group` resource by the update.
+   * The values specified in the `update_mask` are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Group` resource by the update.
+   * The values specified in the `update_mask` are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Group` resource by the update.
+   * The values specified in the `update_mask` are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The group resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the group field is set. + */ + boolean hasGroup(); + /** + * + * + *
+   * Required. The group resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The group. + */ + com.google.cloud.migrationcenter.v1.Group getGroup(); + /** + * + * + *
+   * Required. The group resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.GroupOrBuilder getGroupOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateImportJobRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateImportJobRequest.java new file mode 100644 index 000000000000..79485b776a66 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateImportJobRequest.java @@ -0,0 +1,1330 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to update an import job.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdateImportJobRequest} + */ +public final class UpdateImportJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.UpdateImportJobRequest) + UpdateImportJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateImportJobRequest.newBuilder() to construct. + private UpdateImportJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateImportJobRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateImportJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest.class, + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int IMPORT_JOB_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.ImportJob importJob_; + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importJob field is set. + */ + @java.lang.Override + public boolean hasImportJob() { + return importJob_ != null; + } + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importJob. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJob getImportJob() { + return importJob_ == null + ? com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance() + : importJob_; + } + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportJobOrBuilder getImportJobOrBuilder() { + return importJob_ == null + ? com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance() + : importJob_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (importJob_ != null) { + output.writeMessage(2, getImportJob()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (importJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getImportJob()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.UpdateImportJobRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest other = + (com.google.cloud.migrationcenter.v1.UpdateImportJobRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasImportJob() != other.hasImportJob()) return false; + if (hasImportJob()) { + if (!getImportJob().equals(other.getImportJob())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasImportJob()) { + hash = (37 * hash) + IMPORT_JOB_FIELD_NUMBER; + hash = (53 * hash) + getImportJob().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update an import job.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdateImportJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.UpdateImportJobRequest) + com.google.cloud.migrationcenter.v1.UpdateImportJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest.class, + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.UpdateImportJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + importJob_ = null; + if (importJobBuilder_ != null) { + importJobBuilder_.dispose(); + importJobBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateImportJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateImportJobRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.UpdateImportJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateImportJobRequest build() { + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateImportJobRequest buildPartial() { + com.google.cloud.migrationcenter.v1.UpdateImportJobRequest result = + new com.google.cloud.migrationcenter.v1.UpdateImportJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.UpdateImportJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.importJob_ = importJobBuilder_ == null ? importJob_ : importJobBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.UpdateImportJobRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.UpdateImportJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.UpdateImportJobRequest other) { + if (other == com.google.cloud.migrationcenter.v1.UpdateImportJobRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasImportJob()) { + mergeImportJob(other.getImportJob()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getImportJobFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Asset` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.migrationcenter.v1.ImportJob importJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportJob, + com.google.cloud.migrationcenter.v1.ImportJob.Builder, + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder> + importJobBuilder_; + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importJob field is set. + */ + public boolean hasImportJob() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importJob. + */ + public com.google.cloud.migrationcenter.v1.ImportJob getImportJob() { + if (importJobBuilder_ == null) { + return importJob_ == null + ? com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance() + : importJob_; + } else { + return importJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setImportJob(com.google.cloud.migrationcenter.v1.ImportJob value) { + if (importJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + importJob_ = value; + } else { + importJobBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setImportJob( + com.google.cloud.migrationcenter.v1.ImportJob.Builder builderForValue) { + if (importJobBuilder_ == null) { + importJob_ = builderForValue.build(); + } else { + importJobBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeImportJob(com.google.cloud.migrationcenter.v1.ImportJob value) { + if (importJobBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && importJob_ != null + && importJob_ != com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance()) { + getImportJobBuilder().mergeFrom(value); + } else { + importJob_ = value; + } + } else { + importJobBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearImportJob() { + bitField0_ = (bitField0_ & ~0x00000002); + importJob_ = null; + if (importJobBuilder_ != null) { + importJobBuilder_.dispose(); + importJobBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ImportJob.Builder getImportJobBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getImportJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.ImportJobOrBuilder getImportJobOrBuilder() { + if (importJobBuilder_ != null) { + return importJobBuilder_.getMessageOrBuilder(); + } else { + return importJob_ == null + ? com.google.cloud.migrationcenter.v1.ImportJob.getDefaultInstance() + : importJob_; + } + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportJob, + com.google.cloud.migrationcenter.v1.ImportJob.Builder, + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder> + getImportJobFieldBuilder() { + if (importJobBuilder_ == null) { + importJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportJob, + com.google.cloud.migrationcenter.v1.ImportJob.Builder, + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder>( + getImportJob(), getParentForChildren(), isClean()); + importJob_ = null; + } + return importJobBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.UpdateImportJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.UpdateImportJobRequest) + private static final com.google.cloud.migrationcenter.v1.UpdateImportJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.UpdateImportJobRequest(); + } + + public static com.google.cloud.migrationcenter.v1.UpdateImportJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateImportJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateImportJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateImportJobRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateImportJobRequestOrBuilder.java new file mode 100644 index 000000000000..5b51b6d107e4 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateImportJobRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface UpdateImportJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.UpdateImportJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Asset` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importJob field is set. + */ + boolean hasImportJob(); + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importJob. + */ + com.google.cloud.migrationcenter.v1.ImportJob getImportJob(); + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.ImportJobOrBuilder getImportJobOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdatePreferenceSetRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdatePreferenceSetRequest.java new file mode 100644 index 000000000000..14867c6fa1ec --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdatePreferenceSetRequest.java @@ -0,0 +1,1338 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to update a preference set.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest} + */ +public final class UpdatePreferenceSetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest) + UpdatePreferenceSetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdatePreferenceSetRequest.newBuilder() to construct. + private UpdatePreferenceSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdatePreferenceSetRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdatePreferenceSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdatePreferenceSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdatePreferenceSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest.class, + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `PreferenceSet` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `PreferenceSet` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `PreferenceSet` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int PREFERENCE_SET_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.PreferenceSet preferenceSet_; + /** + * + * + *
+   * Required. The preference set resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the preferenceSet field is set. + */ + @java.lang.Override + public boolean hasPreferenceSet() { + return preferenceSet_ != null; + } + /** + * + * + *
+   * Required. The preference set resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The preferenceSet. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PreferenceSet getPreferenceSet() { + return preferenceSet_ == null + ? com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance() + : preferenceSet_; + } + /** + * + * + *
+   * Required. The preference set resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder getPreferenceSetOrBuilder() { + return preferenceSet_ == null + ? com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance() + : preferenceSet_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (preferenceSet_ != null) { + output.writeMessage(2, getPreferenceSet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (preferenceSet_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPreferenceSet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest other = + (com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasPreferenceSet() != other.hasPreferenceSet()) return false; + if (hasPreferenceSet()) { + if (!getPreferenceSet().equals(other.getPreferenceSet())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasPreferenceSet()) { + hash = (37 * hash) + PREFERENCE_SET_FIELD_NUMBER; + hash = (53 * hash) + getPreferenceSet().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update a preference set.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest) + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdatePreferenceSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdatePreferenceSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest.class, + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + preferenceSet_ = null; + if (preferenceSetBuilder_ != null) { + preferenceSetBuilder_.dispose(); + preferenceSetBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdatePreferenceSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest build() { + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest buildPartial() { + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest result = + new com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.preferenceSet_ = + preferenceSetBuilder_ == null ? preferenceSet_ : preferenceSetBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasPreferenceSet()) { + mergePreferenceSet(other.getPreferenceSet()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getPreferenceSetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `PreferenceSet` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `PreferenceSet` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `PreferenceSet` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `PreferenceSet` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `PreferenceSet` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `PreferenceSet` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `PreferenceSet` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `PreferenceSet` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `PreferenceSet` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.migrationcenter.v1.PreferenceSet preferenceSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PreferenceSet, + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder, + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder> + preferenceSetBuilder_; + /** + * + * + *
+     * Required. The preference set resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the preferenceSet field is set. + */ + public boolean hasPreferenceSet() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The preference set resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The preferenceSet. + */ + public com.google.cloud.migrationcenter.v1.PreferenceSet getPreferenceSet() { + if (preferenceSetBuilder_ == null) { + return preferenceSet_ == null + ? com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance() + : preferenceSet_; + } else { + return preferenceSetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The preference set resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPreferenceSet(com.google.cloud.migrationcenter.v1.PreferenceSet value) { + if (preferenceSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + preferenceSet_ = value; + } else { + preferenceSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The preference set resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPreferenceSet( + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder builderForValue) { + if (preferenceSetBuilder_ == null) { + preferenceSet_ = builderForValue.build(); + } else { + preferenceSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The preference set resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePreferenceSet(com.google.cloud.migrationcenter.v1.PreferenceSet value) { + if (preferenceSetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && preferenceSet_ != null + && preferenceSet_ + != com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance()) { + getPreferenceSetBuilder().mergeFrom(value); + } else { + preferenceSet_ = value; + } + } else { + preferenceSetBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The preference set resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPreferenceSet() { + bitField0_ = (bitField0_ & ~0x00000002); + preferenceSet_ = null; + if (preferenceSetBuilder_ != null) { + preferenceSetBuilder_.dispose(); + preferenceSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The preference set resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.PreferenceSet.Builder getPreferenceSetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPreferenceSetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The preference set resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder getPreferenceSetOrBuilder() { + if (preferenceSetBuilder_ != null) { + return preferenceSetBuilder_.getMessageOrBuilder(); + } else { + return preferenceSet_ == null + ? com.google.cloud.migrationcenter.v1.PreferenceSet.getDefaultInstance() + : preferenceSet_; + } + } + /** + * + * + *
+     * Required. The preference set resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PreferenceSet, + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder, + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder> + getPreferenceSetFieldBuilder() { + if (preferenceSetBuilder_ == null) { + preferenceSetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.PreferenceSet, + com.google.cloud.migrationcenter.v1.PreferenceSet.Builder, + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder>( + getPreferenceSet(), getParentForChildren(), isClean()); + preferenceSet_ = null; + } + return preferenceSetBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest) + private static final com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest(); + } + + public static com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePreferenceSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdatePreferenceSetRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdatePreferenceSetRequestOrBuilder.java new file mode 100644 index 000000000000..28c19fd6200f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdatePreferenceSetRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface UpdatePreferenceSetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `PreferenceSet` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `PreferenceSet` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `PreferenceSet` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The preference set resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the preferenceSet field is set. + */ + boolean hasPreferenceSet(); + /** + * + * + *
+   * Required. The preference set resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The preferenceSet. + */ + com.google.cloud.migrationcenter.v1.PreferenceSet getPreferenceSet(); + /** + * + * + *
+   * Required. The preference set resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.PreferenceSetOrBuilder getPreferenceSetOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSettingsRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSettingsRequest.java new file mode 100644 index 000000000000..600e1c5126d6 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSettingsRequest.java @@ -0,0 +1,1330 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to update the settings.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdateSettingsRequest} + */ +public final class UpdateSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.UpdateSettingsRequest) + UpdateSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateSettingsRequest.newBuilder() to construct. + private UpdateSettingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateSettingsRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateSettingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest.class, + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Settings` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Settings` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Settings` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int SETTINGS_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.Settings settings_; + /** + * + * + *
+   * Required. The project settings resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the settings field is set. + */ + @java.lang.Override + public boolean hasSettings() { + return settings_ != null; + } + /** + * + * + *
+   * Required. The project settings resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The settings. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Settings getSettings() { + return settings_ == null + ? com.google.cloud.migrationcenter.v1.Settings.getDefaultInstance() + : settings_; + } + /** + * + * + *
+   * Required. The project settings resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.SettingsOrBuilder getSettingsOrBuilder() { + return settings_ == null + ? com.google.cloud.migrationcenter.v1.Settings.getDefaultInstance() + : settings_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (settings_ != null) { + output.writeMessage(2, getSettings()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (settings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSettings()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.UpdateSettingsRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest other = + (com.google.cloud.migrationcenter.v1.UpdateSettingsRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasSettings() != other.hasSettings()) return false; + if (hasSettings()) { + if (!getSettings().equals(other.getSettings())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasSettings()) { + hash = (37 * hash) + SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSettings().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update the settings.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdateSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.UpdateSettingsRequest) + com.google.cloud.migrationcenter.v1.UpdateSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest.class, + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.UpdateSettingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + settings_ = null; + if (settingsBuilder_ != null) { + settingsBuilder_.dispose(); + settingsBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateSettingsRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.UpdateSettingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateSettingsRequest build() { + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateSettingsRequest buildPartial() { + com.google.cloud.migrationcenter.v1.UpdateSettingsRequest result = + new com.google.cloud.migrationcenter.v1.UpdateSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.UpdateSettingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.settings_ = settingsBuilder_ == null ? settings_ : settingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.UpdateSettingsRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.UpdateSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.UpdateSettingsRequest other) { + if (other == com.google.cloud.migrationcenter.v1.UpdateSettingsRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasSettings()) { + mergeSettings(other.getSettings()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Settings` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Settings` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Settings` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Settings` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Settings` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Settings` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Settings` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Settings` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Settings` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.migrationcenter.v1.Settings settings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Settings, + com.google.cloud.migrationcenter.v1.Settings.Builder, + com.google.cloud.migrationcenter.v1.SettingsOrBuilder> + settingsBuilder_; + /** + * + * + *
+     * Required. The project settings resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the settings field is set. + */ + public boolean hasSettings() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The project settings resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The settings. + */ + public com.google.cloud.migrationcenter.v1.Settings getSettings() { + if (settingsBuilder_ == null) { + return settings_ == null + ? com.google.cloud.migrationcenter.v1.Settings.getDefaultInstance() + : settings_; + } else { + return settingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The project settings resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSettings(com.google.cloud.migrationcenter.v1.Settings value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + settings_ = value; + } else { + settingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project settings resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSettings( + com.google.cloud.migrationcenter.v1.Settings.Builder builderForValue) { + if (settingsBuilder_ == null) { + settings_ = builderForValue.build(); + } else { + settingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project settings resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSettings(com.google.cloud.migrationcenter.v1.Settings value) { + if (settingsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && settings_ != null + && settings_ != com.google.cloud.migrationcenter.v1.Settings.getDefaultInstance()) { + getSettingsBuilder().mergeFrom(value); + } else { + settings_ = value; + } + } else { + settingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project settings resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSettings() { + bitField0_ = (bitField0_ & ~0x00000002); + settings_ = null; + if (settingsBuilder_ != null) { + settingsBuilder_.dispose(); + settingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project settings resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.Settings.Builder getSettingsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The project settings resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.SettingsOrBuilder getSettingsOrBuilder() { + if (settingsBuilder_ != null) { + return settingsBuilder_.getMessageOrBuilder(); + } else { + return settings_ == null + ? com.google.cloud.migrationcenter.v1.Settings.getDefaultInstance() + : settings_; + } + } + /** + * + * + *
+     * Required. The project settings resource being updated.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Settings, + com.google.cloud.migrationcenter.v1.Settings.Builder, + com.google.cloud.migrationcenter.v1.SettingsOrBuilder> + getSettingsFieldBuilder() { + if (settingsBuilder_ == null) { + settingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Settings, + com.google.cloud.migrationcenter.v1.Settings.Builder, + com.google.cloud.migrationcenter.v1.SettingsOrBuilder>( + getSettings(), getParentForChildren(), isClean()); + settings_ = null; + } + return settingsBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.UpdateSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.UpdateSettingsRequest) + private static final com.google.cloud.migrationcenter.v1.UpdateSettingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.UpdateSettingsRequest(); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSettingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateSettingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSettingsRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..0e7fb3b523f1 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSettingsRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface UpdateSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.UpdateSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Settings` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Settings` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Settings` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The project settings resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the settings field is set. + */ + boolean hasSettings(); + /** + * + * + *
+   * Required. The project settings resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The settings. + */ + com.google.cloud.migrationcenter.v1.Settings getSettings(); + /** + * + * + *
+   * Required. The project settings resource being updated.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.SettingsOrBuilder getSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSourceRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSourceRequest.java new file mode 100644 index 000000000000..8161bdba3a6f --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSourceRequest.java @@ -0,0 +1,1329 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to update a source.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdateSourceRequest} + */ +public final class UpdateSourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.UpdateSourceRequest) + UpdateSourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateSourceRequest.newBuilder() to construct. + private UpdateSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateSourceRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateSourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdateSourceRequest.class, + com.google.cloud.migrationcenter.v1.UpdateSourceRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Source` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Source` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Source` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int SOURCE_FIELD_NUMBER = 2; + private com.google.cloud.migrationcenter.v1.Source source_; + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.Source getSource() { + return source_ == null + ? com.google.cloud.migrationcenter.v1.Source.getDefaultInstance() + : source_; + } + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.SourceOrBuilder getSourceOrBuilder() { + return source_ == null + ? com.google.cloud.migrationcenter.v1.Source.getDefaultInstance() + : source_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (source_ != null) { + output.writeMessage(2, getSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.UpdateSourceRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.UpdateSourceRequest other = + (com.google.cloud.migrationcenter.v1.UpdateSourceRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.UpdateSourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update a source.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UpdateSourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.UpdateSourceRequest) + com.google.cloud.migrationcenter.v1.UpdateSourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UpdateSourceRequest.class, + com.google.cloud.migrationcenter.v1.UpdateSourceRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.UpdateSourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UpdateSourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateSourceRequest getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.UpdateSourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateSourceRequest build() { + com.google.cloud.migrationcenter.v1.UpdateSourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateSourceRequest buildPartial() { + com.google.cloud.migrationcenter.v1.UpdateSourceRequest result = + new com.google.cloud.migrationcenter.v1.UpdateSourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.UpdateSourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.source_ = sourceBuilder_ == null ? source_ : sourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.UpdateSourceRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.UpdateSourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.UpdateSourceRequest other) { + if (other == com.google.cloud.migrationcenter.v1.UpdateSourceRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getSourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Source` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Source` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Source` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Source` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Source` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Source` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Source` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Source` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Source` resource by the update.
+     * The values specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * A single * value in the mask lets you to overwrite all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.migrationcenter.v1.Source source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Source, + com.google.cloud.migrationcenter.v1.Source.Builder, + com.google.cloud.migrationcenter.v1.SourceOrBuilder> + sourceBuilder_; + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + public com.google.cloud.migrationcenter.v1.Source getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.migrationcenter.v1.Source.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.migrationcenter.v1.Source value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + } else { + sourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.migrationcenter.v1.Source.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSource(com.google.cloud.migrationcenter.v1.Source value) { + if (sourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && source_ != null + && source_ != com.google.cloud.migrationcenter.v1.Source.getDefaultInstance()) { + getSourceBuilder().mergeFrom(value); + } else { + source_ = value; + } + } else { + sourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000002); + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.Source.Builder getSourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.migrationcenter.v1.SourceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.migrationcenter.v1.Source.getDefaultInstance() + : source_; + } + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Source, + com.google.cloud.migrationcenter.v1.Source.Builder, + com.google.cloud.migrationcenter.v1.SourceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.Source, + com.google.cloud.migrationcenter.v1.Source.Builder, + com.google.cloud.migrationcenter.v1.SourceOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.UpdateSourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.UpdateSourceRequest) + private static final com.google.cloud.migrationcenter.v1.UpdateSourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.UpdateSourceRequest(); + } + + public static com.google.cloud.migrationcenter.v1.UpdateSourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UpdateSourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSourceRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSourceRequestOrBuilder.java new file mode 100644 index 000000000000..870c476f3901 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UpdateSourceRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface UpdateSourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.UpdateSourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Source` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Source` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Source` resource by the update.
+   * The values specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * A single * value in the mask lets you to overwrite all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + com.google.cloud.migrationcenter.v1.Source getSource(); + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.migrationcenter.v1.SourceOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UploadFileInfo.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UploadFileInfo.java new file mode 100644 index 000000000000..94aacb6bc76c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UploadFileInfo.java @@ -0,0 +1,1259 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A resource that contains a URI to which a data file can be uploaded.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UploadFileInfo} + */ +public final class UploadFileInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.UploadFileInfo) + UploadFileInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use UploadFileInfo.newBuilder() to construct. + private UploadFileInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UploadFileInfo() { + signedUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UploadFileInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetHeaders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UploadFileInfo.class, + com.google.cloud.migrationcenter.v1.UploadFileInfo.Builder.class); + } + + public static final int SIGNED_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object signedUri_ = ""; + /** + * + * + *
+   * Output only. Upload URI for the file.
+   * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The signedUri. + */ + @java.lang.Override + public java.lang.String getSignedUri() { + java.lang.Object ref = signedUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Upload URI for the file.
+   * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for signedUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignedUriBytes() { + java.lang.Object ref = signedUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + signedUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEADERS_FIELD_NUMBER = 2; + + private static final class HeadersDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_HeadersEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField headers_; + + private com.google.protobuf.MapField internalGetHeaders() { + if (headers_ == null) { + return com.google.protobuf.MapField.emptyMapField(HeadersDefaultEntryHolder.defaultEntry); + } + return headers_; + } + + public int getHeadersCount() { + return internalGetHeaders().getMap().size(); + } + /** + * + * + *
+   * Output only. The headers that were used to sign the URI.
+   * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsHeaders(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetHeaders().getMap().containsKey(key); + } + /** Use {@link #getHeadersMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + * + * + *
+   * Output only. The headers that were used to sign the URI.
+   * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + * + * + *
+   * Output only. The headers that were used to sign the URI.
+   * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getHeadersOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. The headers that were used to sign the URI.
+   * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getHeadersOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int URI_EXPIRATION_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp uriExpirationTime_; + /** + * + * + *
+   * Output only. Expiration time of the upload URI.
+   * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the uriExpirationTime field is set. + */ + @java.lang.Override + public boolean hasUriExpirationTime() { + return uriExpirationTime_ != null; + } + /** + * + * + *
+   * Output only. Expiration time of the upload URI.
+   * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The uriExpirationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUriExpirationTime() { + return uriExpirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : uriExpirationTime_; + } + /** + * + * + *
+   * Output only. Expiration time of the upload URI.
+   * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUriExpirationTimeOrBuilder() { + return uriExpirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : uriExpirationTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signedUri_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetHeaders(), HeadersDefaultEntryHolder.defaultEntry, 2); + if (uriExpirationTime_ != null) { + output.writeMessage(3, getUriExpirationTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signedUri_); + } + for (java.util.Map.Entry entry : + internalGetHeaders().getMap().entrySet()) { + com.google.protobuf.MapEntry headers__ = + HeadersDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, headers__); + } + if (uriExpirationTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUriExpirationTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.UploadFileInfo)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.UploadFileInfo other = + (com.google.cloud.migrationcenter.v1.UploadFileInfo) obj; + + if (!getSignedUri().equals(other.getSignedUri())) return false; + if (!internalGetHeaders().equals(other.internalGetHeaders())) return false; + if (hasUriExpirationTime() != other.hasUriExpirationTime()) return false; + if (hasUriExpirationTime()) { + if (!getUriExpirationTime().equals(other.getUriExpirationTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIGNED_URI_FIELD_NUMBER; + hash = (53 * hash) + getSignedUri().hashCode(); + if (!internalGetHeaders().getMap().isEmpty()) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeaders().hashCode(); + } + if (hasUriExpirationTime()) { + hash = (37 * hash) + URI_EXPIRATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUriExpirationTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.UploadFileInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that contains a URI to which a data file can be uploaded.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.UploadFileInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.UploadFileInfo) + com.google.cloud.migrationcenter.v1.UploadFileInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetHeaders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableHeaders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.UploadFileInfo.class, + com.google.cloud.migrationcenter.v1.UploadFileInfo.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.UploadFileInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + signedUri_ = ""; + internalGetMutableHeaders().clear(); + uriExpirationTime_ = null; + if (uriExpirationTimeBuilder_ != null) { + uriExpirationTimeBuilder_.dispose(); + uriExpirationTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_UploadFileInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UploadFileInfo getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.UploadFileInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UploadFileInfo build() { + com.google.cloud.migrationcenter.v1.UploadFileInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UploadFileInfo buildPartial() { + com.google.cloud.migrationcenter.v1.UploadFileInfo result = + new com.google.cloud.migrationcenter.v1.UploadFileInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.UploadFileInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.signedUri_ = signedUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.headers_ = internalGetHeaders(); + result.headers_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.uriExpirationTime_ = + uriExpirationTimeBuilder_ == null + ? uriExpirationTime_ + : uriExpirationTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.UploadFileInfo) { + return mergeFrom((com.google.cloud.migrationcenter.v1.UploadFileInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.UploadFileInfo other) { + if (other == com.google.cloud.migrationcenter.v1.UploadFileInfo.getDefaultInstance()) + return this; + if (!other.getSignedUri().isEmpty()) { + signedUri_ = other.signedUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableHeaders().mergeFrom(other.internalGetHeaders()); + bitField0_ |= 0x00000002; + if (other.hasUriExpirationTime()) { + mergeUriExpirationTime(other.getUriExpirationTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + signedUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry headers__ = + input.readMessage( + HeadersDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableHeaders() + .getMutableMap() + .put(headers__.getKey(), headers__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getUriExpirationTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object signedUri_ = ""; + /** + * + * + *
+     * Output only. Upload URI for the file.
+     * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The signedUri. + */ + public java.lang.String getSignedUri() { + java.lang.Object ref = signedUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Upload URI for the file.
+     * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for signedUri. + */ + public com.google.protobuf.ByteString getSignedUriBytes() { + java.lang.Object ref = signedUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + signedUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Upload URI for the file.
+     * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The signedUri to set. + * @return This builder for chaining. + */ + public Builder setSignedUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + signedUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Upload URI for the file.
+     * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSignedUri() { + signedUri_ = getDefaultInstance().getSignedUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Upload URI for the file.
+     * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for signedUri to set. + * @return This builder for chaining. + */ + public Builder setSignedUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + signedUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField headers_; + + private com.google.protobuf.MapField internalGetHeaders() { + if (headers_ == null) { + return com.google.protobuf.MapField.emptyMapField(HeadersDefaultEntryHolder.defaultEntry); + } + return headers_; + } + + private com.google.protobuf.MapField + internalGetMutableHeaders() { + if (headers_ == null) { + headers_ = com.google.protobuf.MapField.newMapField(HeadersDefaultEntryHolder.defaultEntry); + } + if (!headers_.isMutable()) { + headers_ = headers_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return headers_; + } + + public int getHeadersCount() { + return internalGetHeaders().getMap().size(); + } + /** + * + * + *
+     * Output only. The headers that were used to sign the URI.
+     * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsHeaders(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetHeaders().getMap().containsKey(key); + } + /** Use {@link #getHeadersMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + * + * + *
+     * Output only. The headers that were used to sign the URI.
+     * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + * + * + *
+     * Output only. The headers that were used to sign the URI.
+     * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getHeadersOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. The headers that were used to sign the URI.
+     * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getHeadersOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHeaders() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableHeaders().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. The headers that were used to sign the URI.
+     * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeHeaders(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableHeaders().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableHeaders() { + bitField0_ |= 0x00000002; + return internalGetMutableHeaders().getMutableMap(); + } + /** + * + * + *
+     * Output only. The headers that were used to sign the URI.
+     * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putHeaders(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableHeaders().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * Output only. The headers that were used to sign the URI.
+     * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllHeaders(java.util.Map values) { + internalGetMutableHeaders().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.protobuf.Timestamp uriExpirationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + uriExpirationTimeBuilder_; + /** + * + * + *
+     * Output only. Expiration time of the upload URI.
+     * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the uriExpirationTime field is set. + */ + public boolean hasUriExpirationTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Expiration time of the upload URI.
+     * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The uriExpirationTime. + */ + public com.google.protobuf.Timestamp getUriExpirationTime() { + if (uriExpirationTimeBuilder_ == null) { + return uriExpirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : uriExpirationTime_; + } else { + return uriExpirationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Expiration time of the upload URI.
+     * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUriExpirationTime(com.google.protobuf.Timestamp value) { + if (uriExpirationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + uriExpirationTime_ = value; + } else { + uriExpirationTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Expiration time of the upload URI.
+     * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUriExpirationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (uriExpirationTimeBuilder_ == null) { + uriExpirationTime_ = builderForValue.build(); + } else { + uriExpirationTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Expiration time of the upload URI.
+     * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUriExpirationTime(com.google.protobuf.Timestamp value) { + if (uriExpirationTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && uriExpirationTime_ != null + && uriExpirationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUriExpirationTimeBuilder().mergeFrom(value); + } else { + uriExpirationTime_ = value; + } + } else { + uriExpirationTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Expiration time of the upload URI.
+     * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUriExpirationTime() { + bitField0_ = (bitField0_ & ~0x00000004); + uriExpirationTime_ = null; + if (uriExpirationTimeBuilder_ != null) { + uriExpirationTimeBuilder_.dispose(); + uriExpirationTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Expiration time of the upload URI.
+     * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUriExpirationTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUriExpirationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Expiration time of the upload URI.
+     * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUriExpirationTimeOrBuilder() { + if (uriExpirationTimeBuilder_ != null) { + return uriExpirationTimeBuilder_.getMessageOrBuilder(); + } else { + return uriExpirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : uriExpirationTime_; + } + } + /** + * + * + *
+     * Output only. Expiration time of the upload URI.
+     * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUriExpirationTimeFieldBuilder() { + if (uriExpirationTimeBuilder_ == null) { + uriExpirationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUriExpirationTime(), getParentForChildren(), isClean()); + uriExpirationTime_ = null; + } + return uriExpirationTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.UploadFileInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.UploadFileInfo) + private static final com.google.cloud.migrationcenter.v1.UploadFileInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.UploadFileInfo(); + } + + public static com.google.cloud.migrationcenter.v1.UploadFileInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UploadFileInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.UploadFileInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UploadFileInfoOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UploadFileInfoOrBuilder.java new file mode 100644 index 000000000000..695536687ed7 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/UploadFileInfoOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface UploadFileInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.UploadFileInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Upload URI for the file.
+   * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The signedUri. + */ + java.lang.String getSignedUri(); + /** + * + * + *
+   * Output only. Upload URI for the file.
+   * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for signedUri. + */ + com.google.protobuf.ByteString getSignedUriBytes(); + + /** + * + * + *
+   * Output only. The headers that were used to sign the URI.
+   * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getHeadersCount(); + /** + * + * + *
+   * Output only. The headers that were used to sign the URI.
+   * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsHeaders(java.lang.String key); + /** Use {@link #getHeadersMap()} instead. */ + @java.lang.Deprecated + java.util.Map getHeaders(); + /** + * + * + *
+   * Output only. The headers that were used to sign the URI.
+   * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getHeadersMap(); + /** + * + * + *
+   * Output only. The headers that were used to sign the URI.
+   * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + /* nullable */ + java.lang.String getHeadersOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Output only. The headers that were used to sign the URI.
+   * 
+ * + * map<string, string> headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.lang.String getHeadersOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Expiration time of the upload URI.
+   * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the uriExpirationTime field is set. + */ + boolean hasUriExpirationTime(); + /** + * + * + *
+   * Output only. Expiration time of the upload URI.
+   * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The uriExpirationTime. + */ + com.google.protobuf.Timestamp getUriExpirationTime(); + /** + * + * + *
+   * Output only. Expiration time of the upload URI.
+   * 
+ * + * + * .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUriExpirationTimeOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidateImportJobRequest.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidateImportJobRequest.java new file mode 100644 index 000000000000..30f35be85231 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidateImportJobRequest.java @@ -0,0 +1,909 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A request to validate an import job.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ValidateImportJobRequest} + */ +public final class ValidateImportJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ValidateImportJobRequest) + ValidateImportJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidateImportJobRequest.newBuilder() to construct. + private ValidateImportJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ValidateImportJobRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ValidateImportJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ValidateImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ValidateImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest.class, + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the import job to validate.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the import job to validate.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ValidateImportJobRequest)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest other = + (com.google.cloud.migrationcenter.v1.ValidateImportJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to validate an import job.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ValidateImportJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ValidateImportJobRequest) + com.google.cloud.migrationcenter.v1.ValidateImportJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ValidateImportJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ValidateImportJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest.class, + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ValidateImportJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ValidateImportJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidateImportJobRequest + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ValidateImportJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidateImportJobRequest build() { + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidateImportJobRequest buildPartial() { + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest result = + new com.google.cloud.migrationcenter.v1.ValidateImportJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.ValidateImportJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ValidateImportJobRequest) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ValidateImportJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ValidateImportJobRequest other) { + if (other + == com.google.cloud.migrationcenter.v1.ValidateImportJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the import job to validate.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the import job to validate.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the import job to validate.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the import job to validate.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the import job to validate.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, 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).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ValidateImportJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ValidateImportJobRequest) + private static final com.google.cloud.migrationcenter.v1.ValidateImportJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ValidateImportJobRequest(); + } + + public static com.google.cloud.migrationcenter.v1.ValidateImportJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidateImportJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidateImportJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidateImportJobRequestOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidateImportJobRequestOrBuilder.java new file mode 100644 index 000000000000..d3e918d20f53 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidateImportJobRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ValidateImportJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ValidateImportJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the import job to validate.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the import job to validate.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, 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).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidationReport.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidationReport.java new file mode 100644 index 000000000000..e7f0ae7df3c1 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidationReport.java @@ -0,0 +1,1473 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * A resource that aggregates errors across import job files.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ValidationReport} + */ +public final class ValidationReport extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.ValidationReport) + ValidationReportOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidationReport.newBuilder() to construct. + private ValidationReport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ValidationReport() { + fileValidations_ = java.util.Collections.emptyList(); + jobErrors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ValidationReport(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ValidationReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ValidationReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ValidationReport.class, + com.google.cloud.migrationcenter.v1.ValidationReport.Builder.class); + } + + public static final int FILE_VALIDATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List fileValidations_; + /** + * + * + *
+   * List of errors found in files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + @java.lang.Override + public java.util.List + getFileValidationsList() { + return fileValidations_; + } + /** + * + * + *
+   * List of errors found in files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + @java.lang.Override + public java.util.List + getFileValidationsOrBuilderList() { + return fileValidations_; + } + /** + * + * + *
+   * List of errors found in files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + @java.lang.Override + public int getFileValidationsCount() { + return fileValidations_.size(); + } + /** + * + * + *
+   * List of errors found in files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FileValidationReport getFileValidations(int index) { + return fileValidations_.get(index); + } + /** + * + * + *
+   * List of errors found in files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.FileValidationReportOrBuilder + getFileValidationsOrBuilder(int index) { + return fileValidations_.get(index); + } + + public static final int JOB_ERRORS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List jobErrors_; + /** + * + * + *
+   * List of job level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + @java.lang.Override + public java.util.List getJobErrorsList() { + return jobErrors_; + } + /** + * + * + *
+   * List of job level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + @java.lang.Override + public java.util.List + getJobErrorsOrBuilderList() { + return jobErrors_; + } + /** + * + * + *
+   * List of job level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + @java.lang.Override + public int getJobErrorsCount() { + return jobErrors_.size(); + } + /** + * + * + *
+   * List of job level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportError getJobErrors(int index) { + return jobErrors_.get(index); + } + /** + * + * + *
+   * List of job level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder getJobErrorsOrBuilder(int index) { + return jobErrors_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < fileValidations_.size(); i++) { + output.writeMessage(1, fileValidations_.get(i)); + } + for (int i = 0; i < jobErrors_.size(); i++) { + output.writeMessage(2, jobErrors_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fileValidations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fileValidations_.get(i)); + } + for (int i = 0; i < jobErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, jobErrors_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.ValidationReport)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.ValidationReport other = + (com.google.cloud.migrationcenter.v1.ValidationReport) obj; + + if (!getFileValidationsList().equals(other.getFileValidationsList())) return false; + if (!getJobErrorsList().equals(other.getJobErrorsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFileValidationsCount() > 0) { + hash = (37 * hash) + FILE_VALIDATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFileValidationsList().hashCode(); + } + if (getJobErrorsCount() > 0) { + hash = (37 * hash) + JOB_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getJobErrorsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.ValidationReport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that aggregates errors across import job files.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.ValidationReport} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.ValidationReport) + com.google.cloud.migrationcenter.v1.ValidationReportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ValidationReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ValidationReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.ValidationReport.class, + com.google.cloud.migrationcenter.v1.ValidationReport.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.ValidationReport.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (fileValidationsBuilder_ == null) { + fileValidations_ = java.util.Collections.emptyList(); + } else { + fileValidations_ = null; + fileValidationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (jobErrorsBuilder_ == null) { + jobErrors_ = java.util.Collections.emptyList(); + } else { + jobErrors_ = null; + jobErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_ValidationReport_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidationReport getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidationReport build() { + com.google.cloud.migrationcenter.v1.ValidationReport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidationReport buildPartial() { + com.google.cloud.migrationcenter.v1.ValidationReport result = + new com.google.cloud.migrationcenter.v1.ValidationReport(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.migrationcenter.v1.ValidationReport result) { + if (fileValidationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fileValidations_ = java.util.Collections.unmodifiableList(fileValidations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fileValidations_ = fileValidations_; + } else { + result.fileValidations_ = fileValidationsBuilder_.build(); + } + if (jobErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + jobErrors_ = java.util.Collections.unmodifiableList(jobErrors_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.jobErrors_ = jobErrors_; + } else { + result.jobErrors_ = jobErrorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.ValidationReport result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.ValidationReport) { + return mergeFrom((com.google.cloud.migrationcenter.v1.ValidationReport) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.ValidationReport other) { + if (other == com.google.cloud.migrationcenter.v1.ValidationReport.getDefaultInstance()) + return this; + if (fileValidationsBuilder_ == null) { + if (!other.fileValidations_.isEmpty()) { + if (fileValidations_.isEmpty()) { + fileValidations_ = other.fileValidations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFileValidationsIsMutable(); + fileValidations_.addAll(other.fileValidations_); + } + onChanged(); + } + } else { + if (!other.fileValidations_.isEmpty()) { + if (fileValidationsBuilder_.isEmpty()) { + fileValidationsBuilder_.dispose(); + fileValidationsBuilder_ = null; + fileValidations_ = other.fileValidations_; + bitField0_ = (bitField0_ & ~0x00000001); + fileValidationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFileValidationsFieldBuilder() + : null; + } else { + fileValidationsBuilder_.addAllMessages(other.fileValidations_); + } + } + } + if (jobErrorsBuilder_ == null) { + if (!other.jobErrors_.isEmpty()) { + if (jobErrors_.isEmpty()) { + jobErrors_ = other.jobErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureJobErrorsIsMutable(); + jobErrors_.addAll(other.jobErrors_); + } + onChanged(); + } + } else { + if (!other.jobErrors_.isEmpty()) { + if (jobErrorsBuilder_.isEmpty()) { + jobErrorsBuilder_.dispose(); + jobErrorsBuilder_ = null; + jobErrors_ = other.jobErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + jobErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getJobErrorsFieldBuilder() + : null; + } else { + jobErrorsBuilder_.addAllMessages(other.jobErrors_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.migrationcenter.v1.FileValidationReport m = + input.readMessage( + com.google.cloud.migrationcenter.v1.FileValidationReport.parser(), + extensionRegistry); + if (fileValidationsBuilder_ == null) { + ensureFileValidationsIsMutable(); + fileValidations_.add(m); + } else { + fileValidationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.migrationcenter.v1.ImportError m = + input.readMessage( + com.google.cloud.migrationcenter.v1.ImportError.parser(), + extensionRegistry); + if (jobErrorsBuilder_ == null) { + ensureJobErrorsIsMutable(); + jobErrors_.add(m); + } else { + jobErrorsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + fileValidations_ = java.util.Collections.emptyList(); + + private void ensureFileValidationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fileValidations_ = + new java.util.ArrayList( + fileValidations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FileValidationReport, + com.google.cloud.migrationcenter.v1.FileValidationReport.Builder, + com.google.cloud.migrationcenter.v1.FileValidationReportOrBuilder> + fileValidationsBuilder_; + + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public java.util.List + getFileValidationsList() { + if (fileValidationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fileValidations_); + } else { + return fileValidationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public int getFileValidationsCount() { + if (fileValidationsBuilder_ == null) { + return fileValidations_.size(); + } else { + return fileValidationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public com.google.cloud.migrationcenter.v1.FileValidationReport getFileValidations(int index) { + if (fileValidationsBuilder_ == null) { + return fileValidations_.get(index); + } else { + return fileValidationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public Builder setFileValidations( + int index, com.google.cloud.migrationcenter.v1.FileValidationReport value) { + if (fileValidationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileValidationsIsMutable(); + fileValidations_.set(index, value); + onChanged(); + } else { + fileValidationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public Builder setFileValidations( + int index, + com.google.cloud.migrationcenter.v1.FileValidationReport.Builder builderForValue) { + if (fileValidationsBuilder_ == null) { + ensureFileValidationsIsMutable(); + fileValidations_.set(index, builderForValue.build()); + onChanged(); + } else { + fileValidationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public Builder addFileValidations( + com.google.cloud.migrationcenter.v1.FileValidationReport value) { + if (fileValidationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileValidationsIsMutable(); + fileValidations_.add(value); + onChanged(); + } else { + fileValidationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public Builder addFileValidations( + int index, com.google.cloud.migrationcenter.v1.FileValidationReport value) { + if (fileValidationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileValidationsIsMutable(); + fileValidations_.add(index, value); + onChanged(); + } else { + fileValidationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public Builder addFileValidations( + com.google.cloud.migrationcenter.v1.FileValidationReport.Builder builderForValue) { + if (fileValidationsBuilder_ == null) { + ensureFileValidationsIsMutable(); + fileValidations_.add(builderForValue.build()); + onChanged(); + } else { + fileValidationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public Builder addFileValidations( + int index, + com.google.cloud.migrationcenter.v1.FileValidationReport.Builder builderForValue) { + if (fileValidationsBuilder_ == null) { + ensureFileValidationsIsMutable(); + fileValidations_.add(index, builderForValue.build()); + onChanged(); + } else { + fileValidationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public Builder addAllFileValidations( + java.lang.Iterable + values) { + if (fileValidationsBuilder_ == null) { + ensureFileValidationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileValidations_); + onChanged(); + } else { + fileValidationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public Builder clearFileValidations() { + if (fileValidationsBuilder_ == null) { + fileValidations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fileValidationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public Builder removeFileValidations(int index) { + if (fileValidationsBuilder_ == null) { + ensureFileValidationsIsMutable(); + fileValidations_.remove(index); + onChanged(); + } else { + fileValidationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public com.google.cloud.migrationcenter.v1.FileValidationReport.Builder + getFileValidationsBuilder(int index) { + return getFileValidationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public com.google.cloud.migrationcenter.v1.FileValidationReportOrBuilder + getFileValidationsOrBuilder(int index) { + if (fileValidationsBuilder_ == null) { + return fileValidations_.get(index); + } else { + return fileValidationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.migrationcenter.v1.FileValidationReportOrBuilder> + getFileValidationsOrBuilderList() { + if (fileValidationsBuilder_ != null) { + return fileValidationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fileValidations_); + } + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public com.google.cloud.migrationcenter.v1.FileValidationReport.Builder + addFileValidationsBuilder() { + return getFileValidationsFieldBuilder() + .addBuilder( + com.google.cloud.migrationcenter.v1.FileValidationReport.getDefaultInstance()); + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public com.google.cloud.migrationcenter.v1.FileValidationReport.Builder + addFileValidationsBuilder(int index) { + return getFileValidationsFieldBuilder() + .addBuilder( + index, com.google.cloud.migrationcenter.v1.FileValidationReport.getDefaultInstance()); + } + /** + * + * + *
+     * List of errors found in files.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + public java.util.List + getFileValidationsBuilderList() { + return getFileValidationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FileValidationReport, + com.google.cloud.migrationcenter.v1.FileValidationReport.Builder, + com.google.cloud.migrationcenter.v1.FileValidationReportOrBuilder> + getFileValidationsFieldBuilder() { + if (fileValidationsBuilder_ == null) { + fileValidationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.FileValidationReport, + com.google.cloud.migrationcenter.v1.FileValidationReport.Builder, + com.google.cloud.migrationcenter.v1.FileValidationReportOrBuilder>( + fileValidations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fileValidations_ = null; + } + return fileValidationsBuilder_; + } + + private java.util.List jobErrors_ = + java.util.Collections.emptyList(); + + private void ensureJobErrorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + jobErrors_ = + new java.util.ArrayList(jobErrors_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportError, + com.google.cloud.migrationcenter.v1.ImportError.Builder, + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder> + jobErrorsBuilder_; + + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public java.util.List getJobErrorsList() { + if (jobErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jobErrors_); + } else { + return jobErrorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public int getJobErrorsCount() { + if (jobErrorsBuilder_ == null) { + return jobErrors_.size(); + } else { + return jobErrorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ImportError getJobErrors(int index) { + if (jobErrorsBuilder_ == null) { + return jobErrors_.get(index); + } else { + return jobErrorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public Builder setJobErrors(int index, com.google.cloud.migrationcenter.v1.ImportError value) { + if (jobErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobErrorsIsMutable(); + jobErrors_.set(index, value); + onChanged(); + } else { + jobErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public Builder setJobErrors( + int index, com.google.cloud.migrationcenter.v1.ImportError.Builder builderForValue) { + if (jobErrorsBuilder_ == null) { + ensureJobErrorsIsMutable(); + jobErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + jobErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public Builder addJobErrors(com.google.cloud.migrationcenter.v1.ImportError value) { + if (jobErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobErrorsIsMutable(); + jobErrors_.add(value); + onChanged(); + } else { + jobErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public Builder addJobErrors(int index, com.google.cloud.migrationcenter.v1.ImportError value) { + if (jobErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobErrorsIsMutable(); + jobErrors_.add(index, value); + onChanged(); + } else { + jobErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public Builder addJobErrors( + com.google.cloud.migrationcenter.v1.ImportError.Builder builderForValue) { + if (jobErrorsBuilder_ == null) { + ensureJobErrorsIsMutable(); + jobErrors_.add(builderForValue.build()); + onChanged(); + } else { + jobErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public Builder addJobErrors( + int index, com.google.cloud.migrationcenter.v1.ImportError.Builder builderForValue) { + if (jobErrorsBuilder_ == null) { + ensureJobErrorsIsMutable(); + jobErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + jobErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public Builder addAllJobErrors( + java.lang.Iterable values) { + if (jobErrorsBuilder_ == null) { + ensureJobErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobErrors_); + onChanged(); + } else { + jobErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public Builder clearJobErrors() { + if (jobErrorsBuilder_ == null) { + jobErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + jobErrorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public Builder removeJobErrors(int index) { + if (jobErrorsBuilder_ == null) { + ensureJobErrorsIsMutable(); + jobErrors_.remove(index); + onChanged(); + } else { + jobErrorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ImportError.Builder getJobErrorsBuilder(int index) { + return getJobErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder getJobErrorsOrBuilder( + int index) { + if (jobErrorsBuilder_ == null) { + return jobErrors_.get(index); + } else { + return jobErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public java.util.List + getJobErrorsOrBuilderList() { + if (jobErrorsBuilder_ != null) { + return jobErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jobErrors_); + } + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ImportError.Builder addJobErrorsBuilder() { + return getJobErrorsFieldBuilder() + .addBuilder(com.google.cloud.migrationcenter.v1.ImportError.getDefaultInstance()); + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public com.google.cloud.migrationcenter.v1.ImportError.Builder addJobErrorsBuilder(int index) { + return getJobErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.migrationcenter.v1.ImportError.getDefaultInstance()); + } + /** + * + * + *
+     * List of job level errors.
+     * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + public java.util.List + getJobErrorsBuilderList() { + return getJobErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportError, + com.google.cloud.migrationcenter.v1.ImportError.Builder, + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder> + getJobErrorsFieldBuilder() { + if (jobErrorsBuilder_ == null) { + jobErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ImportError, + com.google.cloud.migrationcenter.v1.ImportError.Builder, + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder>( + jobErrors_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + jobErrors_ = null; + } + return jobErrorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.ValidationReport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.ValidationReport) + private static final com.google.cloud.migrationcenter.v1.ValidationReport DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.ValidationReport(); + } + + public static com.google.cloud.migrationcenter.v1.ValidationReport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidationReport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ValidationReport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidationReportOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidationReportOrBuilder.java new file mode 100644 index 000000000000..3de08943faf5 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/ValidationReportOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface ValidationReportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.ValidationReport) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of errors found in files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + java.util.List getFileValidationsList(); + /** + * + * + *
+   * List of errors found in files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + com.google.cloud.migrationcenter.v1.FileValidationReport getFileValidations(int index); + /** + * + * + *
+   * List of errors found in files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + int getFileValidationsCount(); + /** + * + * + *
+   * List of errors found in files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + java.util.List + getFileValidationsOrBuilderList(); + /** + * + * + *
+   * List of errors found in files.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * + */ + com.google.cloud.migrationcenter.v1.FileValidationReportOrBuilder getFileValidationsOrBuilder( + int index); + + /** + * + * + *
+   * List of job level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + java.util.List getJobErrorsList(); + /** + * + * + *
+   * List of job level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + com.google.cloud.migrationcenter.v1.ImportError getJobErrors(int index); + /** + * + * + *
+   * List of job level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + int getJobErrorsCount(); + /** + * + * + *
+   * List of job level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + java.util.List + getJobErrorsOrBuilderList(); + /** + * + * + *
+   * List of job level errors.
+   * 
+ * + * repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + com.google.cloud.migrationcenter.v1.ImportErrorOrBuilder getJobErrorsOrBuilder(int index); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VirtualMachinePreferences.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VirtualMachinePreferences.java new file mode 100644 index 000000000000..35f0c7bfd633 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VirtualMachinePreferences.java @@ -0,0 +1,1447 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * VirtualMachinePreferences enables you to create sets of assumptions, for
+ * example, a geographical location and pricing track, for your migrated virtual
+ * machines. The set of preferences influence recommendations for migrating
+ * virtual machine assets.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.VirtualMachinePreferences} + */ +public final class VirtualMachinePreferences extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.VirtualMachinePreferences) + VirtualMachinePreferencesOrBuilder { + private static final long serialVersionUID = 0L; + // Use VirtualMachinePreferences.newBuilder() to construct. + private VirtualMachinePreferences(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VirtualMachinePreferences() { + commitmentPlan_ = 0; + sizingOptimizationStrategy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VirtualMachinePreferences(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VirtualMachinePreferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VirtualMachinePreferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.class, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder.class); + } + + public static final int REGION_PREFERENCES_FIELD_NUMBER = 3; + private com.google.cloud.migrationcenter.v1.RegionPreferences regionPreferences_; + /** + * + * + *
+   * Region preferences for assets using this preference set.
+   * If you are unsure which value to set, the migration service API region is
+   * often a good value to start with.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + * + * @return Whether the regionPreferences field is set. + */ + @java.lang.Override + public boolean hasRegionPreferences() { + return regionPreferences_ != null; + } + /** + * + * + *
+   * Region preferences for assets using this preference set.
+   * If you are unsure which value to set, the migration service API region is
+   * often a good value to start with.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + * + * @return The regionPreferences. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RegionPreferences getRegionPreferences() { + return regionPreferences_ == null + ? com.google.cloud.migrationcenter.v1.RegionPreferences.getDefaultInstance() + : regionPreferences_; + } + /** + * + * + *
+   * Region preferences for assets using this preference set.
+   * If you are unsure which value to set, the migration service API region is
+   * often a good value to start with.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.RegionPreferencesOrBuilder + getRegionPreferencesOrBuilder() { + return regionPreferences_ == null + ? com.google.cloud.migrationcenter.v1.RegionPreferences.getDefaultInstance() + : regionPreferences_; + } + + public static final int COMMITMENT_PLAN_FIELD_NUMBER = 4; + private int commitmentPlan_ = 0; + /** + * + * + *
+   * Commitment plan to consider when calculating costs for virtual machine
+   * insights and recommendations.
+   * If you are unsure which value to set, a 3 year commitment plan is often a
+   * good value to start with.
+   * 
+ * + * .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + * + * @return The enum numeric value on the wire for commitmentPlan. + */ + @java.lang.Override + public int getCommitmentPlanValue() { + return commitmentPlan_; + } + /** + * + * + *
+   * Commitment plan to consider when calculating costs for virtual machine
+   * insights and recommendations.
+   * If you are unsure which value to set, a 3 year commitment plan is often a
+   * good value to start with.
+   * 
+ * + * .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + * + * @return The commitmentPlan. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CommitmentPlan getCommitmentPlan() { + com.google.cloud.migrationcenter.v1.CommitmentPlan result = + com.google.cloud.migrationcenter.v1.CommitmentPlan.forNumber(commitmentPlan_); + return result == null + ? com.google.cloud.migrationcenter.v1.CommitmentPlan.UNRECOGNIZED + : result; + } + + public static final int SIZING_OPTIMIZATION_STRATEGY_FIELD_NUMBER = 5; + private int sizingOptimizationStrategy_ = 0; + /** + * + * + *
+   * Sizing optimization strategy specifies the preferred strategy used when
+   * extrapolating usage data to calculate insights and recommendations for a
+   * virtual machine.
+   * If you are unsure which value to set, a moderate sizing optimization
+   * strategy is often a good value to start with.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + * + * + * @return The enum numeric value on the wire for sizingOptimizationStrategy. + */ + @java.lang.Override + public int getSizingOptimizationStrategyValue() { + return sizingOptimizationStrategy_; + } + /** + * + * + *
+   * Sizing optimization strategy specifies the preferred strategy used when
+   * extrapolating usage data to calculate insights and recommendations for a
+   * virtual machine.
+   * If you are unsure which value to set, a moderate sizing optimization
+   * strategy is often a good value to start with.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + * + * + * @return The sizingOptimizationStrategy. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy + getSizingOptimizationStrategy() { + com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy result = + com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy.forNumber( + sizingOptimizationStrategy_); + return result == null + ? com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy.UNRECOGNIZED + : result; + } + + public static final int COMPUTE_ENGINE_PREFERENCES_FIELD_NUMBER = 6; + private com.google.cloud.migrationcenter.v1.ComputeEnginePreferences computeEnginePreferences_; + /** + * + * + *
+   * Compute Engine preferences concern insights and recommendations for Compute
+   * Engine target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + * + * @return Whether the computeEnginePreferences field is set. + */ + @java.lang.Override + public boolean hasComputeEnginePreferences() { + return computeEnginePreferences_ != null; + } + /** + * + * + *
+   * Compute Engine preferences concern insights and recommendations for Compute
+   * Engine target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + * + * @return The computeEnginePreferences. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEnginePreferences + getComputeEnginePreferences() { + return computeEnginePreferences_ == null + ? com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.getDefaultInstance() + : computeEnginePreferences_; + } + /** + * + * + *
+   * Compute Engine preferences concern insights and recommendations for Compute
+   * Engine target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.ComputeEnginePreferencesOrBuilder + getComputeEnginePreferencesOrBuilder() { + return computeEnginePreferences_ == null + ? com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.getDefaultInstance() + : computeEnginePreferences_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (regionPreferences_ != null) { + output.writeMessage(3, getRegionPreferences()); + } + if (commitmentPlan_ + != com.google.cloud.migrationcenter.v1.CommitmentPlan.COMMITMENT_PLAN_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, commitmentPlan_); + } + if (sizingOptimizationStrategy_ + != com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy + .SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, sizingOptimizationStrategy_); + } + if (computeEnginePreferences_ != null) { + output.writeMessage(6, getComputeEnginePreferences()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (regionPreferences_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRegionPreferences()); + } + if (commitmentPlan_ + != com.google.cloud.migrationcenter.v1.CommitmentPlan.COMMITMENT_PLAN_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, commitmentPlan_); + } + if (sizingOptimizationStrategy_ + != com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy + .SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, sizingOptimizationStrategy_); + } + if (computeEnginePreferences_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getComputeEnginePreferences()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.VirtualMachinePreferences)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences other = + (com.google.cloud.migrationcenter.v1.VirtualMachinePreferences) obj; + + if (hasRegionPreferences() != other.hasRegionPreferences()) return false; + if (hasRegionPreferences()) { + if (!getRegionPreferences().equals(other.getRegionPreferences())) return false; + } + if (commitmentPlan_ != other.commitmentPlan_) return false; + if (sizingOptimizationStrategy_ != other.sizingOptimizationStrategy_) return false; + if (hasComputeEnginePreferences() != other.hasComputeEnginePreferences()) return false; + if (hasComputeEnginePreferences()) { + if (!getComputeEnginePreferences().equals(other.getComputeEnginePreferences())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRegionPreferences()) { + hash = (37 * hash) + REGION_PREFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getRegionPreferences().hashCode(); + } + hash = (37 * hash) + COMMITMENT_PLAN_FIELD_NUMBER; + hash = (53 * hash) + commitmentPlan_; + hash = (37 * hash) + SIZING_OPTIMIZATION_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + sizingOptimizationStrategy_; + if (hasComputeEnginePreferences()) { + hash = (37 * hash) + COMPUTE_ENGINE_PREFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getComputeEnginePreferences().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * VirtualMachinePreferences enables you to create sets of assumptions, for
+   * example, a geographical location and pricing track, for your migrated virtual
+   * machines. The set of preferences influence recommendations for migrating
+   * virtual machine assets.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.VirtualMachinePreferences} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.VirtualMachinePreferences) + com.google.cloud.migrationcenter.v1.VirtualMachinePreferencesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VirtualMachinePreferences_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VirtualMachinePreferences_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.class, + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + regionPreferences_ = null; + if (regionPreferencesBuilder_ != null) { + regionPreferencesBuilder_.dispose(); + regionPreferencesBuilder_ = null; + } + commitmentPlan_ = 0; + sizingOptimizationStrategy_ = 0; + computeEnginePreferences_ = null; + if (computeEnginePreferencesBuilder_ != null) { + computeEnginePreferencesBuilder_.dispose(); + computeEnginePreferencesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VirtualMachinePreferences_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferences + getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferences build() { + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferences buildPartial() { + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences result = + new com.google.cloud.migrationcenter.v1.VirtualMachinePreferences(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.migrationcenter.v1.VirtualMachinePreferences result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.regionPreferences_ = + regionPreferencesBuilder_ == null + ? regionPreferences_ + : regionPreferencesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.commitmentPlan_ = commitmentPlan_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sizingOptimizationStrategy_ = sizingOptimizationStrategy_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.computeEnginePreferences_ = + computeEnginePreferencesBuilder_ == null + ? computeEnginePreferences_ + : computeEnginePreferencesBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.VirtualMachinePreferences) { + return mergeFrom((com.google.cloud.migrationcenter.v1.VirtualMachinePreferences) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.VirtualMachinePreferences other) { + if (other + == com.google.cloud.migrationcenter.v1.VirtualMachinePreferences.getDefaultInstance()) + return this; + if (other.hasRegionPreferences()) { + mergeRegionPreferences(other.getRegionPreferences()); + } + if (other.commitmentPlan_ != 0) { + setCommitmentPlanValue(other.getCommitmentPlanValue()); + } + if (other.sizingOptimizationStrategy_ != 0) { + setSizingOptimizationStrategyValue(other.getSizingOptimizationStrategyValue()); + } + if (other.hasComputeEnginePreferences()) { + mergeComputeEnginePreferences(other.getComputeEnginePreferences()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + input.readMessage( + getRegionPreferencesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 26 + case 32: + { + commitmentPlan_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 32 + case 40: + { + sizingOptimizationStrategy_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 40 + case 50: + { + input.readMessage( + getComputeEnginePreferencesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.migrationcenter.v1.RegionPreferences regionPreferences_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RegionPreferences, + com.google.cloud.migrationcenter.v1.RegionPreferences.Builder, + com.google.cloud.migrationcenter.v1.RegionPreferencesOrBuilder> + regionPreferencesBuilder_; + /** + * + * + *
+     * Region preferences for assets using this preference set.
+     * If you are unsure which value to set, the migration service API region is
+     * often a good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + * + * @return Whether the regionPreferences field is set. + */ + public boolean hasRegionPreferences() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Region preferences for assets using this preference set.
+     * If you are unsure which value to set, the migration service API region is
+     * often a good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + * + * @return The regionPreferences. + */ + public com.google.cloud.migrationcenter.v1.RegionPreferences getRegionPreferences() { + if (regionPreferencesBuilder_ == null) { + return regionPreferences_ == null + ? com.google.cloud.migrationcenter.v1.RegionPreferences.getDefaultInstance() + : regionPreferences_; + } else { + return regionPreferencesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Region preferences for assets using this preference set.
+     * If you are unsure which value to set, the migration service API region is
+     * often a good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + */ + public Builder setRegionPreferences( + com.google.cloud.migrationcenter.v1.RegionPreferences value) { + if (regionPreferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + regionPreferences_ = value; + } else { + regionPreferencesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Region preferences for assets using this preference set.
+     * If you are unsure which value to set, the migration service API region is
+     * often a good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + */ + public Builder setRegionPreferences( + com.google.cloud.migrationcenter.v1.RegionPreferences.Builder builderForValue) { + if (regionPreferencesBuilder_ == null) { + regionPreferences_ = builderForValue.build(); + } else { + regionPreferencesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Region preferences for assets using this preference set.
+     * If you are unsure which value to set, the migration service API region is
+     * often a good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + */ + public Builder mergeRegionPreferences( + com.google.cloud.migrationcenter.v1.RegionPreferences value) { + if (regionPreferencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && regionPreferences_ != null + && regionPreferences_ + != com.google.cloud.migrationcenter.v1.RegionPreferences.getDefaultInstance()) { + getRegionPreferencesBuilder().mergeFrom(value); + } else { + regionPreferences_ = value; + } + } else { + regionPreferencesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Region preferences for assets using this preference set.
+     * If you are unsure which value to set, the migration service API region is
+     * often a good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + */ + public Builder clearRegionPreferences() { + bitField0_ = (bitField0_ & ~0x00000001); + regionPreferences_ = null; + if (regionPreferencesBuilder_ != null) { + regionPreferencesBuilder_.dispose(); + regionPreferencesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Region preferences for assets using this preference set.
+     * If you are unsure which value to set, the migration service API region is
+     * often a good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + */ + public com.google.cloud.migrationcenter.v1.RegionPreferences.Builder + getRegionPreferencesBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRegionPreferencesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Region preferences for assets using this preference set.
+     * If you are unsure which value to set, the migration service API region is
+     * often a good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + */ + public com.google.cloud.migrationcenter.v1.RegionPreferencesOrBuilder + getRegionPreferencesOrBuilder() { + if (regionPreferencesBuilder_ != null) { + return regionPreferencesBuilder_.getMessageOrBuilder(); + } else { + return regionPreferences_ == null + ? com.google.cloud.migrationcenter.v1.RegionPreferences.getDefaultInstance() + : regionPreferences_; + } + } + /** + * + * + *
+     * Region preferences for assets using this preference set.
+     * If you are unsure which value to set, the migration service API region is
+     * often a good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RegionPreferences, + com.google.cloud.migrationcenter.v1.RegionPreferences.Builder, + com.google.cloud.migrationcenter.v1.RegionPreferencesOrBuilder> + getRegionPreferencesFieldBuilder() { + if (regionPreferencesBuilder_ == null) { + regionPreferencesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.RegionPreferences, + com.google.cloud.migrationcenter.v1.RegionPreferences.Builder, + com.google.cloud.migrationcenter.v1.RegionPreferencesOrBuilder>( + getRegionPreferences(), getParentForChildren(), isClean()); + regionPreferences_ = null; + } + return regionPreferencesBuilder_; + } + + private int commitmentPlan_ = 0; + /** + * + * + *
+     * Commitment plan to consider when calculating costs for virtual machine
+     * insights and recommendations.
+     * If you are unsure which value to set, a 3 year commitment plan is often a
+     * good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + * + * @return The enum numeric value on the wire for commitmentPlan. + */ + @java.lang.Override + public int getCommitmentPlanValue() { + return commitmentPlan_; + } + /** + * + * + *
+     * Commitment plan to consider when calculating costs for virtual machine
+     * insights and recommendations.
+     * If you are unsure which value to set, a 3 year commitment plan is often a
+     * good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + * + * @param value The enum numeric value on the wire for commitmentPlan to set. + * @return This builder for chaining. + */ + public Builder setCommitmentPlanValue(int value) { + commitmentPlan_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Commitment plan to consider when calculating costs for virtual machine
+     * insights and recommendations.
+     * If you are unsure which value to set, a 3 year commitment plan is often a
+     * good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + * + * @return The commitmentPlan. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.CommitmentPlan getCommitmentPlan() { + com.google.cloud.migrationcenter.v1.CommitmentPlan result = + com.google.cloud.migrationcenter.v1.CommitmentPlan.forNumber(commitmentPlan_); + return result == null + ? com.google.cloud.migrationcenter.v1.CommitmentPlan.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Commitment plan to consider when calculating costs for virtual machine
+     * insights and recommendations.
+     * If you are unsure which value to set, a 3 year commitment plan is often a
+     * good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + * + * @param value The commitmentPlan to set. + * @return This builder for chaining. + */ + public Builder setCommitmentPlan(com.google.cloud.migrationcenter.v1.CommitmentPlan value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + commitmentPlan_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Commitment plan to consider when calculating costs for virtual machine
+     * insights and recommendations.
+     * If you are unsure which value to set, a 3 year commitment plan is often a
+     * good value to start with.
+     * 
+ * + * .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + * + * @return This builder for chaining. + */ + public Builder clearCommitmentPlan() { + bitField0_ = (bitField0_ & ~0x00000002); + commitmentPlan_ = 0; + onChanged(); + return this; + } + + private int sizingOptimizationStrategy_ = 0; + /** + * + * + *
+     * Sizing optimization strategy specifies the preferred strategy used when
+     * extrapolating usage data to calculate insights and recommendations for a
+     * virtual machine.
+     * If you are unsure which value to set, a moderate sizing optimization
+     * strategy is often a good value to start with.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + * + * + * @return The enum numeric value on the wire for sizingOptimizationStrategy. + */ + @java.lang.Override + public int getSizingOptimizationStrategyValue() { + return sizingOptimizationStrategy_; + } + /** + * + * + *
+     * Sizing optimization strategy specifies the preferred strategy used when
+     * extrapolating usage data to calculate insights and recommendations for a
+     * virtual machine.
+     * If you are unsure which value to set, a moderate sizing optimization
+     * strategy is often a good value to start with.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + * + * + * @param value The enum numeric value on the wire for sizingOptimizationStrategy to set. + * @return This builder for chaining. + */ + public Builder setSizingOptimizationStrategyValue(int value) { + sizingOptimizationStrategy_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Sizing optimization strategy specifies the preferred strategy used when
+     * extrapolating usage data to calculate insights and recommendations for a
+     * virtual machine.
+     * If you are unsure which value to set, a moderate sizing optimization
+     * strategy is often a good value to start with.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + * + * + * @return The sizingOptimizationStrategy. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy + getSizingOptimizationStrategy() { + com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy result = + com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy.forNumber( + sizingOptimizationStrategy_); + return result == null + ? com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Sizing optimization strategy specifies the preferred strategy used when
+     * extrapolating usage data to calculate insights and recommendations for a
+     * virtual machine.
+     * If you are unsure which value to set, a moderate sizing optimization
+     * strategy is often a good value to start with.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + * + * + * @param value The sizingOptimizationStrategy to set. + * @return This builder for chaining. + */ + public Builder setSizingOptimizationStrategy( + com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + sizingOptimizationStrategy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Sizing optimization strategy specifies the preferred strategy used when
+     * extrapolating usage data to calculate insights and recommendations for a
+     * virtual machine.
+     * If you are unsure which value to set, a moderate sizing optimization
+     * strategy is often a good value to start with.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearSizingOptimizationStrategy() { + bitField0_ = (bitField0_ & ~0x00000004); + sizingOptimizationStrategy_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.migrationcenter.v1.ComputeEnginePreferences computeEnginePreferences_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences, + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.Builder, + com.google.cloud.migrationcenter.v1.ComputeEnginePreferencesOrBuilder> + computeEnginePreferencesBuilder_; + /** + * + * + *
+     * Compute Engine preferences concern insights and recommendations for Compute
+     * Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + * + * @return Whether the computeEnginePreferences field is set. + */ + public boolean hasComputeEnginePreferences() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Compute Engine preferences concern insights and recommendations for Compute
+     * Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + * + * @return The computeEnginePreferences. + */ + public com.google.cloud.migrationcenter.v1.ComputeEnginePreferences + getComputeEnginePreferences() { + if (computeEnginePreferencesBuilder_ == null) { + return computeEnginePreferences_ == null + ? com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.getDefaultInstance() + : computeEnginePreferences_; + } else { + return computeEnginePreferencesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Compute Engine preferences concern insights and recommendations for Compute
+     * Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + */ + public Builder setComputeEnginePreferences( + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences value) { + if (computeEnginePreferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + computeEnginePreferences_ = value; + } else { + computeEnginePreferencesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Compute Engine preferences concern insights and recommendations for Compute
+     * Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + */ + public Builder setComputeEnginePreferences( + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.Builder builderForValue) { + if (computeEnginePreferencesBuilder_ == null) { + computeEnginePreferences_ = builderForValue.build(); + } else { + computeEnginePreferencesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Compute Engine preferences concern insights and recommendations for Compute
+     * Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + */ + public Builder mergeComputeEnginePreferences( + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences value) { + if (computeEnginePreferencesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && computeEnginePreferences_ != null + && computeEnginePreferences_ + != com.google.cloud.migrationcenter.v1.ComputeEnginePreferences + .getDefaultInstance()) { + getComputeEnginePreferencesBuilder().mergeFrom(value); + } else { + computeEnginePreferences_ = value; + } + } else { + computeEnginePreferencesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Compute Engine preferences concern insights and recommendations for Compute
+     * Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + */ + public Builder clearComputeEnginePreferences() { + bitField0_ = (bitField0_ & ~0x00000008); + computeEnginePreferences_ = null; + if (computeEnginePreferencesBuilder_ != null) { + computeEnginePreferencesBuilder_.dispose(); + computeEnginePreferencesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Compute Engine preferences concern insights and recommendations for Compute
+     * Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + */ + public com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.Builder + getComputeEnginePreferencesBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getComputeEnginePreferencesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Compute Engine preferences concern insights and recommendations for Compute
+     * Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + */ + public com.google.cloud.migrationcenter.v1.ComputeEnginePreferencesOrBuilder + getComputeEnginePreferencesOrBuilder() { + if (computeEnginePreferencesBuilder_ != null) { + return computeEnginePreferencesBuilder_.getMessageOrBuilder(); + } else { + return computeEnginePreferences_ == null + ? com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.getDefaultInstance() + : computeEnginePreferences_; + } + } + /** + * + * + *
+     * Compute Engine preferences concern insights and recommendations for Compute
+     * Engine target.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences, + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.Builder, + com.google.cloud.migrationcenter.v1.ComputeEnginePreferencesOrBuilder> + getComputeEnginePreferencesFieldBuilder() { + if (computeEnginePreferencesBuilder_ == null) { + computeEnginePreferencesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences, + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences.Builder, + com.google.cloud.migrationcenter.v1.ComputeEnginePreferencesOrBuilder>( + getComputeEnginePreferences(), getParentForChildren(), isClean()); + computeEnginePreferences_ = null; + } + return computeEnginePreferencesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.VirtualMachinePreferences) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.VirtualMachinePreferences) + private static final com.google.cloud.migrationcenter.v1.VirtualMachinePreferences + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.VirtualMachinePreferences(); + } + + public static com.google.cloud.migrationcenter.v1.VirtualMachinePreferences getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualMachinePreferences parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VirtualMachinePreferences getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VirtualMachinePreferencesOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VirtualMachinePreferencesOrBuilder.java new file mode 100644 index 000000000000..ec82e74c87d2 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VirtualMachinePreferencesOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface VirtualMachinePreferencesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.VirtualMachinePreferences) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Region preferences for assets using this preference set.
+   * If you are unsure which value to set, the migration service API region is
+   * often a good value to start with.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + * + * @return Whether the regionPreferences field is set. + */ + boolean hasRegionPreferences(); + /** + * + * + *
+   * Region preferences for assets using this preference set.
+   * If you are unsure which value to set, the migration service API region is
+   * often a good value to start with.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + * + * @return The regionPreferences. + */ + com.google.cloud.migrationcenter.v1.RegionPreferences getRegionPreferences(); + /** + * + * + *
+   * Region preferences for assets using this preference set.
+   * If you are unsure which value to set, the migration service API region is
+   * often a good value to start with.
+   * 
+ * + * .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + */ + com.google.cloud.migrationcenter.v1.RegionPreferencesOrBuilder getRegionPreferencesOrBuilder(); + + /** + * + * + *
+   * Commitment plan to consider when calculating costs for virtual machine
+   * insights and recommendations.
+   * If you are unsure which value to set, a 3 year commitment plan is often a
+   * good value to start with.
+   * 
+ * + * .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + * + * @return The enum numeric value on the wire for commitmentPlan. + */ + int getCommitmentPlanValue(); + /** + * + * + *
+   * Commitment plan to consider when calculating costs for virtual machine
+   * insights and recommendations.
+   * If you are unsure which value to set, a 3 year commitment plan is often a
+   * good value to start with.
+   * 
+ * + * .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + * + * @return The commitmentPlan. + */ + com.google.cloud.migrationcenter.v1.CommitmentPlan getCommitmentPlan(); + + /** + * + * + *
+   * Sizing optimization strategy specifies the preferred strategy used when
+   * extrapolating usage data to calculate insights and recommendations for a
+   * virtual machine.
+   * If you are unsure which value to set, a moderate sizing optimization
+   * strategy is often a good value to start with.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + * + * + * @return The enum numeric value on the wire for sizingOptimizationStrategy. + */ + int getSizingOptimizationStrategyValue(); + /** + * + * + *
+   * Sizing optimization strategy specifies the preferred strategy used when
+   * extrapolating usage data to calculate insights and recommendations for a
+   * virtual machine.
+   * If you are unsure which value to set, a moderate sizing optimization
+   * strategy is often a good value to start with.
+   * 
+ * + * + * .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + * + * + * @return The sizingOptimizationStrategy. + */ + com.google.cloud.migrationcenter.v1.SizingOptimizationStrategy getSizingOptimizationStrategy(); + + /** + * + * + *
+   * Compute Engine preferences concern insights and recommendations for Compute
+   * Engine target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + * + * @return Whether the computeEnginePreferences field is set. + */ + boolean hasComputeEnginePreferences(); + /** + * + * + *
+   * Compute Engine preferences concern insights and recommendations for Compute
+   * Engine target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + * + * @return The computeEnginePreferences. + */ + com.google.cloud.migrationcenter.v1.ComputeEnginePreferences getComputeEnginePreferences(); + /** + * + * + *
+   * Compute Engine preferences concern insights and recommendations for Compute
+   * Engine target.
+   * 
+ * + * .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * + */ + com.google.cloud.migrationcenter.v1.ComputeEnginePreferencesOrBuilder + getComputeEnginePreferencesOrBuilder(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwareDiskConfig.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwareDiskConfig.java new file mode 100644 index 000000000000..c40369cd329c --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwareDiskConfig.java @@ -0,0 +1,1657 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * VMware disk config details.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.VmwareDiskConfig} + */ +public final class VmwareDiskConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.VmwareDiskConfig) + VmwareDiskConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use VmwareDiskConfig.newBuilder() to construct. + private VmwareDiskConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VmwareDiskConfig() { + backingType_ = 0; + vmdkMode_ = 0; + rdmCompatibility_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VmwareDiskConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VmwareDiskConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VmwareDiskConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.class, + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.Builder.class); + } + + /** + * + * + *
+   * VMDK backing type possible values.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType} + */ + public enum BackingType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * BACKING_TYPE_UNSPECIFIED = 0; + */ + BACKING_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Flat v1.
+     * 
+ * + * BACKING_TYPE_FLAT_V1 = 1; + */ + BACKING_TYPE_FLAT_V1(1), + /** + * + * + *
+     * Flat v2.
+     * 
+ * + * BACKING_TYPE_FLAT_V2 = 2; + */ + BACKING_TYPE_FLAT_V2(2), + /** + * + * + *
+     * Persistent memory, also known as Non-Volatile Memory (NVM).
+     * 
+ * + * BACKING_TYPE_PMEM = 3; + */ + BACKING_TYPE_PMEM(3), + /** + * + * + *
+     * Raw Disk Memory v1.
+     * 
+ * + * BACKING_TYPE_RDM_V1 = 4; + */ + BACKING_TYPE_RDM_V1(4), + /** + * + * + *
+     * Raw Disk Memory v2.
+     * 
+ * + * BACKING_TYPE_RDM_V2 = 5; + */ + BACKING_TYPE_RDM_V2(5), + /** + * + * + *
+     * SEsparse is a snapshot format introduced in vSphere 5.5 for large disks.
+     * 
+ * + * BACKING_TYPE_SESPARSE = 6; + */ + BACKING_TYPE_SESPARSE(6), + /** + * + * + *
+     * SEsparse v1.
+     * 
+ * + * BACKING_TYPE_SESPARSE_V1 = 7; + */ + BACKING_TYPE_SESPARSE_V1(7), + /** + * + * + *
+     * SEsparse v1.
+     * 
+ * + * BACKING_TYPE_SESPARSE_V2 = 8; + */ + BACKING_TYPE_SESPARSE_V2(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.
+     * 
+ * + * BACKING_TYPE_UNSPECIFIED = 0; + */ + public static final int BACKING_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Flat v1.
+     * 
+ * + * BACKING_TYPE_FLAT_V1 = 1; + */ + public static final int BACKING_TYPE_FLAT_V1_VALUE = 1; + /** + * + * + *
+     * Flat v2.
+     * 
+ * + * BACKING_TYPE_FLAT_V2 = 2; + */ + public static final int BACKING_TYPE_FLAT_V2_VALUE = 2; + /** + * + * + *
+     * Persistent memory, also known as Non-Volatile Memory (NVM).
+     * 
+ * + * BACKING_TYPE_PMEM = 3; + */ + public static final int BACKING_TYPE_PMEM_VALUE = 3; + /** + * + * + *
+     * Raw Disk Memory v1.
+     * 
+ * + * BACKING_TYPE_RDM_V1 = 4; + */ + public static final int BACKING_TYPE_RDM_V1_VALUE = 4; + /** + * + * + *
+     * Raw Disk Memory v2.
+     * 
+ * + * BACKING_TYPE_RDM_V2 = 5; + */ + public static final int BACKING_TYPE_RDM_V2_VALUE = 5; + /** + * + * + *
+     * SEsparse is a snapshot format introduced in vSphere 5.5 for large disks.
+     * 
+ * + * BACKING_TYPE_SESPARSE = 6; + */ + public static final int BACKING_TYPE_SESPARSE_VALUE = 6; + /** + * + * + *
+     * SEsparse v1.
+     * 
+ * + * BACKING_TYPE_SESPARSE_V1 = 7; + */ + public static final int BACKING_TYPE_SESPARSE_V1_VALUE = 7; + /** + * + * + *
+     * SEsparse v1.
+     * 
+ * + * BACKING_TYPE_SESPARSE_V2 = 8; + */ + public static final int BACKING_TYPE_SESPARSE_V2_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BackingType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BackingType forNumber(int value) { + switch (value) { + case 0: + return BACKING_TYPE_UNSPECIFIED; + case 1: + return BACKING_TYPE_FLAT_V1; + case 2: + return BACKING_TYPE_FLAT_V2; + case 3: + return BACKING_TYPE_PMEM; + case 4: + return BACKING_TYPE_RDM_V1; + case 5: + return BACKING_TYPE_RDM_V2; + case 6: + return BACKING_TYPE_SESPARSE; + case 7: + return BACKING_TYPE_SESPARSE_V1; + case 8: + return BACKING_TYPE_SESPARSE_V2; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BackingType findValueByNumber(int number) { + return BackingType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final BackingType[] VALUES = values(); + + public static BackingType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BackingType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType) + } + + /** + * + * + *
+   * VMDK disk mode.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode} + */ + public enum VmdkMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * VMDK disk mode unspecified or unknown.
+     * 
+ * + * VMDK_MODE_UNSPECIFIED = 0; + */ + VMDK_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Dependent disk mode.
+     * 
+ * + * DEPENDENT = 1; + */ + DEPENDENT(1), + /** + * + * + *
+     * Independent - Persistent disk mode.
+     * 
+ * + * INDEPENDENT_PERSISTENT = 2; + */ + INDEPENDENT_PERSISTENT(2), + /** + * + * + *
+     * Independent - Nonpersistent disk mode.
+     * 
+ * + * INDEPENDENT_NONPERSISTENT = 3; + */ + INDEPENDENT_NONPERSISTENT(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * VMDK disk mode unspecified or unknown.
+     * 
+ * + * VMDK_MODE_UNSPECIFIED = 0; + */ + public static final int VMDK_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Dependent disk mode.
+     * 
+ * + * DEPENDENT = 1; + */ + public static final int DEPENDENT_VALUE = 1; + /** + * + * + *
+     * Independent - Persistent disk mode.
+     * 
+ * + * INDEPENDENT_PERSISTENT = 2; + */ + public static final int INDEPENDENT_PERSISTENT_VALUE = 2; + /** + * + * + *
+     * Independent - Nonpersistent disk mode.
+     * 
+ * + * INDEPENDENT_NONPERSISTENT = 3; + */ + public static final int INDEPENDENT_NONPERSISTENT_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VmdkMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static VmdkMode forNumber(int value) { + switch (value) { + case 0: + return VMDK_MODE_UNSPECIFIED; + case 1: + return DEPENDENT; + case 2: + return INDEPENDENT_PERSISTENT; + case 3: + return INDEPENDENT_NONPERSISTENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public VmdkMode findValueByNumber(int number) { + return VmdkMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final VmdkMode[] VALUES = values(); + + public static VmdkMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private VmdkMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode) + } + + /** + * + * + *
+   * RDM compatibility mode.
+   * 
+ * + * Protobuf enum {@code google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility} + */ + public enum RdmCompatibility implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Compatibility mode unspecified or unknown.
+     * 
+ * + * RDM_COMPATIBILITY_UNSPECIFIED = 0; + */ + RDM_COMPATIBILITY_UNSPECIFIED(0), + /** + * + * + *
+     * Physical compatibility mode.
+     * 
+ * + * PHYSICAL_COMPATIBILITY = 1; + */ + PHYSICAL_COMPATIBILITY(1), + /** + * + * + *
+     * Virtual compatibility mode.
+     * 
+ * + * VIRTUAL_COMPATIBILITY = 2; + */ + VIRTUAL_COMPATIBILITY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Compatibility mode unspecified or unknown.
+     * 
+ * + * RDM_COMPATIBILITY_UNSPECIFIED = 0; + */ + public static final int RDM_COMPATIBILITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Physical compatibility mode.
+     * 
+ * + * PHYSICAL_COMPATIBILITY = 1; + */ + public static final int PHYSICAL_COMPATIBILITY_VALUE = 1; + /** + * + * + *
+     * Virtual compatibility mode.
+     * 
+ * + * VIRTUAL_COMPATIBILITY = 2; + */ + public static final int VIRTUAL_COMPATIBILITY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RdmCompatibility valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RdmCompatibility forNumber(int value) { + switch (value) { + case 0: + return RDM_COMPATIBILITY_UNSPECIFIED; + case 1: + return PHYSICAL_COMPATIBILITY; + case 2: + return VIRTUAL_COMPATIBILITY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RdmCompatibility findValueByNumber(int number) { + return RdmCompatibility.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final RdmCompatibility[] VALUES = values(); + + public static RdmCompatibility valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RdmCompatibility(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility) + } + + public static final int BACKING_TYPE_FIELD_NUMBER = 1; + private int backingType_ = 0; + /** + * + * + *
+   * VMDK backing type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + * + * @return The enum numeric value on the wire for backingType. + */ + @java.lang.Override + public int getBackingTypeValue() { + return backingType_; + } + /** + * + * + *
+   * VMDK backing type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + * + * @return The backingType. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType getBackingType() { + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType result = + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType.forNumber(backingType_); + return result == null + ? com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType.UNRECOGNIZED + : result; + } + + public static final int SHARED_FIELD_NUMBER = 2; + private boolean shared_ = false; + /** + * + * + *
+   * Is VMDK shared with other VMs.
+   * 
+ * + * bool shared = 2; + * + * @return The shared. + */ + @java.lang.Override + public boolean getShared() { + return shared_; + } + + public static final int VMDK_MODE_FIELD_NUMBER = 3; + private int vmdkMode_ = 0; + /** + * + * + *
+   * VMDK disk mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + * + * @return The enum numeric value on the wire for vmdkMode. + */ + @java.lang.Override + public int getVmdkModeValue() { + return vmdkMode_; + } + /** + * + * + *
+   * VMDK disk mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + * + * @return The vmdkMode. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode getVmdkMode() { + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode result = + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode.forNumber(vmdkMode_); + return result == null + ? com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode.UNRECOGNIZED + : result; + } + + public static final int RDM_COMPATIBILITY_FIELD_NUMBER = 4; + private int rdmCompatibility_ = 0; + /** + * + * + *
+   * RDM compatibility mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + * + * + * @return The enum numeric value on the wire for rdmCompatibility. + */ + @java.lang.Override + public int getRdmCompatibilityValue() { + return rdmCompatibility_; + } + /** + * + * + *
+   * RDM compatibility mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + * + * + * @return The rdmCompatibility. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility + getRdmCompatibility() { + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility result = + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility.forNumber( + rdmCompatibility_); + return result == null + ? com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (backingType_ + != com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType.BACKING_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, backingType_); + } + if (shared_ != false) { + output.writeBool(2, shared_); + } + if (vmdkMode_ + != com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode.VMDK_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, vmdkMode_); + } + if (rdmCompatibility_ + != com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility + .RDM_COMPATIBILITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, rdmCompatibility_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (backingType_ + != com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType.BACKING_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, backingType_); + } + if (shared_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, shared_); + } + if (vmdkMode_ + != com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode.VMDK_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, vmdkMode_); + } + if (rdmCompatibility_ + != com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility + .RDM_COMPATIBILITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, rdmCompatibility_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.VmwareDiskConfig)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.VmwareDiskConfig other = + (com.google.cloud.migrationcenter.v1.VmwareDiskConfig) obj; + + if (backingType_ != other.backingType_) return false; + if (getShared() != other.getShared()) return false; + if (vmdkMode_ != other.vmdkMode_) return false; + if (rdmCompatibility_ != other.rdmCompatibility_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BACKING_TYPE_FIELD_NUMBER; + hash = (53 * hash) + backingType_; + hash = (37 * hash) + SHARED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShared()); + hash = (37 * hash) + VMDK_MODE_FIELD_NUMBER; + hash = (53 * hash) + vmdkMode_; + hash = (37 * hash) + RDM_COMPATIBILITY_FIELD_NUMBER; + hash = (53 * hash) + rdmCompatibility_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.migrationcenter.v1.VmwareDiskConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * VMware disk config details.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.VmwareDiskConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.VmwareDiskConfig) + com.google.cloud.migrationcenter.v1.VmwareDiskConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VmwareDiskConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VmwareDiskConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.class, + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.VmwareDiskConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backingType_ = 0; + shared_ = false; + vmdkMode_ = 0; + rdmCompatibility_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VmwareDiskConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig build() { + com.google.cloud.migrationcenter.v1.VmwareDiskConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig buildPartial() { + com.google.cloud.migrationcenter.v1.VmwareDiskConfig result = + new com.google.cloud.migrationcenter.v1.VmwareDiskConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.VmwareDiskConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backingType_ = backingType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shared_ = shared_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vmdkMode_ = vmdkMode_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rdmCompatibility_ = rdmCompatibility_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.VmwareDiskConfig) { + return mergeFrom((com.google.cloud.migrationcenter.v1.VmwareDiskConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.VmwareDiskConfig other) { + if (other == com.google.cloud.migrationcenter.v1.VmwareDiskConfig.getDefaultInstance()) + return this; + if (other.backingType_ != 0) { + setBackingTypeValue(other.getBackingTypeValue()); + } + if (other.getShared() != false) { + setShared(other.getShared()); + } + if (other.vmdkMode_ != 0) { + setVmdkModeValue(other.getVmdkModeValue()); + } + if (other.rdmCompatibility_ != 0) { + setRdmCompatibilityValue(other.getRdmCompatibilityValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + backingType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + shared_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + vmdkMode_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + rdmCompatibility_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int backingType_ = 0; + /** + * + * + *
+     * VMDK backing type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + * + * @return The enum numeric value on the wire for backingType. + */ + @java.lang.Override + public int getBackingTypeValue() { + return backingType_; + } + /** + * + * + *
+     * VMDK backing type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + * + * @param value The enum numeric value on the wire for backingType to set. + * @return This builder for chaining. + */ + public Builder setBackingTypeValue(int value) { + backingType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * VMDK backing type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + * + * @return The backingType. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType getBackingType() { + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType result = + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType.forNumber(backingType_); + return result == null + ? com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * VMDK backing type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + * + * @param value The backingType to set. + * @return This builder for chaining. + */ + public Builder setBackingType( + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + backingType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * VMDK backing type.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearBackingType() { + bitField0_ = (bitField0_ & ~0x00000001); + backingType_ = 0; + onChanged(); + return this; + } + + private boolean shared_; + /** + * + * + *
+     * Is VMDK shared with other VMs.
+     * 
+ * + * bool shared = 2; + * + * @return The shared. + */ + @java.lang.Override + public boolean getShared() { + return shared_; + } + /** + * + * + *
+     * Is VMDK shared with other VMs.
+     * 
+ * + * bool shared = 2; + * + * @param value The shared to set. + * @return This builder for chaining. + */ + public Builder setShared(boolean value) { + + shared_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Is VMDK shared with other VMs.
+     * 
+ * + * bool shared = 2; + * + * @return This builder for chaining. + */ + public Builder clearShared() { + bitField0_ = (bitField0_ & ~0x00000002); + shared_ = false; + onChanged(); + return this; + } + + private int vmdkMode_ = 0; + /** + * + * + *
+     * VMDK disk mode.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + * + * @return The enum numeric value on the wire for vmdkMode. + */ + @java.lang.Override + public int getVmdkModeValue() { + return vmdkMode_; + } + /** + * + * + *
+     * VMDK disk mode.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + * + * @param value The enum numeric value on the wire for vmdkMode to set. + * @return This builder for chaining. + */ + public Builder setVmdkModeValue(int value) { + vmdkMode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * VMDK disk mode.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + * + * @return The vmdkMode. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode getVmdkMode() { + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode result = + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode.forNumber(vmdkMode_); + return result == null + ? com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * VMDK disk mode.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + * + * @param value The vmdkMode to set. + * @return This builder for chaining. + */ + public Builder setVmdkMode( + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + vmdkMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * VMDK disk mode.
+     * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + * + * @return This builder for chaining. + */ + public Builder clearVmdkMode() { + bitField0_ = (bitField0_ & ~0x00000004); + vmdkMode_ = 0; + onChanged(); + return this; + } + + private int rdmCompatibility_ = 0; + /** + * + * + *
+     * RDM compatibility mode.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + * + * + * @return The enum numeric value on the wire for rdmCompatibility. + */ + @java.lang.Override + public int getRdmCompatibilityValue() { + return rdmCompatibility_; + } + /** + * + * + *
+     * RDM compatibility mode.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + * + * + * @param value The enum numeric value on the wire for rdmCompatibility to set. + * @return This builder for chaining. + */ + public Builder setRdmCompatibilityValue(int value) { + rdmCompatibility_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * RDM compatibility mode.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + * + * + * @return The rdmCompatibility. + */ + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility + getRdmCompatibility() { + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility result = + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility.forNumber( + rdmCompatibility_); + return result == null + ? com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * RDM compatibility mode.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + * + * + * @param value The rdmCompatibility to set. + * @return This builder for chaining. + */ + public Builder setRdmCompatibility( + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + rdmCompatibility_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * RDM compatibility mode.
+     * 
+ * + * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearRdmCompatibility() { + bitField0_ = (bitField0_ & ~0x00000008); + rdmCompatibility_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.VmwareDiskConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.VmwareDiskConfig) + private static final com.google.cloud.migrationcenter.v1.VmwareDiskConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.VmwareDiskConfig(); + } + + public static com.google.cloud.migrationcenter.v1.VmwareDiskConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VmwareDiskConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwareDiskConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwareDiskConfigOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwareDiskConfigOrBuilder.java new file mode 100644 index 000000000000..f37ce70570a7 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwareDiskConfigOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface VmwareDiskConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.VmwareDiskConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * VMDK backing type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + * + * @return The enum numeric value on the wire for backingType. + */ + int getBackingTypeValue(); + /** + * + * + *
+   * VMDK backing type.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + * + * @return The backingType. + */ + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType getBackingType(); + + /** + * + * + *
+   * Is VMDK shared with other VMs.
+   * 
+ * + * bool shared = 2; + * + * @return The shared. + */ + boolean getShared(); + + /** + * + * + *
+   * VMDK disk mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + * + * @return The enum numeric value on the wire for vmdkMode. + */ + int getVmdkModeValue(); + /** + * + * + *
+   * VMDK disk mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + * + * @return The vmdkMode. + */ + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode getVmdkMode(); + + /** + * + * + *
+   * RDM compatibility mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + * + * + * @return The enum numeric value on the wire for rdmCompatibility. + */ + int getRdmCompatibilityValue(); + /** + * + * + *
+   * RDM compatibility mode.
+   * 
+ * + * .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + * + * + * @return The rdmCompatibility. + */ + com.google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility getRdmCompatibility(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwarePlatformDetails.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwarePlatformDetails.java new file mode 100644 index 000000000000..7c4b297c19f5 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwarePlatformDetails.java @@ -0,0 +1,1542 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +/** + * + * + *
+ * VMware specific details.
+ * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.VmwarePlatformDetails} + */ +public final class VmwarePlatformDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.migrationcenter.v1.VmwarePlatformDetails) + VmwarePlatformDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use VmwarePlatformDetails.newBuilder() to construct. + private VmwarePlatformDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VmwarePlatformDetails() { + vcenterVersion_ = ""; + esxVersion_ = ""; + osid_ = ""; + vcenterFolder_ = ""; + vcenterUri_ = ""; + vcenterVmId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VmwarePlatformDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VmwarePlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VmwarePlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.class, + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.Builder.class); + } + + public static final int VCENTER_VERSION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object vcenterVersion_ = ""; + /** + * + * + *
+   * vCenter version.
+   * 
+ * + * string vcenter_version = 1; + * + * @return The vcenterVersion. + */ + @java.lang.Override + public java.lang.String getVcenterVersion() { + java.lang.Object ref = vcenterVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vcenterVersion_ = s; + return s; + } + } + /** + * + * + *
+   * vCenter version.
+   * 
+ * + * string vcenter_version = 1; + * + * @return The bytes for vcenterVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVcenterVersionBytes() { + java.lang.Object ref = vcenterVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vcenterVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ESX_VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object esxVersion_ = ""; + /** + * + * + *
+   * ESX version.
+   * 
+ * + * string esx_version = 2; + * + * @return The esxVersion. + */ + @java.lang.Override + public java.lang.String getEsxVersion() { + java.lang.Object ref = esxVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + esxVersion_ = s; + return s; + } + } + /** + * + * + *
+   * ESX version.
+   * 
+ * + * string esx_version = 2; + * + * @return The bytes for esxVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEsxVersionBytes() { + java.lang.Object ref = esxVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + esxVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OSID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object osid_ = ""; + /** + * + * + *
+   * VMware os enum -
+   * 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.
+   * 
+ * + * string osid = 3; + * + * @return The osid. + */ + @java.lang.Override + public java.lang.String getOsid() { + java.lang.Object ref = osid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osid_ = s; + return s; + } + } + /** + * + * + *
+   * VMware os enum -
+   * 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.
+   * 
+ * + * string osid = 3; + * + * @return The bytes for osid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsidBytes() { + java.lang.Object ref = osid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VCENTER_FOLDER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object vcenterFolder_ = ""; + /** + * + * + *
+   * Folder name in vCenter where asset resides.
+   * 
+ * + * string vcenter_folder = 4; + * + * @return The vcenterFolder. + */ + @java.lang.Override + public java.lang.String getVcenterFolder() { + java.lang.Object ref = vcenterFolder_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vcenterFolder_ = s; + return s; + } + } + /** + * + * + *
+   * Folder name in vCenter where asset resides.
+   * 
+ * + * string vcenter_folder = 4; + * + * @return The bytes for vcenterFolder. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVcenterFolderBytes() { + java.lang.Object ref = vcenterFolder_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vcenterFolder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VCENTER_URI_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object vcenterUri_ = ""; + /** + * + * + *
+   * vCenter URI used in collection.
+   * 
+ * + * string vcenter_uri = 5; + * + * @return The vcenterUri. + */ + @java.lang.Override + public java.lang.String getVcenterUri() { + java.lang.Object ref = vcenterUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vcenterUri_ = s; + return s; + } + } + /** + * + * + *
+   * vCenter URI used in collection.
+   * 
+ * + * string vcenter_uri = 5; + * + * @return The bytes for vcenterUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVcenterUriBytes() { + java.lang.Object ref = vcenterUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vcenterUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VCENTER_VM_ID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object vcenterVmId_ = ""; + /** + * + * + *
+   * vCenter VM ID.
+   * 
+ * + * string vcenter_vm_id = 6; + * + * @return The vcenterVmId. + */ + @java.lang.Override + public java.lang.String getVcenterVmId() { + java.lang.Object ref = vcenterVmId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vcenterVmId_ = s; + return s; + } + } + /** + * + * + *
+   * vCenter VM ID.
+   * 
+ * + * string vcenter_vm_id = 6; + * + * @return The bytes for vcenterVmId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVcenterVmIdBytes() { + java.lang.Object ref = vcenterVmId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vcenterVmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vcenterVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vcenterVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(esxVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, esxVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, osid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vcenterFolder_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, vcenterFolder_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vcenterUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, vcenterUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vcenterVmId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, vcenterVmId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vcenterVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vcenterVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(esxVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, esxVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, osid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vcenterFolder_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, vcenterFolder_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vcenterUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, vcenterUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vcenterVmId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, vcenterVmId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.migrationcenter.v1.VmwarePlatformDetails)) { + return super.equals(obj); + } + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails other = + (com.google.cloud.migrationcenter.v1.VmwarePlatformDetails) obj; + + if (!getVcenterVersion().equals(other.getVcenterVersion())) return false; + if (!getEsxVersion().equals(other.getEsxVersion())) return false; + if (!getOsid().equals(other.getOsid())) return false; + if (!getVcenterFolder().equals(other.getVcenterFolder())) return false; + if (!getVcenterUri().equals(other.getVcenterUri())) return false; + if (!getVcenterVmId().equals(other.getVcenterVmId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VCENTER_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVcenterVersion().hashCode(); + hash = (37 * hash) + ESX_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getEsxVersion().hashCode(); + hash = (37 * hash) + OSID_FIELD_NUMBER; + hash = (53 * hash) + getOsid().hashCode(); + hash = (37 * hash) + VCENTER_FOLDER_FIELD_NUMBER; + hash = (53 * hash) + getVcenterFolder().hashCode(); + hash = (37 * hash) + VCENTER_URI_FIELD_NUMBER; + hash = (53 * hash) + getVcenterUri().hashCode(); + hash = (37 * hash) + VCENTER_VM_ID_FIELD_NUMBER; + hash = (53 * hash) + getVcenterVmId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * VMware specific details.
+   * 
+ * + * Protobuf type {@code google.cloud.migrationcenter.v1.VmwarePlatformDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.migrationcenter.v1.VmwarePlatformDetails) + com.google.cloud.migrationcenter.v1.VmwarePlatformDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VmwarePlatformDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VmwarePlatformDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.class, + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.Builder.class); + } + + // Construct using com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + vcenterVersion_ = ""; + esxVersion_ = ""; + osid_ = ""; + vcenterFolder_ = ""; + vcenterUri_ = ""; + vcenterVmId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.migrationcenter.v1.MigrationCenterProto + .internal_static_google_cloud_migrationcenter_v1_VmwarePlatformDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwarePlatformDetails getDefaultInstanceForType() { + return com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwarePlatformDetails build() { + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwarePlatformDetails buildPartial() { + com.google.cloud.migrationcenter.v1.VmwarePlatformDetails result = + new com.google.cloud.migrationcenter.v1.VmwarePlatformDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.migrationcenter.v1.VmwarePlatformDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.vcenterVersion_ = vcenterVersion_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.esxVersion_ = esxVersion_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.osid_ = osid_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.vcenterFolder_ = vcenterFolder_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.vcenterUri_ = vcenterUri_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.vcenterVmId_ = vcenterVmId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.migrationcenter.v1.VmwarePlatformDetails) { + return mergeFrom((com.google.cloud.migrationcenter.v1.VmwarePlatformDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.migrationcenter.v1.VmwarePlatformDetails other) { + if (other == com.google.cloud.migrationcenter.v1.VmwarePlatformDetails.getDefaultInstance()) + return this; + if (!other.getVcenterVersion().isEmpty()) { + vcenterVersion_ = other.vcenterVersion_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEsxVersion().isEmpty()) { + esxVersion_ = other.esxVersion_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOsid().isEmpty()) { + osid_ = other.osid_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVcenterFolder().isEmpty()) { + vcenterFolder_ = other.vcenterFolder_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getVcenterUri().isEmpty()) { + vcenterUri_ = other.vcenterUri_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getVcenterVmId().isEmpty()) { + vcenterVmId_ = other.vcenterVmId_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + vcenterVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + esxVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + osid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + vcenterFolder_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + vcenterUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + vcenterVmId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object vcenterVersion_ = ""; + /** + * + * + *
+     * vCenter version.
+     * 
+ * + * string vcenter_version = 1; + * + * @return The vcenterVersion. + */ + public java.lang.String getVcenterVersion() { + java.lang.Object ref = vcenterVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vcenterVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * vCenter version.
+     * 
+ * + * string vcenter_version = 1; + * + * @return The bytes for vcenterVersion. + */ + public com.google.protobuf.ByteString getVcenterVersionBytes() { + java.lang.Object ref = vcenterVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vcenterVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * vCenter version.
+     * 
+ * + * string vcenter_version = 1; + * + * @param value The vcenterVersion to set. + * @return This builder for chaining. + */ + public Builder setVcenterVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vcenterVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * vCenter version.
+     * 
+ * + * string vcenter_version = 1; + * + * @return This builder for chaining. + */ + public Builder clearVcenterVersion() { + vcenterVersion_ = getDefaultInstance().getVcenterVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * vCenter version.
+     * 
+ * + * string vcenter_version = 1; + * + * @param value The bytes for vcenterVersion to set. + * @return This builder for chaining. + */ + public Builder setVcenterVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vcenterVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object esxVersion_ = ""; + /** + * + * + *
+     * ESX version.
+     * 
+ * + * string esx_version = 2; + * + * @return The esxVersion. + */ + public java.lang.String getEsxVersion() { + java.lang.Object ref = esxVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + esxVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * ESX version.
+     * 
+ * + * string esx_version = 2; + * + * @return The bytes for esxVersion. + */ + public com.google.protobuf.ByteString getEsxVersionBytes() { + java.lang.Object ref = esxVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + esxVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * ESX version.
+     * 
+ * + * string esx_version = 2; + * + * @param value The esxVersion to set. + * @return This builder for chaining. + */ + public Builder setEsxVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + esxVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * ESX version.
+     * 
+ * + * string esx_version = 2; + * + * @return This builder for chaining. + */ + public Builder clearEsxVersion() { + esxVersion_ = getDefaultInstance().getEsxVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * ESX version.
+     * 
+ * + * string esx_version = 2; + * + * @param value The bytes for esxVersion to set. + * @return This builder for chaining. + */ + public Builder setEsxVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + esxVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object osid_ = ""; + /** + * + * + *
+     * VMware os enum -
+     * 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.
+     * 
+ * + * string osid = 3; + * + * @return The osid. + */ + public java.lang.String getOsid() { + java.lang.Object ref = osid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * VMware os enum -
+     * 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.
+     * 
+ * + * string osid = 3; + * + * @return The bytes for osid. + */ + public com.google.protobuf.ByteString getOsidBytes() { + java.lang.Object ref = osid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * VMware os enum -
+     * 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.
+     * 
+ * + * string osid = 3; + * + * @param value The osid to set. + * @return This builder for chaining. + */ + public Builder setOsid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + osid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * VMware os enum -
+     * 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.
+     * 
+ * + * string osid = 3; + * + * @return This builder for chaining. + */ + public Builder clearOsid() { + osid_ = getDefaultInstance().getOsid(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * VMware os enum -
+     * 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.
+     * 
+ * + * string osid = 3; + * + * @param value The bytes for osid to set. + * @return This builder for chaining. + */ + public Builder setOsidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + osid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object vcenterFolder_ = ""; + /** + * + * + *
+     * Folder name in vCenter where asset resides.
+     * 
+ * + * string vcenter_folder = 4; + * + * @return The vcenterFolder. + */ + public java.lang.String getVcenterFolder() { + java.lang.Object ref = vcenterFolder_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vcenterFolder_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Folder name in vCenter where asset resides.
+     * 
+ * + * string vcenter_folder = 4; + * + * @return The bytes for vcenterFolder. + */ + public com.google.protobuf.ByteString getVcenterFolderBytes() { + java.lang.Object ref = vcenterFolder_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vcenterFolder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Folder name in vCenter where asset resides.
+     * 
+ * + * string vcenter_folder = 4; + * + * @param value The vcenterFolder to set. + * @return This builder for chaining. + */ + public Builder setVcenterFolder(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vcenterFolder_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Folder name in vCenter where asset resides.
+     * 
+ * + * string vcenter_folder = 4; + * + * @return This builder for chaining. + */ + public Builder clearVcenterFolder() { + vcenterFolder_ = getDefaultInstance().getVcenterFolder(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Folder name in vCenter where asset resides.
+     * 
+ * + * string vcenter_folder = 4; + * + * @param value The bytes for vcenterFolder to set. + * @return This builder for chaining. + */ + public Builder setVcenterFolderBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vcenterFolder_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object vcenterUri_ = ""; + /** + * + * + *
+     * vCenter URI used in collection.
+     * 
+ * + * string vcenter_uri = 5; + * + * @return The vcenterUri. + */ + public java.lang.String getVcenterUri() { + java.lang.Object ref = vcenterUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vcenterUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * vCenter URI used in collection.
+     * 
+ * + * string vcenter_uri = 5; + * + * @return The bytes for vcenterUri. + */ + public com.google.protobuf.ByteString getVcenterUriBytes() { + java.lang.Object ref = vcenterUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vcenterUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * vCenter URI used in collection.
+     * 
+ * + * string vcenter_uri = 5; + * + * @param value The vcenterUri to set. + * @return This builder for chaining. + */ + public Builder setVcenterUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vcenterUri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * vCenter URI used in collection.
+     * 
+ * + * string vcenter_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearVcenterUri() { + vcenterUri_ = getDefaultInstance().getVcenterUri(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * vCenter URI used in collection.
+     * 
+ * + * string vcenter_uri = 5; + * + * @param value The bytes for vcenterUri to set. + * @return This builder for chaining. + */ + public Builder setVcenterUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vcenterUri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object vcenterVmId_ = ""; + /** + * + * + *
+     * vCenter VM ID.
+     * 
+ * + * string vcenter_vm_id = 6; + * + * @return The vcenterVmId. + */ + public java.lang.String getVcenterVmId() { + java.lang.Object ref = vcenterVmId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vcenterVmId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * vCenter VM ID.
+     * 
+ * + * string vcenter_vm_id = 6; + * + * @return The bytes for vcenterVmId. + */ + public com.google.protobuf.ByteString getVcenterVmIdBytes() { + java.lang.Object ref = vcenterVmId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vcenterVmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * vCenter VM ID.
+     * 
+ * + * string vcenter_vm_id = 6; + * + * @param value The vcenterVmId to set. + * @return This builder for chaining. + */ + public Builder setVcenterVmId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vcenterVmId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * vCenter VM ID.
+     * 
+ * + * string vcenter_vm_id = 6; + * + * @return This builder for chaining. + */ + public Builder clearVcenterVmId() { + vcenterVmId_ = getDefaultInstance().getVcenterVmId(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * vCenter VM ID.
+     * 
+ * + * string vcenter_vm_id = 6; + * + * @param value The bytes for vcenterVmId to set. + * @return This builder for chaining. + */ + public Builder setVcenterVmIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vcenterVmId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.migrationcenter.v1.VmwarePlatformDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.migrationcenter.v1.VmwarePlatformDetails) + private static final com.google.cloud.migrationcenter.v1.VmwarePlatformDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.migrationcenter.v1.VmwarePlatformDetails(); + } + + public static com.google.cloud.migrationcenter.v1.VmwarePlatformDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VmwarePlatformDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.migrationcenter.v1.VmwarePlatformDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwarePlatformDetailsOrBuilder.java b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwarePlatformDetailsOrBuilder.java new file mode 100644 index 000000000000..3c46ed5c5fff --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/java/com/google/cloud/migrationcenter/v1/VmwarePlatformDetailsOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/migrationcenter/v1/migrationcenter.proto + +package com.google.cloud.migrationcenter.v1; + +public interface VmwarePlatformDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.migrationcenter.v1.VmwarePlatformDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * vCenter version.
+   * 
+ * + * string vcenter_version = 1; + * + * @return The vcenterVersion. + */ + java.lang.String getVcenterVersion(); + /** + * + * + *
+   * vCenter version.
+   * 
+ * + * string vcenter_version = 1; + * + * @return The bytes for vcenterVersion. + */ + com.google.protobuf.ByteString getVcenterVersionBytes(); + + /** + * + * + *
+   * ESX version.
+   * 
+ * + * string esx_version = 2; + * + * @return The esxVersion. + */ + java.lang.String getEsxVersion(); + /** + * + * + *
+   * ESX version.
+   * 
+ * + * string esx_version = 2; + * + * @return The bytes for esxVersion. + */ + com.google.protobuf.ByteString getEsxVersionBytes(); + + /** + * + * + *
+   * VMware os enum -
+   * 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.
+   * 
+ * + * string osid = 3; + * + * @return The osid. + */ + java.lang.String getOsid(); + /** + * + * + *
+   * VMware os enum -
+   * 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.
+   * 
+ * + * string osid = 3; + * + * @return The bytes for osid. + */ + com.google.protobuf.ByteString getOsidBytes(); + + /** + * + * + *
+   * Folder name in vCenter where asset resides.
+   * 
+ * + * string vcenter_folder = 4; + * + * @return The vcenterFolder. + */ + java.lang.String getVcenterFolder(); + /** + * + * + *
+   * Folder name in vCenter where asset resides.
+   * 
+ * + * string vcenter_folder = 4; + * + * @return The bytes for vcenterFolder. + */ + com.google.protobuf.ByteString getVcenterFolderBytes(); + + /** + * + * + *
+   * vCenter URI used in collection.
+   * 
+ * + * string vcenter_uri = 5; + * + * @return The vcenterUri. + */ + java.lang.String getVcenterUri(); + /** + * + * + *
+   * vCenter URI used in collection.
+   * 
+ * + * string vcenter_uri = 5; + * + * @return The bytes for vcenterUri. + */ + com.google.protobuf.ByteString getVcenterUriBytes(); + + /** + * + * + *
+   * vCenter VM ID.
+   * 
+ * + * string vcenter_vm_id = 6; + * + * @return The vcenterVmId. + */ + java.lang.String getVcenterVmId(); + /** + * + * + *
+   * vCenter VM ID.
+   * 
+ * + * string vcenter_vm_id = 6; + * + * @return The bytes for vcenterVmId. + */ + com.google.protobuf.ByteString getVcenterVmIdBytes(); +} diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/proto/google/cloud/migrationcenter/v1/migrationcenter.proto b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/proto/google/cloud/migrationcenter/v1/migrationcenter.proto new file mode 100644 index 000000000000..cc9df8da0653 --- /dev/null +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/src/main/proto/google/cloud/migrationcenter/v1/migrationcenter.proto @@ -0,0 +1,4005 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.migrationcenter.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/date.proto"; +import "google/type/money.proto"; + +option csharp_namespace = "Google.Cloud.MigrationCenter.V1"; +option go_package = "cloud.google.com/go/migrationcenter/apiv1/migrationcenterpb;migrationcenterpb"; +option java_multiple_files = true; +option java_outer_classname = "MigrationCenterProto"; +option java_package = "com.google.cloud.migrationcenter.v1"; +option php_namespace = "Google\\Cloud\\MigrationCenter\\V1"; +option ruby_package = "Google::Cloud::MigrationCenter::V1"; + +// Service describing handlers for resources. +service MigrationCenter { + option (google.api.default_host) = "migrationcenter.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all the assets in a given project and location. + rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/assets" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of an asset. + rpc GetAsset(GetAssetRequest) returns (Asset) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/assets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the parameters of an asset. + rpc UpdateAsset(UpdateAssetRequest) returns (Asset) { + option (google.api.http) = { + patch: "/v1/{asset.name=projects/*/locations/*/assets/*}" + body: "asset" + }; + option (google.api.method_signature) = "asset,update_mask"; + } + + // Updates the parameters of a list of assets. + rpc BatchUpdateAssets(BatchUpdateAssetsRequest) + returns (BatchUpdateAssetsResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/assets:batchUpdate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // Deletes an asset. + rpc DeleteAsset(DeleteAssetRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/assets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes list of Assets. + rpc BatchDeleteAssets(BatchDeleteAssetsRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/assets:batchDelete" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + } + + // Reports a set of frames. + rpc ReportAssetFrames(ReportAssetFramesRequest) + returns (ReportAssetFramesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/assets:reportAssetFrames" + body: "frames" + }; + } + + // Aggregates the requested fields based on provided function. + rpc AggregateAssetsValues(AggregateAssetsValuesRequest) + returns (AggregateAssetsValuesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/assets:aggregateValues" + body: "*" + }; + } + + // Creates an import job. + rpc CreateImportJob(CreateImportJobRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/importJobs" + body: "import_job" + }; + option (google.api.method_signature) = "parent,import_job,import_job_id"; + option (google.longrunning.operation_info) = { + response_type: "ImportJob" + metadata_type: "OperationMetadata" + }; + } + + // Lists all import jobs. + rpc ListImportJobs(ListImportJobsRequest) returns (ListImportJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/importJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of an import job. + rpc GetImportJob(GetImportJobRequest) returns (ImportJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/importJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes an import job. + rpc DeleteImportJob(DeleteImportJobRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/importJobs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates an import job. + rpc UpdateImportJob(UpdateImportJobRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{import_job.name=projects/*/locations/*/importJobs/*}" + body: "import_job" + }; + option (google.api.method_signature) = "import_job,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ImportJob" + metadata_type: "OperationMetadata" + }; + } + + // Validates an import job. + rpc ValidateImportJob(ValidateImportJobRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/importJobs/*}:validate" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Runs an import job. + rpc RunImportJob(RunImportJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/importJobs/*}:run" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets an import data file. + rpc GetImportDataFile(GetImportDataFileRequest) returns (ImportDataFile) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/importJobs/*/importDataFiles/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List import data files. + rpc ListImportDataFiles(ListImportDataFilesRequest) + returns (ListImportDataFilesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/importJobs/*}/importDataFiles" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an import data file. + rpc CreateImportDataFile(CreateImportDataFileRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/importJobs/*}/importDataFiles" + body: "import_data_file" + }; + option (google.api.method_signature) = + "parent,import_data_file,import_data_file_id"; + option (google.longrunning.operation_info) = { + response_type: "ImportDataFile" + metadata_type: "OperationMetadata" + }; + } + + // Delete an import data file. + rpc DeleteImportDataFile(DeleteImportDataFileRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/importJobs/*/importDataFiles/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists all groups in a given project and location. + rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/groups" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a group. + rpc GetGroup(GetGroupRequest) returns (Group) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/groups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new group in a given project and location. + rpc CreateGroup(CreateGroupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/groups" + body: "group" + }; + option (google.api.method_signature) = "parent,group,group_id"; + option (google.longrunning.operation_info) = { + response_type: "Group" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a group. + rpc UpdateGroup(UpdateGroupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{group.name=projects/*/locations/*/groups/*}" + body: "group" + }; + option (google.api.method_signature) = "group,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Group" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a group. + rpc DeleteGroup(DeleteGroupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/groups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Adds assets to a group. + rpc AddAssetsToGroup(AddAssetsToGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{group=projects/*/locations/*/groups/*}:addAssets" + body: "*" + }; + option (google.api.method_signature) = "group"; + option (google.longrunning.operation_info) = { + response_type: "Group" + metadata_type: "OperationMetadata" + }; + } + + // Removes assets from a group. + rpc RemoveAssetsFromGroup(RemoveAssetsFromGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{group=projects/*/locations/*/groups/*}:removeAssets" + body: "*" + }; + option (google.api.method_signature) = "group"; + option (google.longrunning.operation_info) = { + response_type: "Group" + metadata_type: "OperationMetadata" + }; + } + + // Lists all error frames in a given source and location. + rpc ListErrorFrames(ListErrorFramesRequest) + returns (ListErrorFramesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/sources/*}/errorFrames" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of an error frame. + rpc GetErrorFrame(GetErrorFrameRequest) returns (ErrorFrame) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/sources/*/errorFrames/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all the sources in a given project and location. + rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/sources" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a source. + rpc GetSource(GetSourceRequest) returns (Source) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/sources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new source in a given project and location. + rpc CreateSource(CreateSourceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/sources" + body: "source" + }; + option (google.api.method_signature) = "parent,source,source_id"; + option (google.longrunning.operation_info) = { + response_type: "Source" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a source. + rpc UpdateSource(UpdateSourceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{source.name=projects/*/locations/*/sources/*}" + body: "source" + }; + option (google.api.method_signature) = "source,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Source" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a source. + rpc DeleteSource(DeleteSourceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/sources/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists all the preference sets in a given project and location. + rpc ListPreferenceSets(ListPreferenceSetsRequest) + returns (ListPreferenceSetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/preferenceSets" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a preference set. + rpc GetPreferenceSet(GetPreferenceSetRequest) returns (PreferenceSet) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/preferenceSets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new preference set in a given project and location. + rpc CreatePreferenceSet(CreatePreferenceSetRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/preferenceSets" + body: "preference_set" + }; + option (google.api.method_signature) = + "parent,preference_set,preference_set_id"; + option (google.longrunning.operation_info) = { + response_type: "PreferenceSet" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a preference set. + rpc UpdatePreferenceSet(UpdatePreferenceSetRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{preference_set.name=projects/*/locations/*/preferenceSets/*}" + body: "preference_set" + }; + option (google.api.method_signature) = "preference_set,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "PreferenceSet" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a preference set. + rpc DeletePreferenceSet(DeletePreferenceSetRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/preferenceSets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets the details of regional settings. + rpc GetSettings(GetSettingsRequest) returns (Settings) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/settings}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the regional-level project settings. + rpc UpdateSettings(UpdateSettingsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{settings.name=projects/*/locations/*/settings}" + body: "settings" + }; + option (google.api.method_signature) = "settings,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Settings" + metadata_type: "OperationMetadata" + }; + } + + // Creates a report configuration. + rpc CreateReportConfig(CreateReportConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/reportConfigs" + body: "report_config" + }; + option (google.api.method_signature) = + "parent,report_config,report_config_id"; + option (google.longrunning.operation_info) = { + response_type: "ReportConfig" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single ReportConfig. + rpc GetReportConfig(GetReportConfigRequest) returns (ReportConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/reportConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists ReportConfigs in a given project and location. + rpc ListReportConfigs(ListReportConfigsRequest) + returns (ListReportConfigsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/reportConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a ReportConfig. + rpc DeleteReportConfig(DeleteReportConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/reportConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Creates a report. + rpc CreateReport(CreateReportRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/reportConfigs/*}/reports" + body: "report" + }; + option (google.api.method_signature) = "parent,report,report_id"; + option (google.longrunning.operation_info) = { + response_type: "Report" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single Report. + rpc GetReport(GetReportRequest) returns (Report) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/reportConfigs/*/reports/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Reports in a given ReportConfig. + rpc ListReports(ListReportsRequest) returns (ListReportsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/reportConfigs/*}/reports" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a Report. + rpc DeleteReport(DeleteReportRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/reportConfigs/*/reports/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// An asset represents a resource in your environment. Asset types include +// virtual machines and databases. +message Asset { + option (google.api.resource) = { + type: "migrationcenter.googleapis.com/Asset" + pattern: "projects/{project}/locations/{location}/assets/{asset}" + }; + + // Output only. The full name of the asset. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the asset was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the asset was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels as key value pairs. + map labels = 4; + + // Generic asset attributes. + map attributes = 5; + + // The internal information of an asset. Only one field can be specified + // with different attributes based on the type of the asset. + oneof AssetDetails { + // Output only. Asset information specific for virtual and physical + // machines. + MachineDetails machine_details = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The list of insights associated with the asset. + InsightList insight_list = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Performance data for the asset. + AssetPerformanceData performance_data = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The list of sources contributing to the asset. + repeated string sources = 22 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Source" + } + ]; + + // Output only. The list of groups that the asset is assigned to. + repeated string assigned_groups = 23 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Group" + } + ]; +} + +// The preferences that apply to all assets in a given context. +message PreferenceSet { + option (google.api.resource) = { + type: "migrationcenter.googleapis.com/PreferenceSet" + pattern: "projects/{project}/locations/{location}/preferenceSets/{preference_set}" + }; + + // Output only. Name of the preference set. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the preference set was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the preference set was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-friendly display name. Maximum length is 63 characters. + string display_name = 4; + + // A description of the preference set. + string description = 5; + + // A set of preferences that applies to all virtual machines in the context. + VirtualMachinePreferences virtual_machine_preferences = 6; +} + +// A resource that represents the background job that imports asset frames. +message ImportJob { + option (google.api.resource) = { + type: "migrationcenter.googleapis.com/ImportJob" + pattern: "projects/{project}/locations/{location}/importJobs/{import_job}" + }; + + // Enumerates possible states of an import job. + enum ImportJobState { + // Default value. + IMPORT_JOB_STATE_UNSPECIFIED = 0; + + // The import job is pending. + IMPORT_JOB_STATE_PENDING = 1; + + // The processing of the import job is ongoing. + IMPORT_JOB_STATE_RUNNING = 2; + + // The import job processing has completed. + IMPORT_JOB_STATE_COMPLETED = 3; + + // The import job failed to be processed. + IMPORT_JOB_STATE_FAILED = 4; + + // The import job is being validated. + IMPORT_JOB_STATE_VALIDATING = 5; + + // The import job contains blocking errors. + IMPORT_JOB_STATE_FAILED_VALIDATION = 6; + + // The validation of the job completed with no blocking errors. + IMPORT_JOB_STATE_READY = 7; + } + + // Output only. The full name of the import job. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-friendly display name. Maximum length is 63 characters. + string display_name = 2; + + // Output only. The timestamp when the import job was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the import job was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the import job was completed. + google.protobuf.Timestamp complete_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of the import job. + ImportJobState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels as key value pairs. + map labels = 7; + + // Required. Reference to a source. + string asset_source = 8 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Source" + } + ]; + + // Holds the various report types of an import job. + oneof report { + // Output only. The report with the validation results of the import job. + ValidationReport validation_report = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The report with the results of running the import job. + ExecutionReport execution_report = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// A resource that represents a payload file in an import job. +message ImportDataFile { + option (google.api.resource) = { + type: "migrationcenter.googleapis.com/ImportDataFile" + pattern: "projects/{project}/locations/{location}/importJobs/{import_job}/importDataFiles/{import_data_file}" + }; + + // Enumerates possible states of an import data file. + enum State { + // Default value. + STATE_UNSPECIFIED = 0; + + // The data file is being created. + CREATING = 1; + + // The data file completed initialization. + ACTIVE = 2; + } + + // Output only. The name of the file. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-friendly display name. Maximum length is 63 characters. + string display_name = 6; + + // Required. The payload format. + ImportJobFormat format = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The timestamp when the file was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of the import data file. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + oneof file_info { + // Information about a file that is uploaded to a storage service. + UploadFileInfo upload_file_info = 5; + } +} + +// A resource that represents an asset group. +// The purpose of an asset group is to bundle a set of assets that have +// something in common, while allowing users to add annotations to the group. +// An asset can belong to multiple groups. +message Group { + option (google.api.resource) = { + type: "migrationcenter.googleapis.com/Group" + pattern: "projects/{project}/locations/{location}/groups/{group}" + }; + + // Output only. The name of the group. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the group was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the group was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels as key value pairs. + map labels = 4; + + // User-friendly display name. + string display_name = 5; + + // The description of the resource. + string description = 6; +} + +// Message representing a frame which failed to be processed due to an error. +message ErrorFrame { + option (google.api.resource) = { + type: "migrationcenter.googleapis.com/ErrorFrame" + pattern: "projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}" + }; + + // Output only. The identifier of the ErrorFrame. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. All the violations that were detected for the frame. + repeated FrameViolationEntry violations = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The frame that was originally reported. + AssetFrame original_frame = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Frame ingestion time. + google.protobuf.Timestamp ingestion_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Source represents an object from which asset information is +// streamed to Migration Center. +message Source { + option (google.api.resource) = { + type: "migrationcenter.googleapis.com/Source" + pattern: "projects/{project}/locations/{location}/sources/{source}" + }; + + enum SourceType { + // Unspecified + SOURCE_TYPE_UNKNOWN = 0; + + // Manually uploaded file (e.g. CSV) + SOURCE_TYPE_UPLOAD = 1; + + // Guest-level info + SOURCE_TYPE_GUEST_OS_SCAN = 2; + + // Inventory-level scan + SOURCE_TYPE_INVENTORY_SCAN = 3; + + // Third-party owned sources. + SOURCE_TYPE_CUSTOM = 4; + } + + // Enumerates possible states of a source. + enum State { + // Unspecified. + STATE_UNSPECIFIED = 0; + + // The source is active and ready to be used. + ACTIVE = 1; + + // In the process of being deleted. + DELETING = 2; + + // Source is in an invalid state. Asset frames reported to it will be + // ignored. + INVALID = 3; + } + + // Output only. The full name of the source. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the source was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the source was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-friendly display name. + string display_name = 4; + + // Free-text description. + string description = 5; + + // Data source type. + SourceType type = 6; + + // The information confidence of the source. + // The higher the value, the higher the confidence. + int32 priority = 7; + + // If `true`, the source is managed by other service(s). + bool managed = 8; + + // Output only. Number of frames that are still being processed. + int32 pending_frame_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of frames that were reported by the source and + // contained errors. + int32 error_frame_count = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of the source. + State state = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The groups and associated preference sets on which +// we can generate reports. +message ReportConfig { + option (google.api.resource) = { + type: "migrationcenter.googleapis.com/ReportConfig" + pattern: "projects/{project}/locations/{location}/reportConfigs/{report_config}" + }; + + // Represents a combination of a group with a preference set. + message GroupPreferenceSetAssignment { + // Required. Name of the group. + string group = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Group" + } + ]; + + // Required. Name of the Preference Set. + string preference_set = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/PreferenceSet" + } + ]; + } + + // Output only. Name of resource. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the resource was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the resource was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-friendly display name. Maximum length is 63 characters. + string display_name = 4; + + // Free-text description. + string description = 5; + + // Required. Collection of combinations of groups and preference sets. + repeated GroupPreferenceSetAssignment group_preferenceset_assignments = 6 + [(google.api.field_behavior) = REQUIRED]; +} + +// Report represents a point-in-time rendering of the ReportConfig results. +message Report { + option (google.api.resource) = { + type: "migrationcenter.googleapis.com/Report" + pattern: "projects/{project}/locations/{location}/reportConfigs/{report_config}/reports/{report}" + }; + + // Report type. + enum Type { + // Default Report type. + TYPE_UNSPECIFIED = 0; + + // Total cost of ownership Report type. + TOTAL_COST_OF_OWNERSHIP = 1; + } + + // Report creation state. + enum State { + // Default Report creation state. + STATE_UNSPECIFIED = 0; + + // Creating Report. + PENDING = 1; + + // Successfully created Report. + SUCCEEDED = 2; + + // Failed to create Report. + FAILED = 3; + } + + // Output only. Name of resource. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-friendly display name. Maximum length is 63 characters. + string display_name = 4; + + // Free-text description. + string description = 5; + + // Report type. + Type type = 6; + + // Report creation state. + State state = 7; + + // Output only. Summary view of the Report. + ReportSummary summary = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for requesting a list of assets. +message ListAssetsRequest { + // Required. Parent value for `ListAssetsRequest`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/Asset" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results. + string filter = 4; + + // Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5; + + // View of the assets. Defaults to BASIC. + AssetView view = 6; +} + +// Response message for listing assets. +message ListAssetsResponse { + // A list of assets. + repeated Asset assets = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Asset. +message GetAssetRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Asset" + } + ]; + + // View of the assets. Defaults to BASIC. + AssetView view = 2; +} + +// A request to update an asset. +message UpdateAssetRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `Asset` resource by the update. + // The values specified in the `update_mask` field are relative to the + // resource, not the full request. + // A field will be overwritten if it is in the mask. + // A single * value in the mask lets you to overwrite all fields. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated. + Asset asset = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to update a list of assets. +message BatchUpdateAssetsRequest { + // Required. Parent value for batch asset update. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/Asset" + } + ]; + + // Required. The request message specifying the resources to update. + // A maximum of 1000 assets can be modified in a batch. + repeated UpdateAssetRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response for updating a list of assets. +message BatchUpdateAssetsResponse { + // Update asset content. + // The content only includes values after field mask being applied. + repeated Asset assets = 1; +} + +// A request to delete an asset. +message DeleteAssetRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Asset" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete a list of asset. +message BatchDeleteAssetsRequest { + // Required. Parent value for batch asset delete. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/Asset" + } + ]; + + // Required. The IDs of the assets to delete. + // A maximum of 1000 assets can be deleted in a batch. + // Format: projects/{project}/locations/{location}/assets/{name}. + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Asset" + } + ]; + + // Optional. When this value is set to `true` the request is a no-op for + // non-existing assets. See https://google.aip.dev/135#delete-if-existing for + // additional details. Default value is `false`. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to report a set of asset frames. +message ReportAssetFramesRequest { + // Required. Parent of the resource. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Collection of frames data. + Frames frames = 2; + + // Required. Reference to a source. + string source = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Source" + } + ]; +} + +// A response to a call to `ReportAssetFrame`. +message ReportAssetFramesResponse {} + +// A request to aggregate one or more values. +message AggregateAssetsValuesRequest { + // Required. Parent value for `AggregateAssetsValuesRequest`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Array of aggregations to perform. + // Up to 25 aggregations can be defined. + repeated Aggregation aggregations = 2; + + // The aggregation will be performed on assets that match the provided filter. + string filter = 3; +} + +// A response to a request to aggregated assets values. +message AggregateAssetsValuesResponse { + // The aggregation results. + repeated AggregationResult results = 1; +} + +// A request to create an import job. +message CreateImportJobRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/ImportJob" + } + ]; + + // Required. ID of the import job. + string import_job_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created. + ImportJob import_job = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to list import jobs. +message ListImportJobsRequest { + // Required. Parent value for `ListImportJobsRequest`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/ImportJob" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results. + string filter = 4; + + // Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5; + + // Optional. The level of details of each import job. + // Default value is BASIC. + ImportJobView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response for listing import jobs. +message ListImportJobsResponse { + // The list of import jobs. + repeated ImportJob import_jobs = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// A request to get an import job. +message GetImportJobRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/ImportJob" + } + ]; + + // Optional. The level of details of the import job. + // Default value is FULL. + ImportJobView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete an import job. +message DeleteImportJobRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/ImportJob" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to `true`, any `ImportDataFiles` of this job will also be + // deleted If set to `false`, the request only works if the job has no data + // files. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to update an import job. +message UpdateImportJobRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `Asset` resource by the update. + // The values specified in the `update_mask` field are relative to the + // resource, not the full request. + // A field will be overwritten if it is in the mask. + // A single * value in the mask lets you to overwrite all fields. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + ImportJob import_job = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to validate an import job. +message ValidateImportJobRequest { + // Required. The name of the import job to validate. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/ImportJob" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to run an import job. +message RunImportJobRequest { + // Required. The name of the import job to run. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/ImportJob" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to get an import data file. +message GetImportDataFileRequest { + // Required. Name of the ImportDataFile. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/ImportDataFile" + } + ]; +} + +// A request to list import data files of an import job. +message ListImportDataFilesRequest { + // Required. Name of the parent of the `ImportDataFiles` resource. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/ImportDataFile" + } + ]; + + // The maximum number of data files to return. The service may return + // fewer than this value. If unspecified, at most 500 data files will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListImportDataFiles` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListImportDataFiles` + // must match the call that provided the page token. + string page_token = 3; + + // Filtering results. + string filter = 4; + + // Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5; +} + +// Response for listing payload files of an import job. +message ListImportDataFilesResponse { + // The list of import data files. + repeated ImportDataFile import_data_files = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// A request to create an `ImportDataFile` resource. +message CreateImportDataFileRequest { + // Required. Name of the parent of the ImportDataFile. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/ImportDataFile" + } + ]; + + // Required. The ID of the new data file. + string import_data_file_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created. + ImportDataFile import_data_file = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete an `ImportDataFile` resource. +message DeleteImportDataFileRequest { + // Required. Name of the ImportDataFile to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/ImportDataFile" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to list groups. +message ListGroupsRequest { + // Required. Parent value for `ListGroupsRequest`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/Group" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results. + string filter = 4; + + // Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5; +} + +// A response for listing groups. +message ListGroupsResponse { + // The list of Group + repeated Group groups = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// A request to get a group. +message GetGroupRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Group" + } + ]; +} + +// A request to create a group. +message CreateGroupRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/Group" + } + ]; + + // Required. User specified ID for the group. It will become the last + // component of the group name. The ID must be unique within the project, must + // conform with RFC-1034, is restricted to lower-cased letters, and has a + // maximum length of 63 characters. The ID must match the regular expression: + // `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + string group_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The group resource being created. + Group group = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to update a group. +message UpdateGroupRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `Group` resource by the update. + // The values specified in the `update_mask` are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. + // A single * value in the mask lets you to overwrite all fields. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The group resource being updated. + Group group = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete a group. +message DeleteGroupRequest { + // Required. Name of the group resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Group" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to add assets to a group. +message AddAssetsToGroupRequest { + // Required. Group reference. + string group = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Group" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. List of assets to be added. + // The maximum number of assets that can be added in a single request is + // 1000. + AssetList assets = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. When this value is set to `false` and one of the given assets is + // already an existing member of the group, the operation fails with an + // `Already Exists` error. When set to `true` this situation is silently + // ignored by the server. + // + // Default value is `false`. + bool allow_existing = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to remove assets from a group. +message RemoveAssetsFromGroupRequest { + // Required. Group reference. + string group = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Group" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. List of assets to be removed. + // The maximum number of assets that can be removed in a single request is + // 1000. + AssetList assets = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. When this value is set to `false` and one of the given assets is + // not an existing member of the group, the operation fails with a `Not Found` + // error. When set to `true` this situation is silently ignored by the server. + // + // Default value is `false`. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to list error frames for a source. +message ListErrorFramesRequest { + // Required. Parent value (the source) for `ListErrorFramesRequest`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/ErrorFrame" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Optional. An optional view mode to control the level of details of each + // error frame. The default is a BASIC frame view. + ErrorFrameView view = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response for listing error frames. +message ListErrorFramesResponse { + // The list of error frames. + repeated ErrorFrame error_frames = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +message GetErrorFrameRequest { + // Required. The name of the frame to retrieve. + // Format: + // projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/ErrorFrame" + } + ]; + + // Optional. An optional view mode to control the level of details for the + // frame. The default is a basic frame view. + ErrorFrameView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request for a list of sources. +message ListSourcesRequest { + // Required. Parent value for `ListSourcesRequest`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/Source" + } + ]; + + // Requested page size. The server may return fewer items than requested. + // If unspecified, the server will pick an appropriate default value. + int32 page_size = 2; + + // A token identifying a page of results that the server should return. + string page_token = 3; + + // Filtering results. + string filter = 4; + + // Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5; +} + +// Response message for listing sources. +message ListSourcesResponse { + // The list of sources. + repeated Source sources = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// A request to get a source. +message GetSourceRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Source" + } + ]; +} + +// A request to create a source. +message CreateSourceRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/Source" + } + ]; + + // Required. User specified ID for the source. It will become the last + // component of the source name. The ID must be unique within the project, + // must conform with RFC-1034, is restricted to lower-cased letters, and has a + // maximum length of 63 characters. The ID must match the regular expression: + // `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + string source_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created. + Source source = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to update a source. +message UpdateSourceRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `Source` resource by the update. + // The values specified in the `update_mask` field are relative to the + // resource, not the full request. + // A field will be overwritten if it is in the mask. + // A single * value in the mask lets you to overwrite all fields. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + Source source = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete a source. +message DeleteSourceRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Source" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for listing preference sets. +message ListPreferenceSetsRequest { + // Required. Parent value for `ListPreferenceSetsRequest`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/PreferenceSet" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, at most 500 preference sets will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5; +} + +// Response message for listing preference sets. +message ListPreferenceSetsResponse { + // The list of PreferenceSets + repeated PreferenceSet preference_sets = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// A request to get a preference set. +message GetPreferenceSetRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/PreferenceSet" + } + ]; +} + +// A request to create a preference set. +message CreatePreferenceSetRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/PreferenceSet" + } + ]; + + // Required. User specified ID for the preference set. It will become the last + // component of the preference set name. The ID must be unique within the + // project, must conform with RFC-1034, is restricted to lower-cased letters, + // and has a maximum length of 63 characters. The ID must match the regular + // expression + // `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + string preference_set_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The preference set resource being created. + PreferenceSet preference_set = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to update a preference set. +message UpdatePreferenceSetRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `PreferenceSet` resource by the update. + // The values specified in the `update_mask` field are relative to the + // resource, not the full request. + // A field will be overwritten if it is in the mask. + // A single * value in the mask lets you to overwrite all fields. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The preference set resource being updated. + PreferenceSet preference_set = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete a preference set. +message DeletePreferenceSetRequest { + // Required. Name of the group resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/PreferenceSet" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to get the settings. +message GetSettingsRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Settings" + } + ]; +} + +// A request to update the settings. +message UpdateSettingsRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `Settings` resource by the update. + // The values specified in the `update_mask` field are relative to the + // resource, not the full request. + // A field will be overwritten if it is in the mask. + // A single * value in the mask lets you to overwrite all fields. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The project settings resource being updated. + Settings settings = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to create a `ReportConfig` resource. +message CreateReportConfigRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/ReportConfig" + } + ]; + + // Required. User specified ID for the report config. It will become the last + // component of the report config name. The ID must be unique within the + // project, must conform with RFC-1034, is restricted to lower-cased letters, + // and has a maximum length of 63 characters. The ID must match the regular + // expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + string report_config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The report config set resource being created. + ReportConfig report_config = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete a ReportConfig. +message DeleteReportConfigRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/ReportConfig" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to `true`, any child `Reports` of this entity will also be + // deleted. If set to `false`, the request only works if the resource has no + // children. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to get a Report. +message GetReportRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Report" + } + ]; + + // Determines what information to retrieve for the Report. + ReportView view = 6; +} + +// A request for a list of Reports. +message ListReportsRequest { + // Required. Parent value for `ListReportsRequest`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/Report" + } + ]; + + // Requested page size. The server may return fewer items than requested. + // If unspecified, the server will pick an appropriate default value. + int32 page_size = 2; + + // A token identifying a page of results that the server should return. + string page_token = 3; + + // Filtering results. + string filter = 4; + + // Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5; + + // Determines what information to retrieve for each Report. + ReportView view = 6; +} + +// Response message for listing Reports. +message ListReportsResponse { + // The list of Reports. + repeated Report reports = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// A request to delete a Report. +message DeleteReportRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Report" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, 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). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to get a `ReportConfig` resource. +message GetReportConfigRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/ReportConfig" + } + ]; +} + +// A request to get a list of `ReportConfig` resources. +message ListReportConfigsRequest { + // Required. Parent value for `ListReportConfigsRequest`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/ReportConfig" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results. + string filter = 4; + + // Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5; +} + +// Response message for listing report configs. +message ListReportConfigsResponse { + // A list of report configs. + repeated ReportConfig report_configs = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for creating a Report. +message CreateReportRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "migrationcenter.googleapis.com/Report" + } + ]; + + // Required. User specified id for the report. It will become the last + // component of the report name. The id must be unique within the project, + // must conform with RFC-1034, is restricted to lower-cased letters, and has a + // maximum length of 63 characters. The id must match the regular expression: + // [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + string report_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The report resource being created. + Report report = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Collection of frame data. +message Frames { + // A repeated field of asset data. + repeated AssetFrame frames_data = 1; +} + +// Contains data reported from an inventory source on an asset. +message AssetFrame { + // The internal data of the frame is a oneof field depending on the type + // of asset information in the frame. + oneof FrameData { + // Asset information specific for virtual machines. + MachineDetails machine_details = 1; + } + + // The time the data was reported. + google.protobuf.Timestamp report_time = 10; + + // Labels as key value pairs. + map labels = 11; + + // Generic asset attributes. + map attributes = 12; + + // Asset performance data samples. + repeated PerformanceSample performance_samples = 13; + + // Optional. Trace token is optionally provided to assist with debugging and + // traceability. + string trace_token = 14 [(google.api.field_behavior) = OPTIONAL]; +} + +// Details of a machine. +message MachineDetails { + // Machine power state. + enum PowerState { + // Power state is unknown. + POWER_STATE_UNSPECIFIED = 0; + + // The machine is preparing to enter the ACTIVE state. An instance may enter + // the PENDING state when it launches for the first time, or when it is + // started after being in the SUSPENDED state. + PENDING = 1; + + // The machine is active. + ACTIVE = 2; + + // The machine is being turned off. + SUSPENDING = 3; + + // The machine is off. + SUSPENDED = 4; + + // The machine is being deleted from the hosting platform. + DELETING = 5; + + // The machine is deleted from the hosting platform. + DELETED = 6; + } + + // Machine unique identifier. + string uuid = 1; + + // Machine name. + string machine_name = 2; + + // Machine creation time. + google.protobuf.Timestamp create_time = 3; + + // Number of CPU cores in the machine. Must be non-negative. + int32 core_count = 4; + + // The amount of memory in the machine. Must be non-negative. + int32 memory_mb = 5; + + // Power state of the machine. + PowerState power_state = 6; + + // Architecture details (vendor, CPU architecture). + MachineArchitectureDetails architecture = 7; + + // Guest OS information. + GuestOsDetails guest_os = 8; + + // Network details. + MachineNetworkDetails network = 9; + + // Disk details. + MachineDiskDetails disks = 10; + + // Platform specific information. + PlatformDetails platform = 11; +} + +// Details of the machine architecture. +message MachineArchitectureDetails { + // Firmware type. + enum FirmwareType { + // Unspecified or unknown. + FIRMWARE_TYPE_UNSPECIFIED = 0; + + // BIOS firmware. + BIOS = 1; + + // EFI firmware. + EFI = 2; + } + + // CPU hyper-threading support. + enum CpuHyperThreading { + // Unspecified or unknown. + CPU_HYPER_THREADING_UNSPECIFIED = 0; + + // Hyper-threading is disabled. + DISABLED = 1; + + // Hyper-threading is enabled. + ENABLED = 2; + } + + // CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc. + string cpu_architecture = 1; + + // CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc. + string cpu_name = 2; + + // Hardware vendor. + string vendor = 3; + + // Number of CPU threads allocated to the machine. + int32 cpu_thread_count = 4; + + // Number of processor sockets allocated to the machine. + int32 cpu_socket_count = 5; + + // BIOS Details. + BiosDetails bios = 6; + + // Firmware type. + FirmwareType firmware_type = 7; + + // CPU hyper-threading support. + CpuHyperThreading hyperthreading = 8; +} + +// Details about the BIOS. +message BiosDetails { + // BIOS name. + string bios_name = 1; + + // BIOS ID. + string id = 2; + + // BIOS manufacturer. + string manufacturer = 3; + + // BIOS version. + string version = 4; + + // BIOS release date. + google.type.Date release_date = 5; + + // SMBIOS UUID. + string smbios_uuid = 6; +} + +// Details of network adapters and settings. +message MachineNetworkDetails { + // The primary IP address of the machine. + string primary_ip_address = 1; + + // The public IP address of the machine. + string public_ip_address = 2; + + // MAC address of the machine. + // This property is used to uniqly identify the machine. + string primary_mac_address = 3; + + // List of network adapters. + NetworkAdapterList adapters = 4; +} + +// List of network adapters. +message NetworkAdapterList { + // Network adapter entries. + repeated NetworkAdapterDetails entries = 1; +} + +// Details of network adapter. +message NetworkAdapterDetails { + // Network adapter type (e.g. VMXNET3). + string adapter_type = 1; + + // MAC address. + string mac_address = 2; + + // NetworkAddressList + NetworkAddressList addresses = 3; +} + +// List of allocated/assigned network addresses. +message NetworkAddressList { + // Network address entries. + repeated NetworkAddress entries = 1; +} + +// Details of network address. +message NetworkAddress { + // Network address assignment. + enum AddressAssignment { + // Unknown (default value). + ADDRESS_ASSIGNMENT_UNSPECIFIED = 0; + + // Staticly assigned IP. + ADDRESS_ASSIGNMENT_STATIC = 1; + + // Dynamically assigned IP (DHCP). + ADDRESS_ASSIGNMENT_DHCP = 2; + } + + // Assigned or configured IP Address. + string ip_address = 1; + + // Subnet mask. + string subnet_mask = 2; + + // Broadcast address. + string bcast = 3; + + // Fully qualified domain name. + string fqdn = 4; + + // Whether DHCP is used to assign addresses. + AddressAssignment assignment = 5; +} + +// Details of machine disks. +message MachineDiskDetails { + // Disk total Capacity. + int64 total_capacity_bytes = 1; + + // Total disk free space. + int64 total_free_bytes = 2; + + // List of disks. + DiskEntryList disks = 3; +} + +// VM disks. +message DiskEntryList { + // Disk entries. + repeated DiskEntry entries = 1; +} + +// Single disk entry. +message DiskEntry { + // Disks interface type. + enum InterfaceType { + // Interface type unknown or unspecified. + INTERFACE_TYPE_UNSPECIFIED = 0; + + // IDE interface type. + IDE = 1; + + // SATA interface type. + SATA = 2; + + // SAS interface type. + SAS = 3; + + // SCSI interface type. + SCSI = 4; + + // NVME interface type. + NVME = 5; + + // FC interface type. + FC = 6; + + // iSCSI interface type. + ISCSI = 7; + } + + // Disk capacity. + int64 capacity_bytes = 1; + + // Disk free space. + int64 free_bytes = 2; + + // Disk label. + string disk_label = 3; + + // Disk label type (e.g. BIOS/GPT) + string disk_label_type = 4; + + // Disks interface type. + InterfaceType interface_type = 5; + + // Partition layout. + DiskPartitionList partitions = 6; + + // Disk hardware address (e.g. 0:1 for SCSI). + string hw_address = 7; + + // Additional details for specific platforms. + oneof platform_specific { + // VMware disk details. + VmwareDiskConfig vmware = 20; + } +} + +// Disk partition list. +message DiskPartitionList { + // Partition entries. + repeated DiskPartition entries = 1; +} + +// Disk Partition details. +message DiskPartition { + // Partition type. + string type = 1; + + // Partition file system. + string file_system = 2; + + // Mount pount (Linux/Windows) or drive letter (Windows). + string mount_point = 3; + + // Partition capacity. + int64 capacity_bytes = 4; + + // Partition free space. + int64 free_bytes = 5; + + // Partition UUID. + string uuid = 6; + + // Sub-partitions. + DiskPartitionList sub_partitions = 7; +} + +// VMware disk config details. +message VmwareDiskConfig { + // VMDK backing type possible values. + enum BackingType { + // Default value. + BACKING_TYPE_UNSPECIFIED = 0; + + // Flat v1. + BACKING_TYPE_FLAT_V1 = 1; + + // Flat v2. + BACKING_TYPE_FLAT_V2 = 2; + + // Persistent memory, also known as Non-Volatile Memory (NVM). + BACKING_TYPE_PMEM = 3; + + // Raw Disk Memory v1. + BACKING_TYPE_RDM_V1 = 4; + + // Raw Disk Memory v2. + BACKING_TYPE_RDM_V2 = 5; + + // SEsparse is a snapshot format introduced in vSphere 5.5 for large disks. + BACKING_TYPE_SESPARSE = 6; + + // SEsparse v1. + BACKING_TYPE_SESPARSE_V1 = 7; + + // SEsparse v1. + BACKING_TYPE_SESPARSE_V2 = 8; + } + + // VMDK disk mode. + enum VmdkMode { + // VMDK disk mode unspecified or unknown. + VMDK_MODE_UNSPECIFIED = 0; + + // Dependent disk mode. + DEPENDENT = 1; + + // Independent - Persistent disk mode. + INDEPENDENT_PERSISTENT = 2; + + // Independent - Nonpersistent disk mode. + INDEPENDENT_NONPERSISTENT = 3; + } + + // RDM compatibility mode. + enum RdmCompatibility { + // Compatibility mode unspecified or unknown. + RDM_COMPATIBILITY_UNSPECIFIED = 0; + + // Physical compatibility mode. + PHYSICAL_COMPATIBILITY = 1; + + // Virtual compatibility mode. + VIRTUAL_COMPATIBILITY = 2; + } + + // VMDK backing type. + BackingType backing_type = 1; + + // Is VMDK shared with other VMs. + bool shared = 2; + + // VMDK disk mode. + VmdkMode vmdk_mode = 3; + + // RDM compatibility mode. + RdmCompatibility rdm_compatibility = 4; +} + +// Information from Guest-level collections. +message GuestOsDetails { + // The name of the operating system. + string os_name = 1; + + // What family the OS belong to, if known. + OperatingSystemFamily family = 2; + + // The version of the operating system. + string version = 3; + + // OS and app configuration. + GuestConfigDetails config = 4; + + // Runtime information. + GuestRuntimeDetails runtime = 5; +} + +// Guest OS config information. +message GuestConfigDetails { + // Security-Enhanced Linux (SELinux) mode. + enum SeLinuxMode { + // SELinux mode unknown or unspecified. + SE_LINUX_MODE_UNSPECIFIED = 0; + + // SELinux is disabled. + SE_LINUX_MODE_DISABLED = 1; + + // SELinux permissive mode. + SE_LINUX_MODE_PERMISSIVE = 2; + + // SELinux enforcing mode. + SE_LINUX_MODE_ENFORCING = 3; + } + + // OS issue (typically /etc/issue in Linux). + string issue = 1; + + // Mount list (Linux fstab). + FstabEntryList fstab = 2; + + // Hosts file (/etc/hosts). + HostsEntryList hosts = 3; + + // NFS exports. + NfsExportList nfs_exports = 4; + + // Security-Enhanced Linux (SELinux) mode. + SeLinuxMode selinux_mode = 5; +} + +// Fstab content. +message FstabEntryList { + // Fstab entries. + repeated FstabEntry entries = 1; +} + +// Single fstab entry. +message FstabEntry { + // The block special device or remote filesystem to be mounted. + string spec = 1; + + // The mount point for the filesystem. + string file = 2; + + // The type of the filesystem. + string vfstype = 3; + + // Mount options associated with the filesystem. + string mntops = 4; + + // Used by dump to determine which filesystems need to be dumped. + int32 freq = 5; + + // Used by the fsck(8) program to determine the order in which filesystem + // checks are done at reboot time. + int32 passno = 6; +} + +// Hosts content. +message HostsEntryList { + // Hosts entries. + repeated HostsEntry entries = 1; +} + +// Single /etc/hosts entry. +message HostsEntry { + // IP (raw, IPv4/6 agnostic). + string ip = 1; + + // List of host names / aliases. + repeated string host_names = 2; +} + +// NFS exports. +message NfsExportList { + // NFS export entries. + repeated NfsExport entries = 1; +} + +// NFS export. +message NfsExport { + // The directory being exported. + string export_directory = 1; + + // The hosts or networks to which the export is being shared. + repeated string hosts = 2; +} + +// Guest OS runtime information. +message GuestRuntimeDetails { + // Running background services. + RunningServiceList services = 1; + + // Running processes. + RunningProcessList processes = 2; + + // Runtime network information (connections, ports). + RuntimeNetworkInfo network = 3; + + // Last time the OS was booted. + google.protobuf.Timestamp last_boot_time = 4; + + // Domain, e.g. c.stratozone-development.internal. + string domain = 5; + + // Machine name. + string machine_name = 6; + + // Installed applications information. + GuestInstalledApplicationList installed_apps = 7; + + // Open files information. + OpenFileList open_file_list = 8; +} + +// List of running guest OS services. +message RunningServiceList { + // Running service entries. + repeated RunningService entries = 1; +} + +// Guest OS running service details. +message RunningService { + // Service state (OS-agnostic). + enum State { + // Service state unspecified. + STATE_UNSPECIFIED = 0; + + // Service is active. + ACTIVE = 1; + + // Service is paused. + PAUSED = 2; + + // Service is stopped. + STOPPED = 3; + } + + // Service start mode (OS-agnostic). + enum StartMode { + // Start mode unspecified. + START_MODE_UNSPECIFIED = 0; + + // The service is a device driver started by the system loader. + BOOT = 1; + + // The service is a device driver started by the IOInitSystem function. + SYSTEM = 2; + + // The service is started by the operating system, at system start-up + AUTO = 3; + + // The service is started only manually, by a user. + MANUAL = 4; + + // The service is disabled. + DISABLED = 5; + } + + // Service name. + string service_name = 1; + + // Service state (OS-agnostic). + State state = 2; + + // Service start mode (OS-agnostic). + StartMode start_mode = 3; + + // Service binary path. + string exe_path = 4; + + // Service command line. + string cmdline = 5; + + // Service pid. + int64 pid = 6; +} + +// List of running guest OS processes. +message RunningProcessList { + // Running process entries. + repeated RunningProcess entries = 1; +} + +// Guest OS running process details. +message RunningProcess { + // Process ID. + int64 pid = 1; + + // Process binary path. + string exe_path = 2; + + // Process full command line. + string cmdline = 3; + + // User running the process. + string user = 4; + + // Process extended attributes. + map attributes = 100; +} + +// Runtime networking information. +message RuntimeNetworkInfo { + // Time of the last network scan. + google.protobuf.Timestamp scan_time = 1; + + // Network connections. + NetworkConnectionList connections = 2; +} + +// Network connection list. +message NetworkConnectionList { + // Network connection entries. + repeated NetworkConnection entries = 1; +} + +message NetworkConnection { + // Network connection state. + enum State { + // Connection state is unknown or unspecified. + STATE_UNSPECIFIED = 0; + + // The connection is being opened. + OPENING = 1; + + // The connection is open. + OPEN = 2; + + // Listening for incoming connections. + LISTEN = 3; + + // The connection is being closed. + CLOSING = 4; + + // The connection is closed. + CLOSED = 5; + } + + // Connection protocol (e.g. TCP/UDP). + string protocol = 1; + + // Local IP address. + string local_ip_address = 2; + + // Local port. + int32 local_port = 3; + + // Remote IP address. + string remote_ip_address = 4; + + // Remote port. + int32 remote_port = 5; + + // Network connection state. + State state = 6; + + // Process ID. + int64 pid = 7; + + // Process or service name. + string process_name = 8; +} + +// Guest installed application list. +message GuestInstalledApplicationList { + // Application entries. + repeated GuestInstalledApplication entries = 1; +} + +// Guest installed application information. +message GuestInstalledApplication { + // Installed application name. + string application_name = 1; + + // Installed application vendor. + string vendor = 2; + + // The time when the application was installed. + google.protobuf.Timestamp install_time = 3; + + // Source path. + string path = 4; + + // Installed application version. + string version = 5; +} + +// Open file list. +message OpenFileList { + // Open file details entries. + repeated OpenFileDetails entries = 1; +} + +// Open file Information. +message OpenFileDetails { + // Opened file command. + string command = 1; + + // Opened file user. + string user = 2; + + // Opened file file type. + string file_type = 3; + + // Opened file file path. + string file_path = 4; +} + +// Information about the platform. +message PlatformDetails { + oneof vendor_details { + // VMware specific details. + VmwarePlatformDetails vmware_details = 1; + + // AWS EC2 specific details. + AwsEc2PlatformDetails aws_ec2_details = 2; + + // Azure VM specific details. + AzureVmPlatformDetails azure_vm_details = 3; + + // Generic platform details. + GenericPlatformDetails generic_details = 4; + + // Physical machines platform details. + PhysicalPlatformDetails physical_details = 5; + } +} + +// VMware specific details. +message VmwarePlatformDetails { + // vCenter version. + string vcenter_version = 1; + + // ESX version. + string esx_version = 2; + + // VMware os enum - + // 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. + string osid = 3; + + // Folder name in vCenter where asset resides. + string vcenter_folder = 4; + + // vCenter URI used in collection. + string vcenter_uri = 5; + + // vCenter VM ID. + string vcenter_vm_id = 6; +} + +// AWS EC2 specific details. +message AwsEc2PlatformDetails { + // AWS platform's machine type label. + string machine_type_label = 1; + + // The location of the machine in the AWS format. + string location = 2; +} + +// Azure VM specific details. +message AzureVmPlatformDetails { + // Azure platform's machine type label. + string machine_type_label = 1; + + // The location of the machine in the Azure format. + string location = 2; + + // Azure platform's provisioning state. + string provisioning_state = 3; +} + +// Generic platform details. +message GenericPlatformDetails { + // Free text representation of the machine location. + // The format of this field should not be relied on. Different VMs in the same + // location may have different string values for this field. + string location = 1; +} + +// Platform specific details for Physical Machines. +message PhysicalPlatformDetails { + // Free text representation of the machine location. + // The format of this field should not be relied on. Different machines in the + // same location may have different string values for this field. + string location = 1; +} + +// Memory usage sample. +message MemoryUsageSample { + // Percentage of system memory utilized. Must be in the interval [0, 100]. + float utilized_percentage = 1; +} + +// CPU usage sample. +message CpuUsageSample { + // Percentage of total CPU capacity utilized. Must be in the interval [0, + // 100]. On most systems can be calculated using 100 - idle percentage. + float utilized_percentage = 1; +} + +// Network usage sample. Values are across all network interfaces. +message NetworkUsageSample { + // Average network ingress in B/s sampled over a short window. + // Must be non-negative. + float average_ingress_bps = 1; + + // Average network egress in B/s sampled over a short window. + // Must be non-negative. + float average_egress_bps = 2; +} + +// Disk usage sample. Values are across all disks. +message DiskUsageSample { + // Average IOPS sampled over a short window. Must be non-negative. + float average_iops = 1; +} + +// Performance data sample. +message PerformanceSample { + // Time the sample was collected. + google.protobuf.Timestamp sample_time = 1; + + // Memory usage sample. + MemoryUsageSample memory = 2; + + // CPU usage sample. + CpuUsageSample cpu = 3; + + // Network usage sample. + NetworkUsageSample network = 4; + + // Disk usage sample. + DiskUsageSample disk = 5; +} + +// Performance data for an asset. +message AssetPerformanceData { + // Daily resource usage aggregations. + // Contains all of the data available for an asset, up to the last 420 days. + // Aggregations are sorted from oldest to most recent. + repeated DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; +} + +// Usage data aggregation for a single day. +message DailyResourceUsageAggregation { + // Statistical aggregation of samples for a single resource usage. + message Stats { + // Average usage value. + float average = 1; + + // Median usage value. + float median = 2; + + // 95th percentile usage value. + float nintey_fifth_percentile = 3; + + // Peak usage value. + float peak = 4; + } + + // Statistical aggregation of CPU usage. + message CPU { + // CPU utilization percentage. + Stats utilization_percentage = 1; + } + + // Statistical aggregation of memory usage. + message Memory { + // Memory utilization percentage. + Stats utilization_percentage = 1; + } + + // Statistical aggregation of network usage. + message Network { + // Network ingress in B/s. + Stats ingress_bps = 1; + + // Network egress in B/s. + Stats egress_bps = 2; + } + + // Statistical aggregation of disk usage. + message Disk { + // Disk I/O operations per second. + Stats iops = 1; + } + + // Aggregation date. Day boundaries are at midnight UTC. + google.type.Date date = 1; + + // CPU usage. + CPU cpu = 2; + + // Memory usage. + Memory memory = 3; + + // Network usage. + Network network = 4; + + // Disk usage. + Disk disk = 5; +} + +// Message containing insights list. +message InsightList { + // Output only. Insights of the list. + repeated Insight insights = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Update timestamp. + google.protobuf.Timestamp update_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// An insight about an asset. +message Insight { + oneof insight { + // Output only. An insight about potential migrations for an asset. + MigrationInsight migration_insight = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// An insight about potential migrations for an asset. +message MigrationInsight { + // Output only. Description of how well the asset this insight is associated + // with fits the proposed migration. + FitDescriptor fit = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A target for the migration. + oneof migration_target { + // Output only. A Google Compute Engine target. + ComputeEngineMigrationTarget compute_engine_target = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// Compute engine migration target. +message ComputeEngineMigrationTarget { + // Description of the suggested shape for the migration target. + ComputeEngineShapeDescriptor shape = 1; +} + +// Describes the fit level of an asset for migration to a specific target. +message FitDescriptor { + // Fit level. + enum FitLevel { + // Not enough information. + FIT_LEVEL_UNSPECIFIED = 0; + + // Fit. + FIT = 1; + + // No Fit. + NO_FIT = 2; + + // Fit with effort. + REQUIRES_EFFORT = 3; + } + + // Fit level. + FitLevel fit_level = 1; +} + +// Compute Engine target shape descriptor. +message ComputeEngineShapeDescriptor { + // Memory in mebibytes. + int32 memory_mb = 1; + + // Number of physical cores. + int32 physical_core_count = 2; + + // Number of logical cores. + int32 logical_core_count = 3; + + // Compute Engine machine series. + string series = 4; + + // Compute Engine machine type. + string machine_type = 5; +} + +// Message describing an aggregation. The message includes the aggregation type, +// parameters, and the field on which to perform the aggregation. +message Aggregation { + // Object count. + message Count {} + + // Sum of field values. + message Sum {} + + // Histogram of bucketed assets counts by field value. + message Histogram { + // Lower bounds of buckets. + // The response will contain `n+1` buckets for `n` bounds. + // The first bucket will count all assets for which the field value is + // smaller than the first bound. + // Subsequent buckets will count assets for which the field value is + // greater or equal to a lower bound and smaller than the next one. + // The last bucket will count assets for which the field value is greater or + // equal to the final lower bound. + // You can define up to 20 lower bounds. + repeated double lower_bounds = 1; + } + + // Frequency distribution of all field values. + message Frequency {} + + // The name of the field on which to aggregate. + string field = 1; + + oneof aggregation_function { + // Count the number of matching objects. + Count count = 2; + + // Sum over a numeric field. + Sum sum = 3; + + // Creates a bucketed histogram of field values. + Histogram histogram = 4; + + // Creates a frequency distribution of all field values. + Frequency frequency = 5; + } +} + +// Message describing a result of an aggregation. +message AggregationResult { + // The result of a count aggregation. + message Count { + int64 value = 1; + } + + // The result of a sum aggregation. + message Sum { + double value = 1; + } + + // The result of a bucketed histogram aggregation. + message Histogram { + // A histogram bucket with a lower and upper bound, and a count of items + // with a field value between those bounds. + // The lower bound is inclusive and the upper bound is exclusive. + // Lower bound may be -infinity and upper bound may be infinity. + message Bucket { + // Lower bound - inclusive. + double lower_bound = 1; + + // Upper bound - exclusive. + double upper_bound = 2; + + // Count of items in the bucket. + int64 count = 3; + } + + // Buckets in the histogram. + // There will be `n+1` buckets matching `n` lower bounds in the request. + // The first bucket will be from -infinity to the first bound. + // Subsequent buckets will be between one bound and the next. + // The final bucket will be from the final bound to infinity. + repeated Bucket buckets = 1; + } + + // The result of a frequency distribution aggregation. + message Frequency { + map values = 1; + } + + string field = 1; + + oneof result { + Count count = 2; + + Sum sum = 3; + + Histogram histogram = 4; + + Frequency frequency = 5; + } +} + +// A resource that aggregates the validation errors found in an import job file. +message FileValidationReport { + // The name of the file. + string file_name = 1; + + // Partial list of rows that encountered validation error. + repeated ImportRowError row_errors = 2; + + // Flag indicating that processing was aborted due to maximum number of + // errors. + bool partial_report = 3; + + // List of file level errors. + repeated ImportError file_errors = 4; +} + +// A resource that aggregates errors across import job files. +message ValidationReport { + // List of errors found in files. + repeated FileValidationReport file_validations = 1; + + // List of job level errors. + repeated ImportError job_errors = 2; +} + +// A resource that reports result of the import job execution. +message ExecutionReport { + // Total number of asset frames reported for the import job. + int32 frames_reported = 1; + + // Validation errors encountered during the execution of the import job. + ValidationReport execution_errors = 2; + + // Total number of rows in the import job. + int32 total_rows_count = 3; +} + +// A resource that reports the errors encountered while processing an +// import job. +message ImportError { + // Enumerate possible error severity. + enum Severity { + SEVERITY_UNSPECIFIED = 0; + + ERROR = 1; + + WARNING = 2; + + INFO = 3; + } + + // The error information. + string error_details = 1; + + // The severity of the error. + Severity severity = 2; +} + +// A resource that reports the import job errors at row level. +message ImportRowError { + // The row number where the error was detected. + int32 row_number = 1 [deprecated = true]; + + // The name of the VM in the row. + string vm_name = 2; + + // The VM UUID. + string vm_uuid = 3; + + // The list of errors detected in the row. + repeated ImportError errors = 4; +} + +// A resource that contains a URI to which a data file can be uploaded. +message UploadFileInfo { + // Output only. Upload URI for the file. + string signed_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The headers that were used to sign the URI. + map headers = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Expiration time of the upload URI. + google.protobuf.Timestamp uri_expiration_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Lists the asset IDs of all assets. +message AssetList { + // Required. A list of asset IDs + repeated string asset_ids = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/Asset" + } + ]; +} + +// A resource that contains a single violation of a reported `AssetFrame` +// resource. +message FrameViolationEntry { + // The field of the original frame where the violation occurred. + string field = 1; + + // A message describing the violation. + string violation = 2; +} + +// VirtualMachinePreferences enables you to create sets of assumptions, for +// example, a geographical location and pricing track, for your migrated virtual +// machines. The set of preferences influence recommendations for migrating +// virtual machine assets. +message VirtualMachinePreferences { + // Region preferences for assets using this preference set. + // If you are unsure which value to set, the migration service API region is + // often a good value to start with. + RegionPreferences region_preferences = 3; + + // Commitment plan to consider when calculating costs for virtual machine + // insights and recommendations. + // If you are unsure which value to set, a 3 year commitment plan is often a + // good value to start with. + CommitmentPlan commitment_plan = 4; + + // Sizing optimization strategy specifies the preferred strategy used when + // extrapolating usage data to calculate insights and recommendations for a + // virtual machine. + // If you are unsure which value to set, a moderate sizing optimization + // strategy is often a good value to start with. + SizingOptimizationStrategy sizing_optimization_strategy = 5; + + // Compute Engine preferences concern insights and recommendations for Compute + // Engine target. + ComputeEnginePreferences compute_engine_preferences = 6; +} + +// The user preferences relating to Compute Engine target platform. +message ComputeEnginePreferences { + // Preferences concerning the machine types to consider on Compute Engine. + MachinePreferences machine_preferences = 2; + + // License type to consider when calculating costs for virtual machine + // insights and recommendations. If unspecified, costs are calculated + // based on the default licensing plan. + LicenseType license_type = 3; +} + +// The type of machines to consider when calculating virtual machine migration +// insights and recommendations. +// Not all machine types are available in all zones and regions. +message MachinePreferences { + // Compute Engine machine series to consider for insights and recommendations. + // If empty, no restriction is applied on the machine series. + repeated MachineSeries allowed_machine_series = 1; +} + +// A Compute Engine machine series. +message MachineSeries { + // Code to identify a Compute Engine machine series. Consult + // https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison + // for more details on the available series. + string code = 1; +} + +// The user preferences relating to target regions. +message RegionPreferences { + // A list of preferred regions, + // ordered by the most preferred region first. + // Set only valid Google Cloud region names. + // See https://cloud.google.com/compute/docs/regions-zones + // for available regions. + repeated string preferred_regions = 1; +} + +// Describes the Migration Center settings related to the project. +message Settings { + option (google.api.resource) = { + type: "migrationcenter.googleapis.com/Settings" + pattern: "projects/{project}/locations/{location}/settings" + }; + + // Output only. The name of the resource. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The preference set used by default for a project. + string preference_set = 2 [(google.api.resource_reference) = { + type: "migrationcenter.googleapis.com/PreferenceSet" + }]; +} + +// Describes the Summary view of a Report, which contains aggregated values +// for all the groups and preference sets included in this Report. +message ReportSummary { + // Describes a collection of data points rendered as a Chart. + message ChartData { + // Describes a single data point in the Chart. + message DataPoint { + // The X-axis label for this data point. + string label = 1; + + // The Y-axis value for this data point. + double value = 2; + } + + // Each data point in the chart is represented as a name-value pair + // with the name being the x-axis label, and the value being the y-axis + // value. + repeated DataPoint data_points = 1; + } + + // Utilization Chart is a specific type of visualization which displays + // a metric classified into "Used" and "Free" buckets. + message UtilizationChartData { + // Aggregate value which falls into the "Used" bucket. + int64 used = 1; + + // Aggregate value which falls into the "Free" bucket. + int64 free = 2; + } + + // A Histogram Chart shows a distribution of values into buckets, showing + // a count of values which fall into a bucket. + message HistogramChartData { + // A histogram bucket with a lower and upper bound, and a count of items + // with a field value between those bounds. + // The lower bound is inclusive and the upper bound is exclusive. + // Lower bound may be -infinity and upper bound may be infinity. + message Bucket { + // Lower bound - inclusive. + int64 lower_bound = 1; + + // Upper bound - exclusive. + int64 upper_bound = 2; + + // Count of items in the bucket. + int64 count = 3; + } + + // Buckets in the histogram. + // There will be `n+1` buckets matching `n` lower bounds in the request. + // The first bucket will be from -infinity to the first bound. + // Subsequent buckets will be between one bound and the next. + // The final bucket will be from the final bound to infinity. + repeated Bucket buckets = 1; + } + + // Aggregate statistics for a collection of assets. + message AssetAggregateStats { + // Sum of the memory in bytes of all the assets in this collection. + int64 total_memory_bytes = 1; + + // Sum of persistent storage in bytes of all the assets in this collection. + int64 total_storage_bytes = 2; + + // Sum of the CPU core count of all the assets in this collection. + int64 total_cores = 3; + + // Count of the number of unique assets in this collection. + int64 total_assets = 4; + + // Total memory split into Used/Free buckets. + UtilizationChartData memory_utilization_chart = 5; + + // Total memory split into Used/Free buckets. + UtilizationChartData storage_utilization_chart = 6; + + // Count of assets grouped by Operating System families. + ChartData operating_system = 7; + + // Histogram showing a distribution of CPU core counts. + HistogramChartData core_count_histogram = 8; + + // Histogram showing a distribution of memory sizes. + HistogramChartData memory_bytes_histogram = 9; + + // Histogram showing a distribution of memory sizes. + HistogramChartData storage_bytes_histogram = 10; + } + + // Represents a data point tracking the count of assets allocated for a + // specific Machine Series. + message MachineSeriesAllocation { + // The Machine Series (e.g. "E2", "N2") + MachineSeries machine_series = 1; + + // Count of assets allocated to this machine series. + int64 allocated_asset_count = 2; + } + + // A set of findings that applies to assets destined for Compute Engine. + message ComputeEngineFinding { + // Set of regions in which the assets were allocated. + repeated string allocated_regions = 1; + + // Count of assets which were allocated. + int64 allocated_asset_count = 2; + + // Distribution of assets based on the Machine Series. + repeated MachineSeriesAllocation machine_series_allocations = 3; + + // Set of disk types allocated to assets. + repeated PersistentDiskType allocated_disk_types = 4; + } + + // Summary Findings for a specific Group/PreferenceSet combination. + message GroupPreferenceSetFinding { + // Display Name of the Preference Set + string display_name = 1; + + // Description for the Preference Set. + string description = 2; + + // A set of preferences that applies to all machines in the context. + VirtualMachinePreferences machine_preferences = 3; + + // Total monthly cost for this preference set. + google.type.Money monthly_cost_total = 4; + + // Compute monthly cost for this preference set. + google.type.Money monthly_cost_compute = 5; + + // Licensing monthly cost for this preference set. + google.type.Money monthly_cost_os_license = 6; + + // Network Egress monthly cost for this preference set. + google.type.Money monthly_cost_network_egress = 7; + + // Storage monthly cost for this preference set. + google.type.Money monthly_cost_storage = 8; + + // Miscellaneous monthly cost for this preference set. + google.type.Money monthly_cost_other = 9; + + // A set of findings that applies to Compute Engine machines in the input. + ComputeEngineFinding compute_engine_finding = 10; + } + + // Summary Findings for a specific Group. + message GroupFinding { + // Display Name for the Group. + string display_name = 1; + + // Description for the Group. + string description = 2; + + // Summary statistics for all the assets in this group. + AssetAggregateStats asset_aggregate_stats = 3; + + // Count of the number of assets in this group which are also included + // in another group within the same report. + int64 overlapping_asset_count = 4; + + // Findings for each of the PreferenceSets for this group. + repeated GroupPreferenceSetFinding preference_set_findings = 5; + } + + // Aggregate statistics for all the assets across all the groups. + AssetAggregateStats all_assets_stats = 1; + + // Findings for each Group included in this report. + repeated GroupFinding group_findings = 2; +} + +// Specifies the types of asset views that provide complete or partial details +// of an asset. +enum AssetView { + // The asset view is not specified. The API displays the basic view by + // default. + ASSET_VIEW_UNSPECIFIED = 0; + + // The asset view includes only basic metadata of the asset. + ASSET_VIEW_BASIC = 1; + + // The asset view includes all the metadata of an asset and performance data. + ASSET_VIEW_FULL = 2; +} + +// Known categories of operating systems. +enum OperatingSystemFamily { + OS_FAMILY_UNKNOWN = 0; + + // Microsoft Windows Server and Desktop. + OS_FAMILY_WINDOWS = 1; + + // Various Linux flavors. + OS_FAMILY_LINUX = 2; + + // Non-Linux Unix flavors. + OS_FAMILY_UNIX = 3; +} + +// Specifies the data formats supported by Migration Center. +enum ImportJobFormat { + // Default value. + IMPORT_JOB_FORMAT_UNSPECIFIED = 0; + + // RVTools format (XLSX). + IMPORT_JOB_FORMAT_RVTOOLS_XLSX = 1; + + // RVTools format (CSV). + IMPORT_JOB_FORMAT_RVTOOLS_CSV = 2; + + // CSV format exported from AWS using the + // [AWS collection + // script][https://github.com/GoogleCloudPlatform/aws-to-stratozone-export]. + IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV = 4; + + // CSV format exported from Azure using the + // [Azure collection + // script][https://github.com/GoogleCloudPlatform/azure-to-stratozone-export]. + IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV = 5; + + // CSV format created manually and following the StratoZone format. For more + // information, see [Manually create and upload data + // tables][https://cloud.google.com/migrate/stratozone/docs/import-data-portal]. + IMPORT_JOB_FORMAT_STRATOZONE_CSV = 6; +} + +// Specifies the types of import job views that provide complete or partial +// details of an import job. +enum ImportJobView { + // The import job view is not specified. The API displays the basic view by + // default. + IMPORT_JOB_VIEW_UNSPECIFIED = 0; + + // The import job view includes basic metadata of an import job. + // This view does not include payload information. + IMPORT_JOB_VIEW_BASIC = 1; + + // The import job view includes all metadata of an import job. + IMPORT_JOB_VIEW_FULL = 2; +} + +// ErrorFrameView can be specified in ErrorFrames List and Get requests to +// control the level of details that is returned for the original frame. +enum ErrorFrameView { + // Value is unset. The system will fallback to the default value. + ERROR_FRAME_VIEW_UNSPECIFIED = 0; + + // Include basic frame data, but not the full contents. + ERROR_FRAME_VIEW_BASIC = 1; + + // Include everything. + ERROR_FRAME_VIEW_FULL = 2; +} + +// The persistent disk (PD) types of Compute Engine virtual machines. +enum PersistentDiskType { + // Unspecified (default value). + // Selecting this value allows the system to use any disk type according + // to reported usage. This a good value to start with. + PERSISTENT_DISK_TYPE_UNSPECIFIED = 0; + + // Standard HDD Persistent Disk. + PERSISTENT_DISK_TYPE_STANDARD = 1; + + // Balanced Persistent Disk. + PERSISTENT_DISK_TYPE_BALANCED = 2; + + // SSD Persistent Disk. + PERSISTENT_DISK_TYPE_SSD = 3; +} + +// The License type for premium images (RHEL, RHEL for SAP, SLES, SLES for SAP, +// Windows Server). +enum LicenseType { + // Unspecified (default value). + LICENSE_TYPE_UNSPECIFIED = 0; + + // Default Google Cloud licensing plan. Licensing is charged per usage. + // This a good value to start with. + LICENSE_TYPE_DEFAULT = 1; + + // Bring-your-own-license (BYOL) plan. User provides the OS license. + LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2; +} + +// The sizing optimization strategy preferences of a virtual machine. This +// strategy, in addition to actual usage data of the virtual machine, can help +// determine the recommended shape on the target platform. +enum SizingOptimizationStrategy { + // Unspecified (default value). + SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; + + // No optimization applied. Virtual machine sizing matches as closely as + // possible the machine shape on the source site, not considering any actual + // performance data. + SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE = 1; + + // Virtual machine sizing will match the reported usage and shape, with some + // slack. This a good value to start with. + SIZING_OPTIMIZATION_STRATEGY_MODERATE = 2; + + // Virtual machine sizing will match the reported usage, with little slack. + // Using this option can help reduce costs. + SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE = 3; +} + +// The plan of commitments for VM resource-based committed use discount (CUD). +enum CommitmentPlan { + // Unspecified commitment plan. + COMMITMENT_PLAN_UNSPECIFIED = 0; + + // No commitment plan. + COMMITMENT_PLAN_NONE = 1; + + // 1 year commitment. + COMMITMENT_PLAN_ONE_YEAR = 2; + + // 3 years commitment. + COMMITMENT_PLAN_THREE_YEARS = 3; +} + +// Specifies the types of views that provide complete or partial details +// of a Report. +enum ReportView { + // The report view is not specified. The API displays the basic view by + // default. + REPORT_VIEW_UNSPECIFIED = 0; + + // The report view includes only basic metadata of the Report. Useful for + // list views. + REPORT_VIEW_BASIC = 1; + + // The report view includes all the metadata of the Report. Useful for + // preview. + REPORT_VIEW_FULL = 2; + + // The report view includes the standard metadata of an report. Useful for + // detail view. + REPORT_VIEW_STANDARD = 3; +} diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/AsyncAddAssetsToGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/AsyncAddAssetsToGroup.java new file mode 100644 index 000000000000..0812c747a887 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/AsyncAddAssetsToGroup.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest; +import com.google.cloud.migrationcenter.v1.AssetList; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.longrunning.Operation; + +public class AsyncAddAssetsToGroup { + + public static void main(String[] args) throws Exception { + asyncAddAssetsToGroup(); + } + + public static void asyncAddAssetsToGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + AddAssetsToGroupRequest request = + AddAssetsToGroupRequest.newBuilder() + .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setRequestId("requestId693933066") + .setAssets(AssetList.newBuilder().build()) + .setAllowExisting(true) + .build(); + ApiFuture future = + migrationCenterClient.addAssetsToGroupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/AsyncAddAssetsToGroupLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/AsyncAddAssetsToGroupLRO.java new file mode 100644 index 000000000000..b0b37445da15 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/AsyncAddAssetsToGroupLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest; +import com.google.cloud.migrationcenter.v1.AssetList; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; + +public class AsyncAddAssetsToGroupLRO { + + public static void main(String[] args) throws Exception { + asyncAddAssetsToGroupLRO(); + } + + public static void asyncAddAssetsToGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + AddAssetsToGroupRequest request = + AddAssetsToGroupRequest.newBuilder() + .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setRequestId("requestId693933066") + .setAssets(AssetList.newBuilder().build()) + .setAllowExisting(true) + .build(); + OperationFuture future = + migrationCenterClient.addAssetsToGroupOperationCallable().futureCall(request); + // Do something. + Group response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroup.java new file mode 100644 index 000000000000..7907898ff68e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroup.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_sync] +import com.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest; +import com.google.cloud.migrationcenter.v1.AssetList; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncAddAssetsToGroup { + + public static void main(String[] args) throws Exception { + syncAddAssetsToGroup(); + } + + public static void syncAddAssetsToGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + AddAssetsToGroupRequest request = + AddAssetsToGroupRequest.newBuilder() + .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setRequestId("requestId693933066") + .setAssets(AssetList.newBuilder().build()) + .setAllowExisting(true) + .build(); + Group response = migrationCenterClient.addAssetsToGroupAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroupGroupname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroupGroupname.java new file mode 100644 index 000000000000..bd8bffaff703 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroupGroupname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_Groupname_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncAddAssetsToGroupGroupname { + + public static void main(String[] args) throws Exception { + syncAddAssetsToGroupGroupname(); + } + + public static void syncAddAssetsToGroupGroupname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + Group response = migrationCenterClient.addAssetsToGroupAsync(group).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_Groupname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroupString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroupString.java new file mode 100644 index 000000000000..867dc20e3061 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/addassetstogroup/SyncAddAssetsToGroupString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_String_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncAddAssetsToGroupString { + + public static void main(String[] args) throws Exception { + syncAddAssetsToGroupString(); + } + + public static void syncAddAssetsToGroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString(); + Group response = migrationCenterClient.addAssetsToGroupAsync(group).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/aggregateassetsvalues/AsyncAggregateAssetsValues.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/aggregateassetsvalues/AsyncAggregateAssetsValues.java new file mode 100644 index 000000000000..d8312e1918c5 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/aggregateassetsvalues/AsyncAggregateAssetsValues.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_AggregateAssetsValues_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest; +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse; +import com.google.cloud.migrationcenter.v1.Aggregation; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import java.util.ArrayList; + +public class AsyncAggregateAssetsValues { + + public static void main(String[] args) throws Exception { + asyncAggregateAssetsValues(); + } + + public static void asyncAggregateAssetsValues() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + AggregateAssetsValuesRequest request = + AggregateAssetsValuesRequest.newBuilder() + .setParent("parent-995424086") + .addAllAggregations(new ArrayList()) + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + migrationCenterClient.aggregateAssetsValuesCallable().futureCall(request); + // Do something. + AggregateAssetsValuesResponse response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_AggregateAssetsValues_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/aggregateassetsvalues/SyncAggregateAssetsValues.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/aggregateassetsvalues/SyncAggregateAssetsValues.java new file mode 100644 index 000000000000..eed60e22f761 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/aggregateassetsvalues/SyncAggregateAssetsValues.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_AggregateAssetsValues_sync] +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest; +import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse; +import com.google.cloud.migrationcenter.v1.Aggregation; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import java.util.ArrayList; + +public class SyncAggregateAssetsValues { + + public static void main(String[] args) throws Exception { + syncAggregateAssetsValues(); + } + + public static void syncAggregateAssetsValues() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + AggregateAssetsValuesRequest request = + AggregateAssetsValuesRequest.newBuilder() + .setParent("parent-995424086") + .addAllAggregations(new ArrayList()) + .setFilter("filter-1274492040") + .build(); + AggregateAssetsValuesResponse response = migrationCenterClient.aggregateAssetsValues(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_AggregateAssetsValues_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/AsyncBatchDeleteAssets.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/AsyncBatchDeleteAssets.java new file mode 100644 index 000000000000..f561eadbecd8 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/AsyncBatchDeleteAssets.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_BatchDeleteAssets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; +import java.util.ArrayList; + +public class AsyncBatchDeleteAssets { + + public static void main(String[] args) throws Exception { + asyncBatchDeleteAssets(); + } + + public static void asyncBatchDeleteAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + BatchDeleteAssetsRequest request = + BatchDeleteAssetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllNames(new ArrayList()) + .setAllowMissing(true) + .build(); + ApiFuture future = + migrationCenterClient.batchDeleteAssetsCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_BatchDeleteAssets_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssets.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssets.java new file mode 100644 index 000000000000..710c20eeebc4 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssets.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_BatchDeleteAssets_sync] +import com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; +import java.util.ArrayList; + +public class SyncBatchDeleteAssets { + + public static void main(String[] args) throws Exception { + syncBatchDeleteAssets(); + } + + public static void syncBatchDeleteAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + BatchDeleteAssetsRequest request = + BatchDeleteAssetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllNames(new ArrayList()) + .setAllowMissing(true) + .build(); + migrationCenterClient.batchDeleteAssets(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_BatchDeleteAssets_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssetsLocationnameListstring.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssetsLocationnameListstring.java new file mode 100644 index 000000000000..1d66cb92f747 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssetsLocationnameListstring.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_BatchDeleteAssets_LocationnameListstring_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchDeleteAssetsLocationnameListstring { + + public static void main(String[] args) throws Exception { + syncBatchDeleteAssetsLocationnameListstring(); + } + + public static void syncBatchDeleteAssetsLocationnameListstring() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List names = new ArrayList<>(); + migrationCenterClient.batchDeleteAssets(parent, names); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_BatchDeleteAssets_LocationnameListstring_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssetsStringListstring.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssetsStringListstring.java new file mode 100644 index 000000000000..ea42ea197439 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchdeleteassets/SyncBatchDeleteAssetsStringListstring.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_BatchDeleteAssets_StringListstring_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchDeleteAssetsStringListstring { + + public static void main(String[] args) throws Exception { + syncBatchDeleteAssetsStringListstring(); + } + + public static void syncBatchDeleteAssetsStringListstring() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + List names = new ArrayList<>(); + migrationCenterClient.batchDeleteAssets(parent, names); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_BatchDeleteAssets_StringListstring_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/AsyncBatchUpdateAssets.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/AsyncBatchUpdateAssets.java new file mode 100644 index 000000000000..4093ce8193ee --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/AsyncBatchUpdateAssets.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_BatchUpdateAssets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest; +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.UpdateAssetRequest; +import java.util.ArrayList; + +public class AsyncBatchUpdateAssets { + + public static void main(String[] args) throws Exception { + asyncBatchUpdateAssets(); + } + + public static void asyncBatchUpdateAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + BatchUpdateAssetsRequest request = + BatchUpdateAssetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllRequests(new ArrayList()) + .build(); + ApiFuture future = + migrationCenterClient.batchUpdateAssetsCallable().futureCall(request); + // Do something. + BatchUpdateAssetsResponse response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_BatchUpdateAssets_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssets.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssets.java new file mode 100644 index 000000000000..a79a177cb470 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssets.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_BatchUpdateAssets_sync] +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest; +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.UpdateAssetRequest; +import java.util.ArrayList; + +public class SyncBatchUpdateAssets { + + public static void main(String[] args) throws Exception { + syncBatchUpdateAssets(); + } + + public static void syncBatchUpdateAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + BatchUpdateAssetsRequest request = + BatchUpdateAssetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllRequests(new ArrayList()) + .build(); + BatchUpdateAssetsResponse response = migrationCenterClient.batchUpdateAssets(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_BatchUpdateAssets_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssetsLocationnameListupdateassetrequest.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssetsLocationnameListupdateassetrequest.java new file mode 100644 index 000000000000..31da1dfd6a4f --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssetsLocationnameListupdateassetrequest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_BatchUpdateAssets_LocationnameListupdateassetrequest_sync] +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.UpdateAssetRequest; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchUpdateAssetsLocationnameListupdateassetrequest { + + public static void main(String[] args) throws Exception { + syncBatchUpdateAssetsLocationnameListupdateassetrequest(); + } + + public static void syncBatchUpdateAssetsLocationnameListupdateassetrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List requests = new ArrayList<>(); + BatchUpdateAssetsResponse response = + migrationCenterClient.batchUpdateAssets(parent, requests); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_BatchUpdateAssets_LocationnameListupdateassetrequest_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssetsStringListupdateassetrequest.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssetsStringListupdateassetrequest.java new file mode 100644 index 000000000000..d69988ff9937 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/batchupdateassets/SyncBatchUpdateAssetsStringListupdateassetrequest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_BatchUpdateAssets_StringListupdateassetrequest_sync] +import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.UpdateAssetRequest; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchUpdateAssetsStringListupdateassetrequest { + + public static void main(String[] args) throws Exception { + syncBatchUpdateAssetsStringListupdateassetrequest(); + } + + public static void syncBatchUpdateAssetsStringListupdateassetrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + List requests = new ArrayList<>(); + BatchUpdateAssetsResponse response = + migrationCenterClient.batchUpdateAssets(parent, requests); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_BatchUpdateAssets_StringListupdateassetrequest_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetCredentialsProvider.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..e36b25b293af --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.MigrationCenterSettings; +import com.google.cloud.migrationcenter.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MigrationCenterSettings migrationCenterSettings = + MigrationCenterSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + MigrationCenterClient migrationCenterClient = + MigrationCenterClient.create(migrationCenterSettings); + } +} +// [END migrationcenter_v1_generated_MigrationCenter_Create_SetCredentialsProvider_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetCredentialsProvider1.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..3da879c5288d --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_Create_SetCredentialsProvider1_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.MigrationCenterSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MigrationCenterSettings migrationCenterSettings = + MigrationCenterSettings.newHttpJsonBuilder().build(); + MigrationCenterClient migrationCenterClient = + MigrationCenterClient.create(migrationCenterSettings); + } +} +// [END migrationcenter_v1_generated_MigrationCenter_Create_SetCredentialsProvider1_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetEndpoint.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..b83dd8b7ffe7 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_Create_SetEndpoint_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.MigrationCenterSettings; +import com.google.cloud.migrationcenter.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MigrationCenterSettings migrationCenterSettings = + MigrationCenterSettings.newBuilder().setEndpoint(myEndpoint).build(); + MigrationCenterClient migrationCenterClient = + MigrationCenterClient.create(migrationCenterSettings); + } +} +// [END migrationcenter_v1_generated_MigrationCenter_Create_SetEndpoint_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/AsyncCreateGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/AsyncCreateGroup.java new file mode 100644 index 000000000000..42801e1f102e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/AsyncCreateGroup.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.CreateGroupRequest; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.longrunning.Operation; + +public class AsyncCreateGroup { + + public static void main(String[] args) throws Exception { + asyncCreateGroup(); + } + + public static void asyncCreateGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateGroupRequest request = + CreateGroupRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setGroupId("groupId293428218") + .setGroup(Group.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = migrationCenterClient.createGroupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateGroup_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/AsyncCreateGroupLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/AsyncCreateGroupLRO.java new file mode 100644 index 000000000000..83643a3a5ef9 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/AsyncCreateGroupLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.CreateGroupRequest; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; + +public class AsyncCreateGroupLRO { + + public static void main(String[] args) throws Exception { + asyncCreateGroupLRO(); + } + + public static void asyncCreateGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateGroupRequest request = + CreateGroupRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setGroupId("groupId293428218") + .setGroup(Group.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.createGroupOperationCallable().futureCall(request); + // Do something. + Group response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateGroup_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroup.java new file mode 100644 index 000000000000..efce3403664c --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroup.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateGroup_sync] +import com.google.cloud.migrationcenter.v1.CreateGroupRequest; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncCreateGroup { + + public static void main(String[] args) throws Exception { + syncCreateGroup(); + } + + public static void syncCreateGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateGroupRequest request = + CreateGroupRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setGroupId("groupId293428218") + .setGroup(Group.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Group response = migrationCenterClient.createGroupAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateGroup_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroupLocationnameGroupString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroupLocationnameGroupString.java new file mode 100644 index 000000000000..71562be54810 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroupLocationnameGroupString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateGroup_LocationnameGroupString_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncCreateGroupLocationnameGroupString { + + public static void main(String[] args) throws Exception { + syncCreateGroupLocationnameGroupString(); + } + + public static void syncCreateGroupLocationnameGroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Group group = Group.newBuilder().build(); + String groupId = "groupId293428218"; + Group response = migrationCenterClient.createGroupAsync(parent, group, groupId).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateGroup_LocationnameGroupString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroupStringGroupString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroupStringGroupString.java new file mode 100644 index 000000000000..7ed6b72e0877 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/creategroup/SyncCreateGroupStringGroupString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateGroup_StringGroupString_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncCreateGroupStringGroupString { + + public static void main(String[] args) throws Exception { + syncCreateGroupStringGroupString(); + } + + public static void syncCreateGroupStringGroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Group group = Group.newBuilder().build(); + String groupId = "groupId293428218"; + Group response = migrationCenterClient.createGroupAsync(parent, group, groupId).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateGroup_StringGroupString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/AsyncCreateImportDataFile.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/AsyncCreateImportDataFile.java new file mode 100644 index 000000000000..0eb26903793e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/AsyncCreateImportDataFile.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.longrunning.Operation; + +public class AsyncCreateImportDataFile { + + public static void main(String[] args) throws Exception { + asyncCreateImportDataFile(); + } + + public static void asyncCreateImportDataFile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateImportDataFileRequest request = + CreateImportDataFileRequest.newBuilder() + .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setImportDataFileId("importDataFileId-1812510330") + .setImportDataFile(ImportDataFile.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.createImportDataFileCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/AsyncCreateImportDataFileLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/AsyncCreateImportDataFileLRO.java new file mode 100644 index 000000000000..14da987b7247 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/AsyncCreateImportDataFileLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; + +public class AsyncCreateImportDataFileLRO { + + public static void main(String[] args) throws Exception { + asyncCreateImportDataFileLRO(); + } + + public static void asyncCreateImportDataFileLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateImportDataFileRequest request = + CreateImportDataFileRequest.newBuilder() + .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setImportDataFileId("importDataFileId-1812510330") + .setImportDataFile(ImportDataFile.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.createImportDataFileOperationCallable().futureCall(request); + // Do something. + ImportDataFile response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFile.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFile.java new file mode 100644 index 000000000000..5d6fc4e9dd11 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFile.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_sync] +import com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncCreateImportDataFile { + + public static void main(String[] args) throws Exception { + syncCreateImportDataFile(); + } + + public static void syncCreateImportDataFile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateImportDataFileRequest request = + CreateImportDataFileRequest.newBuilder() + .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setImportDataFileId("importDataFileId-1812510330") + .setImportDataFile(ImportDataFile.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ImportDataFile response = migrationCenterClient.createImportDataFileAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFileImportjobnameImportdatafileString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFileImportjobnameImportdatafileString.java new file mode 100644 index 000000000000..b24ea2174786 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFileImportjobnameImportdatafileString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_ImportjobnameImportdatafileString_sync] +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncCreateImportDataFileImportjobnameImportdatafileString { + + public static void main(String[] args) throws Exception { + syncCreateImportDataFileImportjobnameImportdatafileString(); + } + + public static void syncCreateImportDataFileImportjobnameImportdatafileString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); + String importDataFileId = "importDataFileId-1812510330"; + ImportDataFile response = + migrationCenterClient + .createImportDataFileAsync(parent, importDataFile, importDataFileId) + .get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_ImportjobnameImportdatafileString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFileStringImportdatafileString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFileStringImportdatafileString.java new file mode 100644 index 000000000000..394fcc3080b9 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportdatafile/SyncCreateImportDataFileStringImportdatafileString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_StringImportdatafileString_sync] +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncCreateImportDataFileStringImportdatafileString { + + public static void main(String[] args) throws Exception { + syncCreateImportDataFileStringImportdatafileString(); + } + + public static void syncCreateImportDataFileStringImportdatafileString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); + ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); + String importDataFileId = "importDataFileId-1812510330"; + ImportDataFile response = + migrationCenterClient + .createImportDataFileAsync(parent, importDataFile, importDataFileId) + .get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_StringImportdatafileString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/AsyncCreateImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/AsyncCreateImportJob.java new file mode 100644 index 000000000000..9d978852bc75 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/AsyncCreateImportJob.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateImportJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.CreateImportJobRequest; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.longrunning.Operation; + +public class AsyncCreateImportJob { + + public static void main(String[] args) throws Exception { + asyncCreateImportJob(); + } + + public static void asyncCreateImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateImportJobRequest request = + CreateImportJobRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setImportJobId("importJobId1449444627") + .setImportJob(ImportJob.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.createImportJobCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportJob_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/AsyncCreateImportJobLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/AsyncCreateImportJobLRO.java new file mode 100644 index 000000000000..4a5e74d8638e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/AsyncCreateImportJobLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateImportJob_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.CreateImportJobRequest; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; + +public class AsyncCreateImportJobLRO { + + public static void main(String[] args) throws Exception { + asyncCreateImportJobLRO(); + } + + public static void asyncCreateImportJobLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateImportJobRequest request = + CreateImportJobRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setImportJobId("importJobId1449444627") + .setImportJob(ImportJob.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.createImportJobOperationCallable().futureCall(request); + // Do something. + ImportJob response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportJob_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJob.java new file mode 100644 index 000000000000..7f7eb745ec6b --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJob.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateImportJob_sync] +import com.google.cloud.migrationcenter.v1.CreateImportJobRequest; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncCreateImportJob { + + public static void main(String[] args) throws Exception { + syncCreateImportJob(); + } + + public static void syncCreateImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateImportJobRequest request = + CreateImportJobRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setImportJobId("importJobId1449444627") + .setImportJob(ImportJob.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ImportJob response = migrationCenterClient.createImportJobAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportJob_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJobLocationnameImportjobString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJobLocationnameImportjobString.java new file mode 100644 index 000000000000..5ffe0912c4db --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJobLocationnameImportjobString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateImportJob_LocationnameImportjobString_sync] +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncCreateImportJobLocationnameImportjobString { + + public static void main(String[] args) throws Exception { + syncCreateImportJobLocationnameImportjobString(); + } + + public static void syncCreateImportJobLocationnameImportjobString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportJob importJob = ImportJob.newBuilder().build(); + String importJobId = "importJobId1449444627"; + ImportJob response = + migrationCenterClient.createImportJobAsync(parent, importJob, importJobId).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportJob_LocationnameImportjobString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJobStringImportjobString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJobStringImportjobString.java new file mode 100644 index 000000000000..bbbdfe155a02 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createimportjob/SyncCreateImportJobStringImportjobString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateImportJob_StringImportjobString_sync] +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncCreateImportJobStringImportjobString { + + public static void main(String[] args) throws Exception { + syncCreateImportJobStringImportjobString(); + } + + public static void syncCreateImportJobStringImportjobString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + ImportJob importJob = ImportJob.newBuilder().build(); + String importJobId = "importJobId1449444627"; + ImportJob response = + migrationCenterClient.createImportJobAsync(parent, importJob, importJobId).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportJob_StringImportjobString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/AsyncCreatePreferenceSet.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/AsyncCreatePreferenceSet.java new file mode 100644 index 000000000000..7a77096a16d6 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/AsyncCreatePreferenceSet.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.longrunning.Operation; + +public class AsyncCreatePreferenceSet { + + public static void main(String[] args) throws Exception { + asyncCreatePreferenceSet(); + } + + public static void asyncCreatePreferenceSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreatePreferenceSetRequest request = + CreatePreferenceSetRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPreferenceSetId("preferenceSetId-569419518") + .setPreferenceSet(PreferenceSet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.createPreferenceSetCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/AsyncCreatePreferenceSetLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/AsyncCreatePreferenceSetLRO.java new file mode 100644 index 000000000000..3d1c386d93af --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/AsyncCreatePreferenceSetLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.PreferenceSet; + +public class AsyncCreatePreferenceSetLRO { + + public static void main(String[] args) throws Exception { + asyncCreatePreferenceSetLRO(); + } + + public static void asyncCreatePreferenceSetLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreatePreferenceSetRequest request = + CreatePreferenceSetRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPreferenceSetId("preferenceSetId-569419518") + .setPreferenceSet(PreferenceSet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.createPreferenceSetOperationCallable().futureCall(request); + // Do something. + PreferenceSet response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSet.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSet.java new file mode 100644 index 000000000000..5faab4ee5507 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSet.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_sync] +import com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; + +public class SyncCreatePreferenceSet { + + public static void main(String[] args) throws Exception { + syncCreatePreferenceSet(); + } + + public static void syncCreatePreferenceSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreatePreferenceSetRequest request = + CreatePreferenceSetRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPreferenceSetId("preferenceSetId-569419518") + .setPreferenceSet(PreferenceSet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + PreferenceSet response = migrationCenterClient.createPreferenceSetAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSetLocationnamePreferencesetString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSetLocationnamePreferencesetString.java new file mode 100644 index 000000000000..89bc122f5d80 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSetLocationnamePreferencesetString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_LocationnamePreferencesetString_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; + +public class SyncCreatePreferenceSetLocationnamePreferencesetString { + + public static void main(String[] args) throws Exception { + syncCreatePreferenceSetLocationnamePreferencesetString(); + } + + public static void syncCreatePreferenceSetLocationnamePreferencesetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + String preferenceSetId = "preferenceSetId-569419518"; + PreferenceSet response = + migrationCenterClient + .createPreferenceSetAsync(parent, preferenceSet, preferenceSetId) + .get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_LocationnamePreferencesetString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSetStringPreferencesetString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSetStringPreferencesetString.java new file mode 100644 index 000000000000..b51838496011 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createpreferenceset/SyncCreatePreferenceSetStringPreferencesetString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_StringPreferencesetString_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; + +public class SyncCreatePreferenceSetStringPreferencesetString { + + public static void main(String[] args) throws Exception { + syncCreatePreferenceSetStringPreferencesetString(); + } + + public static void syncCreatePreferenceSetStringPreferencesetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + String preferenceSetId = "preferenceSetId-569419518"; + PreferenceSet response = + migrationCenterClient + .createPreferenceSetAsync(parent, preferenceSet, preferenceSetId) + .get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_StringPreferencesetString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/AsyncCreateReport.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/AsyncCreateReport.java new file mode 100644 index 000000000000..4748978677b0 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/AsyncCreateReport.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateReport_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.CreateReportRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportConfigName; +import com.google.longrunning.Operation; + +public class AsyncCreateReport { + + public static void main(String[] args) throws Exception { + asyncCreateReport(); + } + + public static void asyncCreateReport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateReportRequest request = + CreateReportRequest.newBuilder() + .setParent( + ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setReportId("reportId-427040401") + .setReport(Report.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.createReportCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReport_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/AsyncCreateReportLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/AsyncCreateReportLRO.java new file mode 100644 index 000000000000..c75c6a285989 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/AsyncCreateReportLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateReport_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.CreateReportRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportConfigName; + +public class AsyncCreateReportLRO { + + public static void main(String[] args) throws Exception { + asyncCreateReportLRO(); + } + + public static void asyncCreateReportLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateReportRequest request = + CreateReportRequest.newBuilder() + .setParent( + ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setReportId("reportId-427040401") + .setReport(Report.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.createReportOperationCallable().futureCall(request); + // Do something. + Report response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReport_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReport.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReport.java new file mode 100644 index 000000000000..8d892d8fc278 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReport.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateReport_sync] +import com.google.cloud.migrationcenter.v1.CreateReportRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportConfigName; + +public class SyncCreateReport { + + public static void main(String[] args) throws Exception { + syncCreateReport(); + } + + public static void syncCreateReport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateReportRequest request = + CreateReportRequest.newBuilder() + .setParent( + ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setReportId("reportId-427040401") + .setReport(Report.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Report response = migrationCenterClient.createReportAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReport_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReportReportconfignameReportString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReportReportconfignameReportString.java new file mode 100644 index 000000000000..e30c9a2909b4 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReportReportconfignameReportString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateReport_ReportconfignameReportString_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportConfigName; + +public class SyncCreateReportReportconfignameReportString { + + public static void main(String[] args) throws Exception { + syncCreateReportReportconfignameReportString(); + } + + public static void syncCreateReportReportconfignameReportString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + Report report = Report.newBuilder().build(); + String reportId = "reportId-427040401"; + Report response = migrationCenterClient.createReportAsync(parent, report, reportId).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReport_ReportconfignameReportString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReportStringReportString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReportStringReportString.java new file mode 100644 index 000000000000..9fc982d0cf7a --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreport/SyncCreateReportStringReportString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateReport_StringReportString_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportConfigName; + +public class SyncCreateReportStringReportString { + + public static void main(String[] args) throws Exception { + syncCreateReportStringReportString(); + } + + public static void syncCreateReportStringReportString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString(); + Report report = Report.newBuilder().build(); + String reportId = "reportId-427040401"; + Report response = migrationCenterClient.createReportAsync(parent, report, reportId).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReport_StringReportString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/AsyncCreateReportConfig.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/AsyncCreateReportConfig.java new file mode 100644 index 000000000000..d56ec8161511 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/AsyncCreateReportConfig.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.CreateReportConfigRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; +import com.google.longrunning.Operation; + +public class AsyncCreateReportConfig { + + public static void main(String[] args) throws Exception { + asyncCreateReportConfig(); + } + + public static void asyncCreateReportConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateReportConfigRequest request = + CreateReportConfigRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setReportConfigId("reportConfigId1951664465") + .setReportConfig(ReportConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.createReportConfigCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/AsyncCreateReportConfigLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/AsyncCreateReportConfigLRO.java new file mode 100644 index 000000000000..60bcb18b6df2 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/AsyncCreateReportConfigLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.CreateReportConfigRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.ReportConfig; + +public class AsyncCreateReportConfigLRO { + + public static void main(String[] args) throws Exception { + asyncCreateReportConfigLRO(); + } + + public static void asyncCreateReportConfigLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateReportConfigRequest request = + CreateReportConfigRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setReportConfigId("reportConfigId1951664465") + .setReportConfig(ReportConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.createReportConfigOperationCallable().futureCall(request); + // Do something. + ReportConfig response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfig.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfig.java new file mode 100644 index 000000000000..e4544889a418 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfig.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_sync] +import com.google.cloud.migrationcenter.v1.CreateReportConfigRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; + +public class SyncCreateReportConfig { + + public static void main(String[] args) throws Exception { + syncCreateReportConfig(); + } + + public static void syncCreateReportConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateReportConfigRequest request = + CreateReportConfigRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setReportConfigId("reportConfigId1951664465") + .setReportConfig(ReportConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ReportConfig response = migrationCenterClient.createReportConfigAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfigLocationnameReportconfigString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfigLocationnameReportconfigString.java new file mode 100644 index 000000000000..d6387a543d58 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfigLocationnameReportconfigString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_LocationnameReportconfigString_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; + +public class SyncCreateReportConfigLocationnameReportconfigString { + + public static void main(String[] args) throws Exception { + syncCreateReportConfigLocationnameReportconfigString(); + } + + public static void syncCreateReportConfigLocationnameReportconfigString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ReportConfig reportConfig = ReportConfig.newBuilder().build(); + String reportConfigId = "reportConfigId1951664465"; + ReportConfig response = + migrationCenterClient.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_LocationnameReportconfigString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfigStringReportconfigString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfigStringReportconfigString.java new file mode 100644 index 000000000000..d1b4a293153b --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createreportconfig/SyncCreateReportConfigStringReportconfigString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_StringReportconfigString_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; + +public class SyncCreateReportConfigStringReportconfigString { + + public static void main(String[] args) throws Exception { + syncCreateReportConfigStringReportconfigString(); + } + + public static void syncCreateReportConfigStringReportconfigString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + ReportConfig reportConfig = ReportConfig.newBuilder().build(); + String reportConfigId = "reportConfigId1951664465"; + ReportConfig response = + migrationCenterClient.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_StringReportconfigString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/AsyncCreateSource.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/AsyncCreateSource.java new file mode 100644 index 000000000000..87c1b77c9c61 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/AsyncCreateSource.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateSource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.CreateSourceRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.longrunning.Operation; + +public class AsyncCreateSource { + + public static void main(String[] args) throws Exception { + asyncCreateSource(); + } + + public static void asyncCreateSource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateSourceRequest request = + CreateSourceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSourceId("sourceId1746327190") + .setSource(Source.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.createSourceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateSource_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/AsyncCreateSourceLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/AsyncCreateSourceLRO.java new file mode 100644 index 000000000000..df80bb2bc327 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/AsyncCreateSourceLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateSource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.CreateSourceRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.Source; + +public class AsyncCreateSourceLRO { + + public static void main(String[] args) throws Exception { + asyncCreateSourceLRO(); + } + + public static void asyncCreateSourceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateSourceRequest request = + CreateSourceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSourceId("sourceId1746327190") + .setSource(Source.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.createSourceOperationCallable().futureCall(request); + // Do something. + Source response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateSource_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSource.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSource.java new file mode 100644 index 000000000000..f809bb9fceb3 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSource.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateSource_sync] +import com.google.cloud.migrationcenter.v1.CreateSourceRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; + +public class SyncCreateSource { + + public static void main(String[] args) throws Exception { + syncCreateSource(); + } + + public static void syncCreateSource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + CreateSourceRequest request = + CreateSourceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSourceId("sourceId1746327190") + .setSource(Source.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Source response = migrationCenterClient.createSourceAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateSource_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSourceLocationnameSourceString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSourceLocationnameSourceString.java new file mode 100644 index 000000000000..d3c52e165257 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSourceLocationnameSourceString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateSource_LocationnameSourceString_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; + +public class SyncCreateSourceLocationnameSourceString { + + public static void main(String[] args) throws Exception { + syncCreateSourceLocationnameSourceString(); + } + + public static void syncCreateSourceLocationnameSourceString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Source source = Source.newBuilder().build(); + String sourceId = "sourceId1746327190"; + Source response = migrationCenterClient.createSourceAsync(parent, source, sourceId).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateSource_LocationnameSourceString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSourceStringSourceString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSourceStringSourceString.java new file mode 100644 index 000000000000..138850cc079b --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/createsource/SyncCreateSourceStringSourceString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_CreateSource_StringSourceString_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; + +public class SyncCreateSourceStringSourceString { + + public static void main(String[] args) throws Exception { + syncCreateSourceStringSourceString(); + } + + public static void syncCreateSourceStringSourceString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Source source = Source.newBuilder().build(); + String sourceId = "sourceId1746327190"; + Source response = migrationCenterClient.createSourceAsync(parent, source, sourceId).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateSource_StringSourceString_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/AsyncDeleteAsset.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/AsyncDeleteAsset.java new file mode 100644 index 000000000000..8f6f230dd9f6 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/AsyncDeleteAsset.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteAsset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.AssetName; +import com.google.cloud.migrationcenter.v1.DeleteAssetRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteAsset { + + public static void main(String[] args) throws Exception { + asyncDeleteAsset(); + } + + public static void asyncDeleteAsset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteAssetRequest request = + DeleteAssetRequest.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = migrationCenterClient.deleteAssetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteAsset_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAsset.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAsset.java new file mode 100644 index 000000000000..cf73de457254 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAsset.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteAsset_sync] +import com.google.cloud.migrationcenter.v1.AssetName; +import com.google.cloud.migrationcenter.v1.DeleteAssetRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAsset { + + public static void main(String[] args) throws Exception { + syncDeleteAsset(); + } + + public static void syncDeleteAsset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteAssetRequest request = + DeleteAssetRequest.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setRequestId("requestId693933066") + .build(); + migrationCenterClient.deleteAsset(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteAsset_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAssetAssetname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAssetAssetname.java new file mode 100644 index 000000000000..14eaa648c712 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAssetAssetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteAsset_Assetname_sync] +import com.google.cloud.migrationcenter.v1.AssetName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAssetAssetname { + + public static void main(String[] args) throws Exception { + syncDeleteAssetAssetname(); + } + + public static void syncDeleteAssetAssetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); + migrationCenterClient.deleteAsset(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteAsset_Assetname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAssetString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAssetString.java new file mode 100644 index 000000000000..31b038fc219e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteasset/SyncDeleteAssetString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteAsset_String_sync] +import com.google.cloud.migrationcenter.v1.AssetName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAssetString { + + public static void main(String[] args) throws Exception { + syncDeleteAssetString(); + } + + public static void syncDeleteAssetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString(); + migrationCenterClient.deleteAsset(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteAsset_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/AsyncDeleteGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/AsyncDeleteGroup.java new file mode 100644 index 000000000000..ee50bee02a39 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/AsyncDeleteGroup.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.DeleteGroupRequest; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteGroup { + + public static void main(String[] args) throws Exception { + asyncDeleteGroup(); + } + + public static void asyncDeleteGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteGroupRequest request = + DeleteGroupRequest.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = migrationCenterClient.deleteGroupCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteGroup_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/AsyncDeleteGroupLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/AsyncDeleteGroupLRO.java new file mode 100644 index 000000000000..e7f256605257 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/AsyncDeleteGroupLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.DeleteGroupRequest; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteGroupLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteGroupLRO(); + } + + public static void asyncDeleteGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteGroupRequest request = + DeleteGroupRequest.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.deleteGroupOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteGroup_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroup.java new file mode 100644 index 000000000000..e172068479b4 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroup.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteGroup_sync] +import com.google.cloud.migrationcenter.v1.DeleteGroupRequest; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteGroup { + + public static void main(String[] args) throws Exception { + syncDeleteGroup(); + } + + public static void syncDeleteGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteGroupRequest request = + DeleteGroupRequest.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setRequestId("requestId693933066") + .build(); + migrationCenterClient.deleteGroupAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteGroup_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroupGroupname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroupGroupname.java new file mode 100644 index 000000000000..5cfac57ebe82 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroupGroupname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteGroup_Groupname_sync] +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteGroupGroupname { + + public static void main(String[] args) throws Exception { + syncDeleteGroupGroupname(); + } + + public static void syncDeleteGroupGroupname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + migrationCenterClient.deleteGroupAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteGroup_Groupname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroupString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroupString.java new file mode 100644 index 000000000000..23a2d31b3083 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletegroup/SyncDeleteGroupString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteGroup_String_sync] +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteGroupString { + + public static void main(String[] args) throws Exception { + syncDeleteGroupString(); + } + + public static void syncDeleteGroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString(); + migrationCenterClient.deleteGroupAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteGroup_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/AsyncDeleteImportDataFile.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/AsyncDeleteImportDataFile.java new file mode 100644 index 000000000000..e55bed9cfc8f --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/AsyncDeleteImportDataFile.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.ImportDataFileName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteImportDataFile { + + public static void main(String[] args) throws Exception { + asyncDeleteImportDataFile(); + } + + public static void asyncDeleteImportDataFile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteImportDataFileRequest request = + DeleteImportDataFileRequest.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.deleteImportDataFileCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/AsyncDeleteImportDataFileLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/AsyncDeleteImportDataFileLRO.java new file mode 100644 index 000000000000..2ed1510cb6df --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/AsyncDeleteImportDataFileLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.ImportDataFileName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteImportDataFileLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteImportDataFileLRO(); + } + + public static void asyncDeleteImportDataFileLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteImportDataFileRequest request = + DeleteImportDataFileRequest.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.deleteImportDataFileOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFile.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFile.java new file mode 100644 index 000000000000..5dd1850059be --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFile.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_sync] +import com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.ImportDataFileName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteImportDataFile { + + public static void main(String[] args) throws Exception { + syncDeleteImportDataFile(); + } + + public static void syncDeleteImportDataFile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteImportDataFileRequest request = + DeleteImportDataFileRequest.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .setRequestId("requestId693933066") + .build(); + migrationCenterClient.deleteImportDataFileAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFileImportdatafilename.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFileImportdatafilename.java new file mode 100644 index 000000000000..9f00f71a5f32 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFileImportdatafilename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_Importdatafilename_sync] +import com.google.cloud.migrationcenter.v1.ImportDataFileName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteImportDataFileImportdatafilename { + + public static void main(String[] args) throws Exception { + syncDeleteImportDataFileImportdatafilename(); + } + + public static void syncDeleteImportDataFileImportdatafilename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ImportDataFileName name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); + migrationCenterClient.deleteImportDataFileAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_Importdatafilename_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFileString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFileString.java new file mode 100644 index 000000000000..fd5c63262c3a --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportdatafile/SyncDeleteImportDataFileString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_String_sync] +import com.google.cloud.migrationcenter.v1.ImportDataFileName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteImportDataFileString { + + public static void main(String[] args) throws Exception { + syncDeleteImportDataFileString(); + } + + public static void syncDeleteImportDataFileString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString(); + migrationCenterClient.deleteImportDataFileAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/AsyncDeleteImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/AsyncDeleteImportJob.java new file mode 100644 index 000000000000..c55da862543b --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/AsyncDeleteImportJob.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.DeleteImportJobRequest; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteImportJob { + + public static void main(String[] args) throws Exception { + asyncDeleteImportJob(); + } + + public static void asyncDeleteImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteImportJobRequest request = + DeleteImportJobRequest.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + ApiFuture future = + migrationCenterClient.deleteImportJobCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/AsyncDeleteImportJobLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/AsyncDeleteImportJobLRO.java new file mode 100644 index 000000000000..acf660ba783d --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/AsyncDeleteImportJobLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.DeleteImportJobRequest; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteImportJobLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteImportJobLRO(); + } + + public static void asyncDeleteImportJobLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteImportJobRequest request = + DeleteImportJobRequest.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + OperationFuture future = + migrationCenterClient.deleteImportJobOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJob.java new file mode 100644 index 000000000000..3536dd87ceea --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJob.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_sync] +import com.google.cloud.migrationcenter.v1.DeleteImportJobRequest; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteImportJob { + + public static void main(String[] args) throws Exception { + syncDeleteImportJob(); + } + + public static void syncDeleteImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteImportJobRequest request = + DeleteImportJobRequest.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + migrationCenterClient.deleteImportJobAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJobImportjobname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJobImportjobname.java new file mode 100644 index 000000000000..fc85be39c7be --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJobImportjobname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_Importjobname_sync] +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteImportJobImportjobname { + + public static void main(String[] args) throws Exception { + syncDeleteImportJobImportjobname(); + } + + public static void syncDeleteImportJobImportjobname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + migrationCenterClient.deleteImportJobAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_Importjobname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJobString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJobString.java new file mode 100644 index 000000000000..b1c33e0f5d92 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deleteimportjob/SyncDeleteImportJobString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_String_sync] +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncDeleteImportJobString { + + public static void main(String[] args) throws Exception { + syncDeleteImportJobString(); + } + + public static void syncDeleteImportJobString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); + migrationCenterClient.deleteImportJobAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/AsyncDeletePreferenceSet.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/AsyncDeletePreferenceSet.java new file mode 100644 index 000000000000..6cc2c060f39e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/AsyncDeletePreferenceSet.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSetName; +import com.google.longrunning.Operation; + +public class AsyncDeletePreferenceSet { + + public static void main(String[] args) throws Exception { + asyncDeletePreferenceSet(); + } + + public static void asyncDeletePreferenceSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeletePreferenceSetRequest request = + DeletePreferenceSetRequest.newBuilder() + .setName( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.deletePreferenceSetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/AsyncDeletePreferenceSetLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/AsyncDeletePreferenceSetLRO.java new file mode 100644 index 000000000000..b50e65a57b99 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/AsyncDeletePreferenceSetLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.PreferenceSetName; +import com.google.protobuf.Empty; + +public class AsyncDeletePreferenceSetLRO { + + public static void main(String[] args) throws Exception { + asyncDeletePreferenceSetLRO(); + } + + public static void asyncDeletePreferenceSetLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeletePreferenceSetRequest request = + DeletePreferenceSetRequest.newBuilder() + .setName( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.deletePreferenceSetOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSet.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSet.java new file mode 100644 index 000000000000..1641b046976d --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSet.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_sync] +import com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSetName; +import com.google.protobuf.Empty; + +public class SyncDeletePreferenceSet { + + public static void main(String[] args) throws Exception { + syncDeletePreferenceSet(); + } + + public static void syncDeletePreferenceSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeletePreferenceSetRequest request = + DeletePreferenceSetRequest.newBuilder() + .setName( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .setRequestId("requestId693933066") + .build(); + migrationCenterClient.deletePreferenceSetAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSetPreferencesetname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSetPreferencesetname.java new file mode 100644 index 000000000000..88b2986f02ae --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSetPreferencesetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_Preferencesetname_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSetName; +import com.google.protobuf.Empty; + +public class SyncDeletePreferenceSetPreferencesetname { + + public static void main(String[] args) throws Exception { + syncDeletePreferenceSetPreferencesetname(); + } + + public static void syncDeletePreferenceSetPreferencesetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); + migrationCenterClient.deletePreferenceSetAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_Preferencesetname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSetString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSetString.java new file mode 100644 index 000000000000..ab14bc87b7cb --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletepreferenceset/SyncDeletePreferenceSetString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_String_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSetName; +import com.google.protobuf.Empty; + +public class SyncDeletePreferenceSetString { + + public static void main(String[] args) throws Exception { + syncDeletePreferenceSetString(); + } + + public static void syncDeletePreferenceSetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString(); + migrationCenterClient.deletePreferenceSetAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/AsyncDeleteReport.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/AsyncDeleteReport.java new file mode 100644 index 000000000000..439f7b49e9cb --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/AsyncDeleteReport.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteReport_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.DeleteReportRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportName; +import com.google.longrunning.Operation; + +public class AsyncDeleteReport { + + public static void main(String[] args) throws Exception { + asyncDeleteReport(); + } + + public static void asyncDeleteReport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteReportRequest request = + DeleteReportRequest.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]") + .toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.deleteReportCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReport_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/AsyncDeleteReportLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/AsyncDeleteReportLRO.java new file mode 100644 index 000000000000..995ffd0bafa7 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/AsyncDeleteReportLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteReport_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.DeleteReportRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.ReportName; +import com.google.protobuf.Empty; + +public class AsyncDeleteReportLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteReportLRO(); + } + + public static void asyncDeleteReportLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteReportRequest request = + DeleteReportRequest.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]") + .toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.deleteReportOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReport_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReport.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReport.java new file mode 100644 index 000000000000..3200d7ddab37 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReport.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteReport_sync] +import com.google.cloud.migrationcenter.v1.DeleteReportRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportName; +import com.google.protobuf.Empty; + +public class SyncDeleteReport { + + public static void main(String[] args) throws Exception { + syncDeleteReport(); + } + + public static void syncDeleteReport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteReportRequest request = + DeleteReportRequest.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]") + .toString()) + .setRequestId("requestId693933066") + .build(); + migrationCenterClient.deleteReportAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReport_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReportReportname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReportReportname.java new file mode 100644 index 000000000000..5e5aab1e8da5 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReportReportname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteReport_Reportname_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportName; +import com.google.protobuf.Empty; + +public class SyncDeleteReportReportname { + + public static void main(String[] args) throws Exception { + syncDeleteReportReportname(); + } + + public static void syncDeleteReportReportname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); + migrationCenterClient.deleteReportAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReport_Reportname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReportString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReportString.java new file mode 100644 index 000000000000..5d7ef150d2f7 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereport/SyncDeleteReportString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteReport_String_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportName; +import com.google.protobuf.Empty; + +public class SyncDeleteReportString { + + public static void main(String[] args) throws Exception { + syncDeleteReportString(); + } + + public static void syncDeleteReportString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString(); + migrationCenterClient.deleteReportAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReport_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/AsyncDeleteReportConfig.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/AsyncDeleteReportConfig.java new file mode 100644 index 000000000000..07f93a90df7a --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/AsyncDeleteReportConfig.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfigName; +import com.google.longrunning.Operation; + +public class AsyncDeleteReportConfig { + + public static void main(String[] args) throws Exception { + asyncDeleteReportConfig(); + } + + public static void asyncDeleteReportConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteReportConfigRequest request = + DeleteReportConfigRequest.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + ApiFuture future = + migrationCenterClient.deleteReportConfigCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/AsyncDeleteReportConfigLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/AsyncDeleteReportConfigLRO.java new file mode 100644 index 000000000000..80d13a8309f0 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/AsyncDeleteReportConfigLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.ReportConfigName; +import com.google.protobuf.Empty; + +public class AsyncDeleteReportConfigLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteReportConfigLRO(); + } + + public static void asyncDeleteReportConfigLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteReportConfigRequest request = + DeleteReportConfigRequest.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + OperationFuture future = + migrationCenterClient.deleteReportConfigOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfig.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfig.java new file mode 100644 index 000000000000..86c329a01d0f --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfig.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_sync] +import com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfigName; +import com.google.protobuf.Empty; + +public class SyncDeleteReportConfig { + + public static void main(String[] args) throws Exception { + syncDeleteReportConfig(); + } + + public static void syncDeleteReportConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteReportConfigRequest request = + DeleteReportConfigRequest.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + migrationCenterClient.deleteReportConfigAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfigReportconfigname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfigReportconfigname.java new file mode 100644 index 000000000000..6904dc1dbd6d --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfigReportconfigname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_Reportconfigname_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfigName; +import com.google.protobuf.Empty; + +public class SyncDeleteReportConfigReportconfigname { + + public static void main(String[] args) throws Exception { + syncDeleteReportConfigReportconfigname(); + } + + public static void syncDeleteReportConfigReportconfigname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + migrationCenterClient.deleteReportConfigAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_Reportconfigname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfigString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfigString.java new file mode 100644 index 000000000000..e145e80cf2e6 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletereportconfig/SyncDeleteReportConfigString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_String_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfigName; +import com.google.protobuf.Empty; + +public class SyncDeleteReportConfigString { + + public static void main(String[] args) throws Exception { + syncDeleteReportConfigString(); + } + + public static void syncDeleteReportConfigString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString(); + migrationCenterClient.deleteReportConfigAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/AsyncDeleteSource.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/AsyncDeleteSource.java new file mode 100644 index 000000000000..53d2b9006e16 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/AsyncDeleteSource.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteSource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.DeleteSourceRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.SourceName; +import com.google.longrunning.Operation; + +public class AsyncDeleteSource { + + public static void main(String[] args) throws Exception { + asyncDeleteSource(); + } + + public static void asyncDeleteSource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteSourceRequest request = + DeleteSourceRequest.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.deleteSourceCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteSource_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/AsyncDeleteSourceLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/AsyncDeleteSourceLRO.java new file mode 100644 index 000000000000..c44f7399e86f --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/AsyncDeleteSourceLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteSource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.DeleteSourceRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.SourceName; +import com.google.protobuf.Empty; + +public class AsyncDeleteSourceLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteSourceLRO(); + } + + public static void asyncDeleteSourceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteSourceRequest request = + DeleteSourceRequest.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.deleteSourceOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteSource_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSource.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSource.java new file mode 100644 index 000000000000..0c8ff8138a4e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSource.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteSource_sync] +import com.google.cloud.migrationcenter.v1.DeleteSourceRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.SourceName; +import com.google.protobuf.Empty; + +public class SyncDeleteSource { + + public static void main(String[] args) throws Exception { + syncDeleteSource(); + } + + public static void syncDeleteSource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + DeleteSourceRequest request = + DeleteSourceRequest.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setRequestId("requestId693933066") + .build(); + migrationCenterClient.deleteSourceAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteSource_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSourceSourcename.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSourceSourcename.java new file mode 100644 index 000000000000..a4ebad9d3760 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSourceSourcename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteSource_Sourcename_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.SourceName; +import com.google.protobuf.Empty; + +public class SyncDeleteSourceSourcename { + + public static void main(String[] args) throws Exception { + syncDeleteSourceSourcename(); + } + + public static void syncDeleteSourceSourcename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + migrationCenterClient.deleteSourceAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteSource_Sourcename_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSourceString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSourceString.java new file mode 100644 index 000000000000..624db8f7ddda --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/deletesource/SyncDeleteSourceString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_DeleteSource_String_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.SourceName; +import com.google.protobuf.Empty; + +public class SyncDeleteSourceString { + + public static void main(String[] args) throws Exception { + syncDeleteSourceString(); + } + + public static void syncDeleteSourceString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString(); + migrationCenterClient.deleteSourceAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteSource_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/AsyncGetAsset.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/AsyncGetAsset.java new file mode 100644 index 000000000000..800b3def653c --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/AsyncGetAsset.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetAsset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.AssetName; +import com.google.cloud.migrationcenter.v1.AssetView; +import com.google.cloud.migrationcenter.v1.GetAssetRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class AsyncGetAsset { + + public static void main(String[] args) throws Exception { + asyncGetAsset(); + } + + public static void asyncGetAsset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetAssetRequest request = + GetAssetRequest.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setView(AssetView.forNumber(0)) + .build(); + ApiFuture future = migrationCenterClient.getAssetCallable().futureCall(request); + // Do something. + Asset response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetAsset_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAsset.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAsset.java new file mode 100644 index 000000000000..e1f9babc8702 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAsset.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetAsset_sync] +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.AssetName; +import com.google.cloud.migrationcenter.v1.AssetView; +import com.google.cloud.migrationcenter.v1.GetAssetRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetAsset { + + public static void main(String[] args) throws Exception { + syncGetAsset(); + } + + public static void syncGetAsset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetAssetRequest request = + GetAssetRequest.newBuilder() + .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) + .setView(AssetView.forNumber(0)) + .build(); + Asset response = migrationCenterClient.getAsset(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetAsset_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAssetAssetname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAssetAssetname.java new file mode 100644 index 000000000000..ab0f69e0b2ba --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAssetAssetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetAsset_Assetname_sync] +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.AssetName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetAssetAssetname { + + public static void main(String[] args) throws Exception { + syncGetAssetAssetname(); + } + + public static void syncGetAssetAssetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); + Asset response = migrationCenterClient.getAsset(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetAsset_Assetname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAssetString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAssetString.java new file mode 100644 index 000000000000..cacc529e94f0 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getasset/SyncGetAssetString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetAsset_String_sync] +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.AssetName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetAssetString { + + public static void main(String[] args) throws Exception { + syncGetAssetString(); + } + + public static void syncGetAssetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString(); + Asset response = migrationCenterClient.getAsset(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetAsset_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/AsyncGetErrorFrame.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/AsyncGetErrorFrame.java new file mode 100644 index 000000000000..e3d91670619c --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/AsyncGetErrorFrame.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetErrorFrame_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.ErrorFrameName; +import com.google.cloud.migrationcenter.v1.ErrorFrameView; +import com.google.cloud.migrationcenter.v1.GetErrorFrameRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class AsyncGetErrorFrame { + + public static void main(String[] args) throws Exception { + asyncGetErrorFrame(); + } + + public static void asyncGetErrorFrame() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetErrorFrameRequest request = + GetErrorFrameRequest.newBuilder() + .setName( + ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]") + .toString()) + .setView(ErrorFrameView.forNumber(0)) + .build(); + ApiFuture future = + migrationCenterClient.getErrorFrameCallable().futureCall(request); + // Do something. + ErrorFrame response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetErrorFrame_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrame.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrame.java new file mode 100644 index 000000000000..defdf94fe58e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrame.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetErrorFrame_sync] +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.ErrorFrameName; +import com.google.cloud.migrationcenter.v1.ErrorFrameView; +import com.google.cloud.migrationcenter.v1.GetErrorFrameRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetErrorFrame { + + public static void main(String[] args) throws Exception { + syncGetErrorFrame(); + } + + public static void syncGetErrorFrame() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetErrorFrameRequest request = + GetErrorFrameRequest.newBuilder() + .setName( + ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]") + .toString()) + .setView(ErrorFrameView.forNumber(0)) + .build(); + ErrorFrame response = migrationCenterClient.getErrorFrame(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetErrorFrame_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrameErrorframename.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrameErrorframename.java new file mode 100644 index 000000000000..12740b2e65d0 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrameErrorframename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetErrorFrame_Errorframename_sync] +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.ErrorFrameName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetErrorFrameErrorframename { + + public static void main(String[] args) throws Exception { + syncGetErrorFrameErrorframename(); + } + + public static void syncGetErrorFrameErrorframename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ErrorFrameName name = + ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]"); + ErrorFrame response = migrationCenterClient.getErrorFrame(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetErrorFrame_Errorframename_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrameString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrameString.java new file mode 100644 index 000000000000..37ce6467635a --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/geterrorframe/SyncGetErrorFrameString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetErrorFrame_String_sync] +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.ErrorFrameName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetErrorFrameString { + + public static void main(String[] args) throws Exception { + syncGetErrorFrameString(); + } + + public static void syncGetErrorFrameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = + ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]").toString(); + ErrorFrame response = migrationCenterClient.getErrorFrame(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetErrorFrame_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/AsyncGetGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/AsyncGetGroup.java new file mode 100644 index 000000000000..28a5a72b7450 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/AsyncGetGroup.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.GetGroupRequest; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class AsyncGetGroup { + + public static void main(String[] args) throws Exception { + asyncGetGroup(); + } + + public static void asyncGetGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetGroupRequest request = + GetGroupRequest.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .build(); + ApiFuture future = migrationCenterClient.getGroupCallable().futureCall(request); + // Do something. + Group response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetGroup_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroup.java new file mode 100644 index 000000000000..d8f7b6474eff --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroup.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetGroup_sync] +import com.google.cloud.migrationcenter.v1.GetGroupRequest; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetGroup { + + public static void main(String[] args) throws Exception { + syncGetGroup(); + } + + public static void syncGetGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetGroupRequest request = + GetGroupRequest.newBuilder() + .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .build(); + Group response = migrationCenterClient.getGroup(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetGroup_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroupGroupname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroupGroupname.java new file mode 100644 index 000000000000..2ca7b8973cf7 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroupGroupname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetGroup_Groupname_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetGroupGroupname { + + public static void main(String[] args) throws Exception { + syncGetGroupGroupname(); + } + + public static void syncGetGroupGroupname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + Group response = migrationCenterClient.getGroup(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetGroup_Groupname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroupString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroupString.java new file mode 100644 index 000000000000..15415001d85c --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getgroup/SyncGetGroupString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetGroup_String_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetGroupString { + + public static void main(String[] args) throws Exception { + syncGetGroupString(); + } + + public static void syncGetGroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString(); + Group response = migrationCenterClient.getGroup(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetGroup_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/AsyncGetImportDataFile.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/AsyncGetImportDataFile.java new file mode 100644 index 000000000000..f0d3a0f372e4 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/AsyncGetImportDataFile.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetImportDataFile_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.GetImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportDataFileName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class AsyncGetImportDataFile { + + public static void main(String[] args) throws Exception { + asyncGetImportDataFile(); + } + + public static void asyncGetImportDataFile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetImportDataFileRequest request = + GetImportDataFileRequest.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .build(); + ApiFuture future = + migrationCenterClient.getImportDataFileCallable().futureCall(request); + // Do something. + ImportDataFile response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetImportDataFile_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFile.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFile.java new file mode 100644 index 000000000000..9a2b3c3ae681 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFile.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetImportDataFile_sync] +import com.google.cloud.migrationcenter.v1.GetImportDataFileRequest; +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportDataFileName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetImportDataFile { + + public static void main(String[] args) throws Exception { + syncGetImportDataFile(); + } + + public static void syncGetImportDataFile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetImportDataFileRequest request = + GetImportDataFileRequest.newBuilder() + .setName( + ImportDataFileName.of( + "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString()) + .build(); + ImportDataFile response = migrationCenterClient.getImportDataFile(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetImportDataFile_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFileImportdatafilename.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFileImportdatafilename.java new file mode 100644 index 000000000000..a8409939c80e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFileImportdatafilename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetImportDataFile_Importdatafilename_sync] +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportDataFileName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetImportDataFileImportdatafilename { + + public static void main(String[] args) throws Exception { + syncGetImportDataFileImportdatafilename(); + } + + public static void syncGetImportDataFileImportdatafilename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ImportDataFileName name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); + ImportDataFile response = migrationCenterClient.getImportDataFile(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetImportDataFile_Importdatafilename_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFileString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFileString.java new file mode 100644 index 000000000000..224dff83e5ed --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportdatafile/SyncGetImportDataFileString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetImportDataFile_String_sync] +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportDataFileName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetImportDataFileString { + + public static void main(String[] args) throws Exception { + syncGetImportDataFileString(); + } + + public static void syncGetImportDataFileString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = + ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") + .toString(); + ImportDataFile response = migrationCenterClient.getImportDataFile(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetImportDataFile_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/AsyncGetImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/AsyncGetImportJob.java new file mode 100644 index 000000000000..e18082ac6d36 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/AsyncGetImportJob.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetImportJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.GetImportJobRequest; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.ImportJobView; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class AsyncGetImportJob { + + public static void main(String[] args) throws Exception { + asyncGetImportJob(); + } + + public static void asyncGetImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetImportJobRequest request = + GetImportJobRequest.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setView(ImportJobView.forNumber(0)) + .build(); + ApiFuture future = + migrationCenterClient.getImportJobCallable().futureCall(request); + // Do something. + ImportJob response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetImportJob_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJob.java new file mode 100644 index 000000000000..a14197d7ad5e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJob.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetImportJob_sync] +import com.google.cloud.migrationcenter.v1.GetImportJobRequest; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.ImportJobView; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetImportJob { + + public static void main(String[] args) throws Exception { + syncGetImportJob(); + } + + public static void syncGetImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetImportJobRequest request = + GetImportJobRequest.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setView(ImportJobView.forNumber(0)) + .build(); + ImportJob response = migrationCenterClient.getImportJob(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetImportJob_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJobImportjobname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJobImportjobname.java new file mode 100644 index 000000000000..98261713f255 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJobImportjobname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetImportJob_Importjobname_sync] +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetImportJobImportjobname { + + public static void main(String[] args) throws Exception { + syncGetImportJobImportjobname(); + } + + public static void syncGetImportJobImportjobname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + ImportJob response = migrationCenterClient.getImportJob(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetImportJob_Importjobname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJobString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJobString.java new file mode 100644 index 000000000000..68de7f081ec3 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getimportjob/SyncGetImportJobString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetImportJob_String_sync] +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetImportJobString { + + public static void main(String[] args) throws Exception { + syncGetImportJobString(); + } + + public static void syncGetImportJobString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); + ImportJob response = migrationCenterClient.getImportJob(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetImportJob_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getlocation/AsyncGetLocation.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..a325734bfb8c --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = migrationCenterClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetLocation_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getlocation/SyncGetLocation.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..f5f4aee1ec5c --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = migrationCenterClient.getLocation(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetLocation_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/AsyncGetPreferenceSet.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/AsyncGetPreferenceSet.java new file mode 100644 index 000000000000..a59450eb1933 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/AsyncGetPreferenceSet.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetPreferenceSet_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.cloud.migrationcenter.v1.PreferenceSetName; + +public class AsyncGetPreferenceSet { + + public static void main(String[] args) throws Exception { + asyncGetPreferenceSet(); + } + + public static void asyncGetPreferenceSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetPreferenceSetRequest request = + GetPreferenceSetRequest.newBuilder() + .setName( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .build(); + ApiFuture future = + migrationCenterClient.getPreferenceSetCallable().futureCall(request); + // Do something. + PreferenceSet response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetPreferenceSet_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSet.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSet.java new file mode 100644 index 000000000000..6ddb9fb76ed4 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSet.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetPreferenceSet_sync] +import com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.cloud.migrationcenter.v1.PreferenceSetName; + +public class SyncGetPreferenceSet { + + public static void main(String[] args) throws Exception { + syncGetPreferenceSet(); + } + + public static void syncGetPreferenceSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetPreferenceSetRequest request = + GetPreferenceSetRequest.newBuilder() + .setName( + PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) + .build(); + PreferenceSet response = migrationCenterClient.getPreferenceSet(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetPreferenceSet_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSetPreferencesetname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSetPreferencesetname.java new file mode 100644 index 000000000000..106ec0f1eaab --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSetPreferencesetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetPreferenceSet_Preferencesetname_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.cloud.migrationcenter.v1.PreferenceSetName; + +public class SyncGetPreferenceSetPreferencesetname { + + public static void main(String[] args) throws Exception { + syncGetPreferenceSetPreferencesetname(); + } + + public static void syncGetPreferenceSetPreferencesetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); + PreferenceSet response = migrationCenterClient.getPreferenceSet(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetPreferenceSet_Preferencesetname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSetString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSetString.java new file mode 100644 index 000000000000..2f1f2d8c410f --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getpreferenceset/SyncGetPreferenceSetString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetPreferenceSet_String_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.cloud.migrationcenter.v1.PreferenceSetName; + +public class SyncGetPreferenceSetString { + + public static void main(String[] args) throws Exception { + syncGetPreferenceSetString(); + } + + public static void syncGetPreferenceSetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString(); + PreferenceSet response = migrationCenterClient.getPreferenceSet(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetPreferenceSet_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/AsyncGetReport.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/AsyncGetReport.java new file mode 100644 index 000000000000..128c63ad0f74 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/AsyncGetReport.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetReport_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.GetReportRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportName; +import com.google.cloud.migrationcenter.v1.ReportView; + +public class AsyncGetReport { + + public static void main(String[] args) throws Exception { + asyncGetReport(); + } + + public static void asyncGetReport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetReportRequest request = + GetReportRequest.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]") + .toString()) + .setView(ReportView.forNumber(0)) + .build(); + ApiFuture future = migrationCenterClient.getReportCallable().futureCall(request); + // Do something. + Report response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetReport_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReport.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReport.java new file mode 100644 index 000000000000..dd958f34d1ef --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReport.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetReport_sync] +import com.google.cloud.migrationcenter.v1.GetReportRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportName; +import com.google.cloud.migrationcenter.v1.ReportView; + +public class SyncGetReport { + + public static void main(String[] args) throws Exception { + syncGetReport(); + } + + public static void syncGetReport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetReportRequest request = + GetReportRequest.newBuilder() + .setName( + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]") + .toString()) + .setView(ReportView.forNumber(0)) + .build(); + Report response = migrationCenterClient.getReport(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetReport_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReportReportname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReportReportname.java new file mode 100644 index 000000000000..5fc44d3bf82a --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReportReportname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetReport_Reportname_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportName; + +public class SyncGetReportReportname { + + public static void main(String[] args) throws Exception { + syncGetReportReportname(); + } + + public static void syncGetReportReportname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); + Report response = migrationCenterClient.getReport(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetReport_Reportname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReportString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReportString.java new file mode 100644 index 000000000000..a96f6e651a56 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreport/SyncGetReportString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetReport_String_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportName; + +public class SyncGetReportString { + + public static void main(String[] args) throws Exception { + syncGetReportString(); + } + + public static void syncGetReportString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = + ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString(); + Report response = migrationCenterClient.getReport(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetReport_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/AsyncGetReportConfig.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/AsyncGetReportConfig.java new file mode 100644 index 000000000000..3655d23df6f2 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/AsyncGetReportConfig.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetReportConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.GetReportConfigRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; +import com.google.cloud.migrationcenter.v1.ReportConfigName; + +public class AsyncGetReportConfig { + + public static void main(String[] args) throws Exception { + asyncGetReportConfig(); + } + + public static void asyncGetReportConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetReportConfigRequest request = + GetReportConfigRequest.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .build(); + ApiFuture future = + migrationCenterClient.getReportConfigCallable().futureCall(request); + // Do something. + ReportConfig response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetReportConfig_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfig.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfig.java new file mode 100644 index 000000000000..cbe6aedfc009 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfig.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetReportConfig_sync] +import com.google.cloud.migrationcenter.v1.GetReportConfigRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; +import com.google.cloud.migrationcenter.v1.ReportConfigName; + +public class SyncGetReportConfig { + + public static void main(String[] args) throws Exception { + syncGetReportConfig(); + } + + public static void syncGetReportConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetReportConfigRequest request = + GetReportConfigRequest.newBuilder() + .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .build(); + ReportConfig response = migrationCenterClient.getReportConfig(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetReportConfig_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfigReportconfigname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfigReportconfigname.java new file mode 100644 index 000000000000..9ec76059f033 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfigReportconfigname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetReportConfig_Reportconfigname_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; +import com.google.cloud.migrationcenter.v1.ReportConfigName; + +public class SyncGetReportConfigReportconfigname { + + public static void main(String[] args) throws Exception { + syncGetReportConfigReportconfigname(); + } + + public static void syncGetReportConfigReportconfigname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + ReportConfig response = migrationCenterClient.getReportConfig(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetReportConfig_Reportconfigname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfigString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfigString.java new file mode 100644 index 000000000000..d734cbb647d3 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getreportconfig/SyncGetReportConfigString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetReportConfig_String_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; +import com.google.cloud.migrationcenter.v1.ReportConfigName; + +public class SyncGetReportConfigString { + + public static void main(String[] args) throws Exception { + syncGetReportConfigString(); + } + + public static void syncGetReportConfigString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString(); + ReportConfig response = migrationCenterClient.getReportConfig(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetReportConfig_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/AsyncGetSettings.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/AsyncGetSettings.java new file mode 100644 index 000000000000..29b230f97914 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/AsyncGetSettings.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetSettings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.GetSettingsRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.cloud.migrationcenter.v1.SettingsName; + +public class AsyncGetSettings { + + public static void main(String[] args) throws Exception { + asyncGetSettings(); + } + + public static void asyncGetSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetSettingsRequest request = + GetSettingsRequest.newBuilder() + .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + ApiFuture future = migrationCenterClient.getSettingsCallable().futureCall(request); + // Do something. + Settings response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetSettings_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettings.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettings.java new file mode 100644 index 000000000000..8c4dbbfd60ba --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettings.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetSettings_sync] +import com.google.cloud.migrationcenter.v1.GetSettingsRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.cloud.migrationcenter.v1.SettingsName; + +public class SyncGetSettings { + + public static void main(String[] args) throws Exception { + syncGetSettings(); + } + + public static void syncGetSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetSettingsRequest request = + GetSettingsRequest.newBuilder() + .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + Settings response = migrationCenterClient.getSettings(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetSettings_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettingsSettingsname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettingsSettingsname.java new file mode 100644 index 000000000000..02a9aa8b44f4 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettingsSettingsname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetSettings_Settingsname_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.cloud.migrationcenter.v1.SettingsName; + +public class SyncGetSettingsSettingsname { + + public static void main(String[] args) throws Exception { + syncGetSettingsSettingsname(); + } + + public static void syncGetSettingsSettingsname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + SettingsName name = SettingsName.of("[PROJECT]", "[LOCATION]"); + Settings response = migrationCenterClient.getSettings(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetSettings_Settingsname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettingsString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettingsString.java new file mode 100644 index 000000000000..acd42e1b3f40 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsettings/SyncGetSettingsString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetSettings_String_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.cloud.migrationcenter.v1.SettingsName; + +public class SyncGetSettingsString { + + public static void main(String[] args) throws Exception { + syncGetSettingsString(); + } + + public static void syncGetSettingsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = SettingsName.of("[PROJECT]", "[LOCATION]").toString(); + Settings response = migrationCenterClient.getSettings(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetSettings_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/AsyncGetSource.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/AsyncGetSource.java new file mode 100644 index 000000000000..55c7fa7222ef --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/AsyncGetSource.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetSource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.GetSourceRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.cloud.migrationcenter.v1.SourceName; + +public class AsyncGetSource { + + public static void main(String[] args) throws Exception { + asyncGetSource(); + } + + public static void asyncGetSource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetSourceRequest request = + GetSourceRequest.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + ApiFuture future = migrationCenterClient.getSourceCallable().futureCall(request); + // Do something. + Source response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetSource_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSource.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSource.java new file mode 100644 index 000000000000..14c084dbdf46 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSource.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetSource_sync] +import com.google.cloud.migrationcenter.v1.GetSourceRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.cloud.migrationcenter.v1.SourceName; + +public class SyncGetSource { + + public static void main(String[] args) throws Exception { + syncGetSource(); + } + + public static void syncGetSource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GetSourceRequest request = + GetSourceRequest.newBuilder() + .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + Source response = migrationCenterClient.getSource(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetSource_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSourceSourcename.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSourceSourcename.java new file mode 100644 index 000000000000..5ef9ae65b50a --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSourceSourcename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetSource_Sourcename_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.cloud.migrationcenter.v1.SourceName; + +public class SyncGetSourceSourcename { + + public static void main(String[] args) throws Exception { + syncGetSourceSourcename(); + } + + public static void syncGetSourceSourcename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + Source response = migrationCenterClient.getSource(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetSource_Sourcename_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSourceString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSourceString.java new file mode 100644 index 000000000000..81fe61ab55bf --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/getsource/SyncGetSourceString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_GetSource_String_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.cloud.migrationcenter.v1.SourceName; + +public class SyncGetSourceString { + + public static void main(String[] args) throws Exception { + syncGetSourceString(); + } + + public static void syncGetSourceString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString(); + Source response = migrationCenterClient.getSource(name); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetSource_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/AsyncListAssets.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/AsyncListAssets.java new file mode 100644 index 000000000000..6ce80c607fce --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/AsyncListAssets.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListAssets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.AssetView; +import com.google.cloud.migrationcenter.v1.ListAssetsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class AsyncListAssets { + + public static void main(String[] args) throws Exception { + asyncListAssets(); + } + + public static void asyncListAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(AssetView.forNumber(0)) + .build(); + ApiFuture future = migrationCenterClient.listAssetsPagedCallable().futureCall(request); + // Do something. + for (Asset element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListAssets_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/AsyncListAssetsPaged.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/AsyncListAssetsPaged.java new file mode 100644 index 000000000000..b4c52e634540 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/AsyncListAssetsPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListAssets_Paged_async] +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.AssetView; +import com.google.cloud.migrationcenter.v1.ListAssetsRequest; +import com.google.cloud.migrationcenter.v1.ListAssetsResponse; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.common.base.Strings; + +public class AsyncListAssetsPaged { + + public static void main(String[] args) throws Exception { + asyncListAssetsPaged(); + } + + public static void asyncListAssetsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(AssetView.forNumber(0)) + .build(); + while (true) { + ListAssetsResponse response = migrationCenterClient.listAssetsCallable().call(request); + for (Asset element : response.getAssetsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListAssets_Paged_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssets.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssets.java new file mode 100644 index 000000000000..3e1ae011deed --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssets.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListAssets_sync] +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.AssetView; +import com.google.cloud.migrationcenter.v1.ListAssetsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListAssets { + + public static void main(String[] args) throws Exception { + syncListAssets(); + } + + public static void syncListAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(AssetView.forNumber(0)) + .build(); + for (Asset element : migrationCenterClient.listAssets(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListAssets_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssetsLocationname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssetsLocationname.java new file mode 100644 index 000000000000..e8eed203756d --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssetsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListAssets_Locationname_sync] +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListAssetsLocationname { + + public static void main(String[] args) throws Exception { + syncListAssetsLocationname(); + } + + public static void syncListAssetsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Asset element : migrationCenterClient.listAssets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListAssets_Locationname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssetsString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssetsString.java new file mode 100644 index 000000000000..4f7e2a5fdc5c --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listassets/SyncListAssetsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListAssets_String_sync] +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListAssetsString { + + public static void main(String[] args) throws Exception { + syncListAssetsString(); + } + + public static void syncListAssetsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Asset element : migrationCenterClient.listAssets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListAssets_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/AsyncListErrorFrames.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/AsyncListErrorFrames.java new file mode 100644 index 000000000000..0a3f22194681 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/AsyncListErrorFrames.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.ErrorFrameView; +import com.google.cloud.migrationcenter.v1.ListErrorFramesRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.SourceName; + +public class AsyncListErrorFrames { + + public static void main(String[] args) throws Exception { + asyncListErrorFrames(); + } + + public static void asyncListErrorFrames() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListErrorFramesRequest request = + ListErrorFramesRequest.newBuilder() + .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setView(ErrorFrameView.forNumber(0)) + .build(); + ApiFuture future = + migrationCenterClient.listErrorFramesPagedCallable().futureCall(request); + // Do something. + for (ErrorFrame element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/AsyncListErrorFramesPaged.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/AsyncListErrorFramesPaged.java new file mode 100644 index 000000000000..3d154b933253 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/AsyncListErrorFramesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_Paged_async] +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.ErrorFrameView; +import com.google.cloud.migrationcenter.v1.ListErrorFramesRequest; +import com.google.cloud.migrationcenter.v1.ListErrorFramesResponse; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.SourceName; +import com.google.common.base.Strings; + +public class AsyncListErrorFramesPaged { + + public static void main(String[] args) throws Exception { + asyncListErrorFramesPaged(); + } + + public static void asyncListErrorFramesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListErrorFramesRequest request = + ListErrorFramesRequest.newBuilder() + .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setView(ErrorFrameView.forNumber(0)) + .build(); + while (true) { + ListErrorFramesResponse response = + migrationCenterClient.listErrorFramesCallable().call(request); + for (ErrorFrame element : response.getErrorFramesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_Paged_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFrames.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFrames.java new file mode 100644 index 000000000000..3f67c50c64f2 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFrames.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_sync] +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.ErrorFrameView; +import com.google.cloud.migrationcenter.v1.ListErrorFramesRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.SourceName; + +public class SyncListErrorFrames { + + public static void main(String[] args) throws Exception { + syncListErrorFrames(); + } + + public static void syncListErrorFrames() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListErrorFramesRequest request = + ListErrorFramesRequest.newBuilder() + .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setView(ErrorFrameView.forNumber(0)) + .build(); + for (ErrorFrame element : migrationCenterClient.listErrorFrames(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFramesSourcename.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFramesSourcename.java new file mode 100644 index 000000000000..efdfa8cc6f0b --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFramesSourcename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_Sourcename_sync] +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.SourceName; + +public class SyncListErrorFramesSourcename { + + public static void main(String[] args) throws Exception { + syncListErrorFramesSourcename(); + } + + public static void syncListErrorFramesSourcename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); + for (ErrorFrame element : migrationCenterClient.listErrorFrames(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_Sourcename_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFramesString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFramesString.java new file mode 100644 index 000000000000..5e865dadea1d --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listerrorframes/SyncListErrorFramesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_String_sync] +import com.google.cloud.migrationcenter.v1.ErrorFrame; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.SourceName; + +public class SyncListErrorFramesString { + + public static void main(String[] args) throws Exception { + syncListErrorFramesString(); + } + + public static void syncListErrorFramesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString(); + for (ErrorFrame element : migrationCenterClient.listErrorFrames(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/AsyncListGroups.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/AsyncListGroups.java new file mode 100644 index 000000000000..ff7a9a6fa31a --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/AsyncListGroups.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListGroups_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.ListGroupsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class AsyncListGroups { + + public static void main(String[] args) throws Exception { + asyncListGroups(); + } + + public static void asyncListGroups() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListGroupsRequest request = + ListGroupsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = migrationCenterClient.listGroupsPagedCallable().futureCall(request); + // Do something. + for (Group element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListGroups_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/AsyncListGroupsPaged.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/AsyncListGroupsPaged.java new file mode 100644 index 000000000000..fd4174218ba6 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/AsyncListGroupsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListGroups_Paged_async] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.ListGroupsRequest; +import com.google.cloud.migrationcenter.v1.ListGroupsResponse; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.common.base.Strings; + +public class AsyncListGroupsPaged { + + public static void main(String[] args) throws Exception { + asyncListGroupsPaged(); + } + + public static void asyncListGroupsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListGroupsRequest request = + ListGroupsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListGroupsResponse response = migrationCenterClient.listGroupsCallable().call(request); + for (Group element : response.getGroupsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListGroups_Paged_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroups.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroups.java new file mode 100644 index 000000000000..12dba8a52dba --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroups.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListGroups_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.ListGroupsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListGroups { + + public static void main(String[] args) throws Exception { + syncListGroups(); + } + + public static void syncListGroups() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListGroupsRequest request = + ListGroupsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Group element : migrationCenterClient.listGroups(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListGroups_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroupsLocationname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroupsLocationname.java new file mode 100644 index 000000000000..f5fd7fe88116 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroupsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListGroups_Locationname_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListGroupsLocationname { + + public static void main(String[] args) throws Exception { + syncListGroupsLocationname(); + } + + public static void syncListGroupsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Group element : migrationCenterClient.listGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListGroups_Locationname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroupsString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroupsString.java new file mode 100644 index 000000000000..030cea669782 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listgroups/SyncListGroupsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListGroups_String_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListGroupsString { + + public static void main(String[] args) throws Exception { + syncListGroupsString(); + } + + public static void syncListGroupsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Group element : migrationCenterClient.listGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListGroups_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/AsyncListImportDataFiles.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/AsyncListImportDataFiles.java new file mode 100644 index 000000000000..e06371a10d43 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/AsyncListImportDataFiles.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class AsyncListImportDataFiles { + + public static void main(String[] args) throws Exception { + asyncListImportDataFiles(); + } + + public static void asyncListImportDataFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListImportDataFilesRequest request = + ListImportDataFilesRequest.newBuilder() + .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + migrationCenterClient.listImportDataFilesPagedCallable().futureCall(request); + // Do something. + for (ImportDataFile element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/AsyncListImportDataFilesPaged.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/AsyncListImportDataFilesPaged.java new file mode 100644 index 000000000000..1bf454eebc07 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/AsyncListImportDataFilesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_Paged_async] +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.common.base.Strings; + +public class AsyncListImportDataFilesPaged { + + public static void main(String[] args) throws Exception { + asyncListImportDataFilesPaged(); + } + + public static void asyncListImportDataFilesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListImportDataFilesRequest request = + ListImportDataFilesRequest.newBuilder() + .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListImportDataFilesResponse response = + migrationCenterClient.listImportDataFilesCallable().call(request); + for (ImportDataFile element : response.getImportDataFilesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_Paged_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFiles.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFiles.java new file mode 100644 index 000000000000..93031e7cd8ae --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFiles.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_sync] +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListImportDataFiles { + + public static void main(String[] args) throws Exception { + syncListImportDataFiles(); + } + + public static void syncListImportDataFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListImportDataFilesRequest request = + ListImportDataFilesRequest.newBuilder() + .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (ImportDataFile element : + migrationCenterClient.listImportDataFiles(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFilesImportjobname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFilesImportjobname.java new file mode 100644 index 000000000000..1bc7a8643e91 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFilesImportjobname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_Importjobname_sync] +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListImportDataFilesImportjobname { + + public static void main(String[] args) throws Exception { + syncListImportDataFilesImportjobname(); + } + + public static void syncListImportDataFilesImportjobname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + for (ImportDataFile element : + migrationCenterClient.listImportDataFiles(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_Importjobname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFilesString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFilesString.java new file mode 100644 index 000000000000..b66709be93f0 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportdatafiles/SyncListImportDataFilesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_String_sync] +import com.google.cloud.migrationcenter.v1.ImportDataFile; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListImportDataFilesString { + + public static void main(String[] args) throws Exception { + syncListImportDataFilesString(); + } + + public static void syncListImportDataFilesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); + for (ImportDataFile element : + migrationCenterClient.listImportDataFiles(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/AsyncListImportJobs.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/AsyncListImportJobs.java new file mode 100644 index 000000000000..f961d9bc21e1 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/AsyncListImportJobs.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListImportJobs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.ImportJobView; +import com.google.cloud.migrationcenter.v1.ListImportJobsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class AsyncListImportJobs { + + public static void main(String[] args) throws Exception { + asyncListImportJobs(); + } + + public static void asyncListImportJobs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListImportJobsRequest request = + ListImportJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(ImportJobView.forNumber(0)) + .build(); + ApiFuture future = + migrationCenterClient.listImportJobsPagedCallable().futureCall(request); + // Do something. + for (ImportJob element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportJobs_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/AsyncListImportJobsPaged.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/AsyncListImportJobsPaged.java new file mode 100644 index 000000000000..ff6a0ab4991e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/AsyncListImportJobsPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListImportJobs_Paged_async] +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.ImportJobView; +import com.google.cloud.migrationcenter.v1.ListImportJobsRequest; +import com.google.cloud.migrationcenter.v1.ListImportJobsResponse; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.common.base.Strings; + +public class AsyncListImportJobsPaged { + + public static void main(String[] args) throws Exception { + asyncListImportJobsPaged(); + } + + public static void asyncListImportJobsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListImportJobsRequest request = + ListImportJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(ImportJobView.forNumber(0)) + .build(); + while (true) { + ListImportJobsResponse response = + migrationCenterClient.listImportJobsCallable().call(request); + for (ImportJob element : response.getImportJobsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportJobs_Paged_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobs.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobs.java new file mode 100644 index 000000000000..18cd8237a3ef --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobs.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListImportJobs_sync] +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.ImportJobView; +import com.google.cloud.migrationcenter.v1.ListImportJobsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListImportJobs { + + public static void main(String[] args) throws Exception { + syncListImportJobs(); + } + + public static void syncListImportJobs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListImportJobsRequest request = + ListImportJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(ImportJobView.forNumber(0)) + .build(); + for (ImportJob element : migrationCenterClient.listImportJobs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportJobs_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobsLocationname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobsLocationname.java new file mode 100644 index 000000000000..27517bec2a34 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListImportJobs_Locationname_sync] +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListImportJobsLocationname { + + public static void main(String[] args) throws Exception { + syncListImportJobsLocationname(); + } + + public static void syncListImportJobsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (ImportJob element : migrationCenterClient.listImportJobs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportJobs_Locationname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobsString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobsString.java new file mode 100644 index 000000000000..f4ec4bc02aad --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listimportjobs/SyncListImportJobsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListImportJobs_String_sync] +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListImportJobsString { + + public static void main(String[] args) throws Exception { + syncListImportJobsString(); + } + + public static void syncListImportJobsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (ImportJob element : migrationCenterClient.listImportJobs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportJobs_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/AsyncListLocations.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..58bc36690ff4 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + migrationCenterClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListLocations_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/AsyncListLocationsPaged.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..baea9133bea3 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + migrationCenterClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListLocations_Paged_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/SyncListLocations.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..1f88f1e85f50 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : migrationCenterClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListLocations_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/AsyncListPreferenceSets.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/AsyncListPreferenceSets.java new file mode 100644 index 000000000000..d886c1a0cd73 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/AsyncListPreferenceSets.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; + +public class AsyncListPreferenceSets { + + public static void main(String[] args) throws Exception { + asyncListPreferenceSets(); + } + + public static void asyncListPreferenceSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListPreferenceSetsRequest request = + ListPreferenceSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + migrationCenterClient.listPreferenceSetsPagedCallable().futureCall(request); + // Do something. + for (PreferenceSet element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/AsyncListPreferenceSetsPaged.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/AsyncListPreferenceSetsPaged.java new file mode 100644 index 000000000000..15457b90fef8 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/AsyncListPreferenceSetsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_Paged_async] +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest; +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.common.base.Strings; + +public class AsyncListPreferenceSetsPaged { + + public static void main(String[] args) throws Exception { + asyncListPreferenceSetsPaged(); + } + + public static void asyncListPreferenceSetsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListPreferenceSetsRequest request = + ListPreferenceSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListPreferenceSetsResponse response = + migrationCenterClient.listPreferenceSetsCallable().call(request); + for (PreferenceSet element : response.getPreferenceSetsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_Paged_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSets.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSets.java new file mode 100644 index 000000000000..68d9eb14f95a --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSets.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_sync] +import com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; + +public class SyncListPreferenceSets { + + public static void main(String[] args) throws Exception { + syncListPreferenceSets(); + } + + public static void syncListPreferenceSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListPreferenceSetsRequest request = + ListPreferenceSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + for (PreferenceSet element : migrationCenterClient.listPreferenceSets(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSetsLocationname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSetsLocationname.java new file mode 100644 index 000000000000..a00833d58614 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSetsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_Locationname_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; + +public class SyncListPreferenceSetsLocationname { + + public static void main(String[] args) throws Exception { + syncListPreferenceSetsLocationname(); + } + + public static void syncListPreferenceSetsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (PreferenceSet element : migrationCenterClient.listPreferenceSets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_Locationname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSetsString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSetsString.java new file mode 100644 index 000000000000..e213e3fa4ead --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listpreferencesets/SyncListPreferenceSetsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_String_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; + +public class SyncListPreferenceSetsString { + + public static void main(String[] args) throws Exception { + syncListPreferenceSetsString(); + } + + public static void syncListPreferenceSetsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (PreferenceSet element : migrationCenterClient.listPreferenceSets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/AsyncListReportConfigs.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/AsyncListReportConfigs.java new file mode 100644 index 000000000000..9e37e3dd585b --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/AsyncListReportConfigs.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.ListReportConfigsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; + +public class AsyncListReportConfigs { + + public static void main(String[] args) throws Exception { + asyncListReportConfigs(); + } + + public static void asyncListReportConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListReportConfigsRequest request = + ListReportConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + migrationCenterClient.listReportConfigsPagedCallable().futureCall(request); + // Do something. + for (ReportConfig element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/AsyncListReportConfigsPaged.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/AsyncListReportConfigsPaged.java new file mode 100644 index 000000000000..a2779089d83e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/AsyncListReportConfigsPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_Paged_async] +import com.google.cloud.migrationcenter.v1.ListReportConfigsRequest; +import com.google.cloud.migrationcenter.v1.ListReportConfigsResponse; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; +import com.google.common.base.Strings; + +public class AsyncListReportConfigsPaged { + + public static void main(String[] args) throws Exception { + asyncListReportConfigsPaged(); + } + + public static void asyncListReportConfigsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListReportConfigsRequest request = + ListReportConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListReportConfigsResponse response = + migrationCenterClient.listReportConfigsCallable().call(request); + for (ReportConfig element : response.getReportConfigsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_Paged_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigs.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigs.java new file mode 100644 index 000000000000..333e12a5174d --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigs.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_sync] +import com.google.cloud.migrationcenter.v1.ListReportConfigsRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; + +public class SyncListReportConfigs { + + public static void main(String[] args) throws Exception { + syncListReportConfigs(); + } + + public static void syncListReportConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListReportConfigsRequest request = + ListReportConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (ReportConfig element : migrationCenterClient.listReportConfigs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigsLocationname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigsLocationname.java new file mode 100644 index 000000000000..4ab87e27f1dc --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_Locationname_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; + +public class SyncListReportConfigsLocationname { + + public static void main(String[] args) throws Exception { + syncListReportConfigsLocationname(); + } + + public static void syncListReportConfigsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (ReportConfig element : migrationCenterClient.listReportConfigs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_Locationname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigsString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigsString.java new file mode 100644 index 000000000000..05c3790594c0 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreportconfigs/SyncListReportConfigsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_String_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportConfig; + +public class SyncListReportConfigsString { + + public static void main(String[] args) throws Exception { + syncListReportConfigsString(); + } + + public static void syncListReportConfigsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (ReportConfig element : migrationCenterClient.listReportConfigs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/AsyncListReports.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/AsyncListReports.java new file mode 100644 index 000000000000..9378ac8a1b02 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/AsyncListReports.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListReports_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.ListReportsRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportConfigName; +import com.google.cloud.migrationcenter.v1.ReportView; + +public class AsyncListReports { + + public static void main(String[] args) throws Exception { + asyncListReports(); + } + + public static void asyncListReports() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListReportsRequest request = + ListReportsRequest.newBuilder() + .setParent( + ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(ReportView.forNumber(0)) + .build(); + ApiFuture future = + migrationCenterClient.listReportsPagedCallable().futureCall(request); + // Do something. + for (Report element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReports_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/AsyncListReportsPaged.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/AsyncListReportsPaged.java new file mode 100644 index 000000000000..bc389a98dd0b --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/AsyncListReportsPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListReports_Paged_async] +import com.google.cloud.migrationcenter.v1.ListReportsRequest; +import com.google.cloud.migrationcenter.v1.ListReportsResponse; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportConfigName; +import com.google.cloud.migrationcenter.v1.ReportView; +import com.google.common.base.Strings; + +public class AsyncListReportsPaged { + + public static void main(String[] args) throws Exception { + asyncListReportsPaged(); + } + + public static void asyncListReportsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListReportsRequest request = + ListReportsRequest.newBuilder() + .setParent( + ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(ReportView.forNumber(0)) + .build(); + while (true) { + ListReportsResponse response = migrationCenterClient.listReportsCallable().call(request); + for (Report element : response.getReportsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReports_Paged_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReports.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReports.java new file mode 100644 index 000000000000..487f42ad54ff --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReports.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListReports_sync] +import com.google.cloud.migrationcenter.v1.ListReportsRequest; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportConfigName; +import com.google.cloud.migrationcenter.v1.ReportView; + +public class SyncListReports { + + public static void main(String[] args) throws Exception { + syncListReports(); + } + + public static void syncListReports() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListReportsRequest request = + ListReportsRequest.newBuilder() + .setParent( + ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(ReportView.forNumber(0)) + .build(); + for (Report element : migrationCenterClient.listReports(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReports_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReportsReportconfigname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReportsReportconfigname.java new file mode 100644 index 000000000000..95e8fa86e33e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReportsReportconfigname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListReports_Reportconfigname_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportConfigName; + +public class SyncListReportsReportconfigname { + + public static void main(String[] args) throws Exception { + syncListReportsReportconfigname(); + } + + public static void syncListReportsReportconfigname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); + for (Report element : migrationCenterClient.listReports(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReports_Reportconfigname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReportsString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReportsString.java new file mode 100644 index 000000000000..9336c7fe9160 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listreports/SyncListReportsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListReports_String_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Report; +import com.google.cloud.migrationcenter.v1.ReportConfigName; + +public class SyncListReportsString { + + public static void main(String[] args) throws Exception { + syncListReportsString(); + } + + public static void syncListReportsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString(); + for (Report element : migrationCenterClient.listReports(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReports_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/AsyncListSources.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/AsyncListSources.java new file mode 100644 index 000000000000..80e3e6dd7f81 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/AsyncListSources.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListSources_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.ListSourcesRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; + +public class AsyncListSources { + + public static void main(String[] args) throws Exception { + asyncListSources(); + } + + public static void asyncListSources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListSourcesRequest request = + ListSourcesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + migrationCenterClient.listSourcesPagedCallable().futureCall(request); + // Do something. + for (Source element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListSources_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/AsyncListSourcesPaged.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/AsyncListSourcesPaged.java new file mode 100644 index 000000000000..2c15bda74cb4 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/AsyncListSourcesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListSources_Paged_async] +import com.google.cloud.migrationcenter.v1.ListSourcesRequest; +import com.google.cloud.migrationcenter.v1.ListSourcesResponse; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.common.base.Strings; + +public class AsyncListSourcesPaged { + + public static void main(String[] args) throws Exception { + asyncListSourcesPaged(); + } + + public static void asyncListSourcesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListSourcesRequest request = + ListSourcesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListSourcesResponse response = migrationCenterClient.listSourcesCallable().call(request); + for (Source element : response.getSourcesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListSources_Paged_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSources.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSources.java new file mode 100644 index 000000000000..19e006964c81 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSources.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListSources_sync] +import com.google.cloud.migrationcenter.v1.ListSourcesRequest; +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; + +public class SyncListSources { + + public static void main(String[] args) throws Exception { + syncListSources(); + } + + public static void syncListSources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ListSourcesRequest request = + ListSourcesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Source element : migrationCenterClient.listSources(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListSources_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSourcesLocationname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSourcesLocationname.java new file mode 100644 index 000000000000..7557379e1bce --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSourcesLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListSources_Locationname_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; + +public class SyncListSourcesLocationname { + + public static void main(String[] args) throws Exception { + syncListSourcesLocationname(); + } + + public static void syncListSourcesLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Source element : migrationCenterClient.listSources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListSources_Locationname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSourcesString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSourcesString.java new file mode 100644 index 000000000000..38d964eeb14f --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/listsources/SyncListSourcesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ListSources_String_sync] +import com.google.cloud.migrationcenter.v1.LocationName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; + +public class SyncListSourcesString { + + public static void main(String[] args) throws Exception { + syncListSourcesString(); + } + + public static void syncListSourcesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Source element : migrationCenterClient.listSources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListSources_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/AsyncRemoveAssetsFromGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/AsyncRemoveAssetsFromGroup.java new file mode 100644 index 000000000000..1bce49a6e8f6 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/AsyncRemoveAssetsFromGroup.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.AssetList; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveAssetsFromGroup { + + public static void main(String[] args) throws Exception { + asyncRemoveAssetsFromGroup(); + } + + public static void asyncRemoveAssetsFromGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + RemoveAssetsFromGroupRequest request = + RemoveAssetsFromGroupRequest.newBuilder() + .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setRequestId("requestId693933066") + .setAssets(AssetList.newBuilder().build()) + .setAllowMissing(true) + .build(); + ApiFuture future = + migrationCenterClient.removeAssetsFromGroupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/AsyncRemoveAssetsFromGroupLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/AsyncRemoveAssetsFromGroupLRO.java new file mode 100644 index 000000000000..7be6ae84c476 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/AsyncRemoveAssetsFromGroupLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.AssetList; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest; + +public class AsyncRemoveAssetsFromGroupLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveAssetsFromGroupLRO(); + } + + public static void asyncRemoveAssetsFromGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + RemoveAssetsFromGroupRequest request = + RemoveAssetsFromGroupRequest.newBuilder() + .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setRequestId("requestId693933066") + .setAssets(AssetList.newBuilder().build()) + .setAllowMissing(true) + .build(); + OperationFuture future = + migrationCenterClient.removeAssetsFromGroupOperationCallable().futureCall(request); + // Do something. + Group response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroup.java new file mode 100644 index 000000000000..62466d3b5525 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroup.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_sync] +import com.google.cloud.migrationcenter.v1.AssetList; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest; + +public class SyncRemoveAssetsFromGroup { + + public static void main(String[] args) throws Exception { + syncRemoveAssetsFromGroup(); + } + + public static void syncRemoveAssetsFromGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + RemoveAssetsFromGroupRequest request = + RemoveAssetsFromGroupRequest.newBuilder() + .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) + .setRequestId("requestId693933066") + .setAssets(AssetList.newBuilder().build()) + .setAllowMissing(true) + .build(); + Group response = migrationCenterClient.removeAssetsFromGroupAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroupGroupname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroupGroupname.java new file mode 100644 index 000000000000..90f53dc15582 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroupGroupname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_Groupname_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncRemoveAssetsFromGroupGroupname { + + public static void main(String[] args) throws Exception { + syncRemoveAssetsFromGroupGroupname(); + } + + public static void syncRemoveAssetsFromGroupGroupname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); + Group response = migrationCenterClient.removeAssetsFromGroupAsync(group).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_Groupname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroupString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroupString.java new file mode 100644 index 000000000000..1a5633213154 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/removeassetsfromgroup/SyncRemoveAssetsFromGroupString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_String_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.GroupName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; + +public class SyncRemoveAssetsFromGroupString { + + public static void main(String[] args) throws Exception { + syncRemoveAssetsFromGroupString(); + } + + public static void syncRemoveAssetsFromGroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString(); + Group response = migrationCenterClient.removeAssetsFromGroupAsync(group).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/reportassetframes/AsyncReportAssetFrames.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/reportassetframes/AsyncReportAssetFrames.java new file mode 100644 index 000000000000..420f6ac64c73 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/reportassetframes/AsyncReportAssetFrames.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ReportAssetFrames_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.Frames; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse; +import com.google.cloud.migrationcenter.v1.SourceName; + +public class AsyncReportAssetFrames { + + public static void main(String[] args) throws Exception { + asyncReportAssetFrames(); + } + + public static void asyncReportAssetFrames() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ReportAssetFramesRequest request = + ReportAssetFramesRequest.newBuilder() + .setParent("parent-995424086") + .setFrames(Frames.newBuilder().build()) + .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + ApiFuture future = + migrationCenterClient.reportAssetFramesCallable().futureCall(request); + // Do something. + ReportAssetFramesResponse response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ReportAssetFrames_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/reportassetframes/SyncReportAssetFrames.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/reportassetframes/SyncReportAssetFrames.java new file mode 100644 index 000000000000..ae4b0ffb1823 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/reportassetframes/SyncReportAssetFrames.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ReportAssetFrames_sync] +import com.google.cloud.migrationcenter.v1.Frames; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest; +import com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse; +import com.google.cloud.migrationcenter.v1.SourceName; + +public class SyncReportAssetFrames { + + public static void main(String[] args) throws Exception { + syncReportAssetFrames(); + } + + public static void syncReportAssetFrames() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ReportAssetFramesRequest request = + ReportAssetFramesRequest.newBuilder() + .setParent("parent-995424086") + .setFrames(Frames.newBuilder().build()) + .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) + .build(); + ReportAssetFramesResponse response = migrationCenterClient.reportAssetFrames(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ReportAssetFrames_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/AsyncRunImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/AsyncRunImportJob.java new file mode 100644 index 000000000000..a4d9877b2ea0 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/AsyncRunImportJob.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_RunImportJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.RunImportJobRequest; +import com.google.longrunning.Operation; + +public class AsyncRunImportJob { + + public static void main(String[] args) throws Exception { + asyncRunImportJob(); + } + + public static void asyncRunImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + RunImportJobRequest request = + RunImportJobRequest.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.runImportJobCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_RunImportJob_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/AsyncRunImportJobLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/AsyncRunImportJobLRO.java new file mode 100644 index 000000000000..6be567314967 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/AsyncRunImportJobLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_RunImportJob_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.RunImportJobRequest; +import com.google.protobuf.Empty; + +public class AsyncRunImportJobLRO { + + public static void main(String[] args) throws Exception { + asyncRunImportJobLRO(); + } + + public static void asyncRunImportJobLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + RunImportJobRequest request = + RunImportJobRequest.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.runImportJobOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_RunImportJob_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJob.java new file mode 100644 index 000000000000..9e7a9b72f31a --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJob.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_RunImportJob_sync] +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.RunImportJobRequest; +import com.google.protobuf.Empty; + +public class SyncRunImportJob { + + public static void main(String[] args) throws Exception { + syncRunImportJob(); + } + + public static void syncRunImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + RunImportJobRequest request = + RunImportJobRequest.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setRequestId("requestId693933066") + .build(); + migrationCenterClient.runImportJobAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_RunImportJob_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJobImportjobname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJobImportjobname.java new file mode 100644 index 000000000000..f8f21b1c1018 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJobImportjobname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_RunImportJob_Importjobname_sync] +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncRunImportJobImportjobname { + + public static void main(String[] args) throws Exception { + syncRunImportJobImportjobname(); + } + + public static void syncRunImportJobImportjobname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + migrationCenterClient.runImportJobAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_RunImportJob_Importjobname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJobString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJobString.java new file mode 100644 index 000000000000..d387df694f14 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/runimportjob/SyncRunImportJobString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_RunImportJob_String_sync] +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncRunImportJobString { + + public static void main(String[] args) throws Exception { + syncRunImportJobString(); + } + + public static void syncRunImportJobString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); + migrationCenterClient.runImportJobAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_RunImportJob_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/AsyncUpdateAsset.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/AsyncUpdateAsset.java new file mode 100644 index 000000000000..b6fd36f97b22 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/AsyncUpdateAsset.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateAsset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.UpdateAssetRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAsset { + + public static void main(String[] args) throws Exception { + asyncUpdateAsset(); + } + + public static void asyncUpdateAsset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateAssetRequest request = + UpdateAssetRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAsset(Asset.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = migrationCenterClient.updateAssetCallable().futureCall(request); + // Do something. + Asset response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateAsset_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/SyncUpdateAsset.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/SyncUpdateAsset.java new file mode 100644 index 000000000000..1ab669a0583c --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/SyncUpdateAsset.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateAsset_sync] +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.UpdateAssetRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAsset { + + public static void main(String[] args) throws Exception { + syncUpdateAsset(); + } + + public static void syncUpdateAsset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateAssetRequest request = + UpdateAssetRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAsset(Asset.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Asset response = migrationCenterClient.updateAsset(request); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateAsset_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/SyncUpdateAssetAssetFieldmask.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/SyncUpdateAssetAssetFieldmask.java new file mode 100644 index 000000000000..a2cd178c4700 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateasset/SyncUpdateAssetAssetFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateAsset_AssetFieldmask_sync] +import com.google.cloud.migrationcenter.v1.Asset; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAssetAssetFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateAssetAssetFieldmask(); + } + + public static void syncUpdateAssetAssetFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + Asset asset = Asset.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Asset response = migrationCenterClient.updateAsset(asset, updateMask); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateAsset_AssetFieldmask_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/AsyncUpdateGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/AsyncUpdateGroup.java new file mode 100644 index 000000000000..bd78e20d20d6 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/AsyncUpdateGroup.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.UpdateGroupRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateGroup { + + public static void main(String[] args) throws Exception { + asyncUpdateGroup(); + } + + public static void asyncUpdateGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateGroupRequest request = + UpdateGroupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setGroup(Group.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = migrationCenterClient.updateGroupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateGroup_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/AsyncUpdateGroupLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/AsyncUpdateGroupLRO.java new file mode 100644 index 000000000000..671bf16da4ce --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/AsyncUpdateGroupLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.UpdateGroupRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateGroupLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateGroupLRO(); + } + + public static void asyncUpdateGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateGroupRequest request = + UpdateGroupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setGroup(Group.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.updateGroupOperationCallable().futureCall(request); + // Do something. + Group response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateGroup_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/SyncUpdateGroup.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/SyncUpdateGroup.java new file mode 100644 index 000000000000..4af51f773535 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/SyncUpdateGroup.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateGroup_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.UpdateGroupRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateGroup { + + public static void main(String[] args) throws Exception { + syncUpdateGroup(); + } + + public static void syncUpdateGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateGroupRequest request = + UpdateGroupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setGroup(Group.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Group response = migrationCenterClient.updateGroupAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateGroup_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/SyncUpdateGroupGroupFieldmask.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/SyncUpdateGroupGroupFieldmask.java new file mode 100644 index 000000000000..ecca50f9b4fa --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updategroup/SyncUpdateGroupGroupFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateGroup_GroupFieldmask_sync] +import com.google.cloud.migrationcenter.v1.Group; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateGroupGroupFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateGroupGroupFieldmask(); + } + + public static void syncUpdateGroupGroupFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + Group group = Group.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Group response = migrationCenterClient.updateGroupAsync(group, updateMask).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateGroup_GroupFieldmask_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/AsyncUpdateImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/AsyncUpdateImportJob.java new file mode 100644 index 000000000000..04ff8e5d639b --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/AsyncUpdateImportJob.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateImportJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.UpdateImportJobRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateImportJob { + + public static void main(String[] args) throws Exception { + asyncUpdateImportJob(); + } + + public static void asyncUpdateImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateImportJobRequest request = + UpdateImportJobRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setImportJob(ImportJob.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.updateImportJobCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateImportJob_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/AsyncUpdateImportJobLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/AsyncUpdateImportJobLRO.java new file mode 100644 index 000000000000..417d2d83e6ac --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/AsyncUpdateImportJobLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateImportJob_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.UpdateImportJobRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateImportJobLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateImportJobLRO(); + } + + public static void asyncUpdateImportJobLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateImportJobRequest request = + UpdateImportJobRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setImportJob(ImportJob.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.updateImportJobOperationCallable().futureCall(request); + // Do something. + ImportJob response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateImportJob_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/SyncUpdateImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/SyncUpdateImportJob.java new file mode 100644 index 000000000000..9afc84763249 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/SyncUpdateImportJob.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateImportJob_sync] +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.UpdateImportJobRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateImportJob { + + public static void main(String[] args) throws Exception { + syncUpdateImportJob(); + } + + public static void syncUpdateImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateImportJobRequest request = + UpdateImportJobRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setImportJob(ImportJob.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ImportJob response = migrationCenterClient.updateImportJobAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateImportJob_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/SyncUpdateImportJobImportjobFieldmask.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/SyncUpdateImportJobImportjobFieldmask.java new file mode 100644 index 000000000000..fa637a047393 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updateimportjob/SyncUpdateImportJobImportjobFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateImportJob_ImportjobFieldmask_sync] +import com.google.cloud.migrationcenter.v1.ImportJob; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateImportJobImportjobFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateImportJobImportjobFieldmask(); + } + + public static void syncUpdateImportJobImportjobFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ImportJob importJob = ImportJob.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + ImportJob response = migrationCenterClient.updateImportJobAsync(importJob, updateMask).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateImportJob_ImportjobFieldmask_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/AsyncUpdatePreferenceSet.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/AsyncUpdatePreferenceSet.java new file mode 100644 index 000000000000..c2e971246055 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/AsyncUpdatePreferenceSet.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdatePreferenceSet_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePreferenceSet { + + public static void main(String[] args) throws Exception { + asyncUpdatePreferenceSet(); + } + + public static void asyncUpdatePreferenceSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdatePreferenceSetRequest request = + UpdatePreferenceSetRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setPreferenceSet(PreferenceSet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.updatePreferenceSetCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdatePreferenceSet_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/AsyncUpdatePreferenceSetLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/AsyncUpdatePreferenceSetLRO.java new file mode 100644 index 000000000000..f4f7c68a7163 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/AsyncUpdatePreferenceSetLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdatePreferenceSet_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePreferenceSetLRO { + + public static void main(String[] args) throws Exception { + asyncUpdatePreferenceSetLRO(); + } + + public static void asyncUpdatePreferenceSetLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdatePreferenceSetRequest request = + UpdatePreferenceSetRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setPreferenceSet(PreferenceSet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.updatePreferenceSetOperationCallable().futureCall(request); + // Do something. + PreferenceSet response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdatePreferenceSet_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/SyncUpdatePreferenceSet.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/SyncUpdatePreferenceSet.java new file mode 100644 index 000000000000..0a6e00dbd93e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/SyncUpdatePreferenceSet.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdatePreferenceSet_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePreferenceSet { + + public static void main(String[] args) throws Exception { + syncUpdatePreferenceSet(); + } + + public static void syncUpdatePreferenceSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdatePreferenceSetRequest request = + UpdatePreferenceSetRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setPreferenceSet(PreferenceSet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + PreferenceSet response = migrationCenterClient.updatePreferenceSetAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdatePreferenceSet_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/SyncUpdatePreferenceSetPreferencesetFieldmask.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/SyncUpdatePreferenceSetPreferencesetFieldmask.java new file mode 100644 index 000000000000..80ff1783e523 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatepreferenceset/SyncUpdatePreferenceSetPreferencesetFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdatePreferenceSet_PreferencesetFieldmask_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.PreferenceSet; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePreferenceSetPreferencesetFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdatePreferenceSetPreferencesetFieldmask(); + } + + public static void syncUpdatePreferenceSetPreferencesetFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + PreferenceSet response = + migrationCenterClient.updatePreferenceSetAsync(preferenceSet, updateMask).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdatePreferenceSet_PreferencesetFieldmask_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/AsyncUpdateSettings.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/AsyncUpdateSettings.java new file mode 100644 index 000000000000..236cc40c150d --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/AsyncUpdateSettings.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateSettings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.cloud.migrationcenter.v1.UpdateSettingsRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSettings { + + public static void main(String[] args) throws Exception { + asyncUpdateSettings(); + } + + public static void asyncUpdateSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateSettingsRequest request = + UpdateSettingsRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSettings(Settings.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.updateSettingsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateSettings_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/AsyncUpdateSettingsLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/AsyncUpdateSettingsLRO.java new file mode 100644 index 000000000000..806ba44d48d9 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/AsyncUpdateSettingsLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateSettings_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.cloud.migrationcenter.v1.UpdateSettingsRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSettingsLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateSettingsLRO(); + } + + public static void asyncUpdateSettingsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateSettingsRequest request = + UpdateSettingsRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSettings(Settings.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.updateSettingsOperationCallable().futureCall(request); + // Do something. + Settings response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateSettings_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/SyncUpdateSettings.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/SyncUpdateSettings.java new file mode 100644 index 000000000000..3f9d35ac772a --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/SyncUpdateSettings.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateSettings_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.cloud.migrationcenter.v1.UpdateSettingsRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSettings { + + public static void main(String[] args) throws Exception { + syncUpdateSettings(); + } + + public static void syncUpdateSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateSettingsRequest request = + UpdateSettingsRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSettings(Settings.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Settings response = migrationCenterClient.updateSettingsAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateSettings_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/SyncUpdateSettingsSettingsFieldmask.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/SyncUpdateSettingsSettingsFieldmask.java new file mode 100644 index 000000000000..85ac1fe1deda --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesettings/SyncUpdateSettingsSettingsFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateSettings_SettingsFieldmask_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Settings; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSettingsSettingsFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateSettingsSettingsFieldmask(); + } + + public static void syncUpdateSettingsSettingsFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + Settings settings = Settings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Settings response = migrationCenterClient.updateSettingsAsync(settings, updateMask).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateSettings_SettingsFieldmask_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/AsyncUpdateSource.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/AsyncUpdateSource.java new file mode 100644 index 000000000000..f6fda0476ee3 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/AsyncUpdateSource.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateSource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.cloud.migrationcenter.v1.UpdateSourceRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSource { + + public static void main(String[] args) throws Exception { + asyncUpdateSource(); + } + + public static void asyncUpdateSource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateSourceRequest request = + UpdateSourceRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSource(Source.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.updateSourceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateSource_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/AsyncUpdateSourceLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/AsyncUpdateSourceLRO.java new file mode 100644 index 000000000000..502a72e44206 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/AsyncUpdateSourceLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateSource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.cloud.migrationcenter.v1.UpdateSourceRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSourceLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateSourceLRO(); + } + + public static void asyncUpdateSourceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateSourceRequest request = + UpdateSourceRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSource(Source.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.updateSourceOperationCallable().futureCall(request); + // Do something. + Source response = future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateSource_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/SyncUpdateSource.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/SyncUpdateSource.java new file mode 100644 index 000000000000..4e29dd7735eb --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/SyncUpdateSource.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateSource_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.cloud.migrationcenter.v1.UpdateSourceRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSource { + + public static void main(String[] args) throws Exception { + syncUpdateSource(); + } + + public static void syncUpdateSource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + UpdateSourceRequest request = + UpdateSourceRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSource(Source.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Source response = migrationCenterClient.updateSourceAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateSource_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/SyncUpdateSourceSourceFieldmask.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/SyncUpdateSourceSourceFieldmask.java new file mode 100644 index 000000000000..3a4fa337049e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/updatesource/SyncUpdateSourceSourceFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_UpdateSource_SourceFieldmask_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.Source; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSourceSourceFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateSourceSourceFieldmask(); + } + + public static void syncUpdateSourceSourceFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + Source source = Source.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Source response = migrationCenterClient.updateSourceAsync(source, updateMask).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateSource_SourceFieldmask_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/AsyncValidateImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/AsyncValidateImportJob.java new file mode 100644 index 000000000000..92febd76b842 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/AsyncValidateImportJob.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ValidateImportJobRequest; +import com.google.longrunning.Operation; + +public class AsyncValidateImportJob { + + public static void main(String[] args) throws Exception { + asyncValidateImportJob(); + } + + public static void asyncValidateImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ValidateImportJobRequest request = + ValidateImportJobRequest.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + migrationCenterClient.validateImportJobCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/AsyncValidateImportJobLRO.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/AsyncValidateImportJobLRO.java new file mode 100644 index 000000000000..b9dd26ede0a0 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/AsyncValidateImportJobLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.OperationMetadata; +import com.google.cloud.migrationcenter.v1.ValidateImportJobRequest; +import com.google.protobuf.Empty; + +public class AsyncValidateImportJobLRO { + + public static void main(String[] args) throws Exception { + asyncValidateImportJobLRO(); + } + + public static void asyncValidateImportJobLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ValidateImportJobRequest request = + ValidateImportJobRequest.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + migrationCenterClient.validateImportJobOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_LRO_async] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJob.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJob.java new file mode 100644 index 000000000000..4ede3712ec4e --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJob.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_sync] +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.cloud.migrationcenter.v1.ValidateImportJobRequest; +import com.google.protobuf.Empty; + +public class SyncValidateImportJob { + + public static void main(String[] args) throws Exception { + syncValidateImportJob(); + } + + public static void syncValidateImportJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ValidateImportJobRequest request = + ValidateImportJobRequest.newBuilder() + .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) + .setRequestId("requestId693933066") + .build(); + migrationCenterClient.validateImportJobAsync(request).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJobImportjobname.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJobImportjobname.java new file mode 100644 index 000000000000..1e4ebe510b5d --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJobImportjobname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_Importjobname_sync] +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncValidateImportJobImportjobname { + + public static void main(String[] args) throws Exception { + syncValidateImportJobImportjobname(); + } + + public static void syncValidateImportJobImportjobname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); + migrationCenterClient.validateImportJobAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_Importjobname_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJobString.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJobString.java new file mode 100644 index 000000000000..b10eb075f159 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcenter/validateimportjob/SyncValidateImportJobString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_String_sync] +import com.google.cloud.migrationcenter.v1.ImportJobName; +import com.google.cloud.migrationcenter.v1.MigrationCenterClient; +import com.google.protobuf.Empty; + +public class SyncValidateImportJobString { + + public static void main(String[] args) throws Exception { + syncValidateImportJobString(); + } + + public static void syncValidateImportJobString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { + String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); + migrationCenterClient.validateImportJobAsync(name).get(); + } + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_String_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcentersettings/getasset/SyncGetAsset.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcentersettings/getasset/SyncGetAsset.java new file mode 100644 index 000000000000..e0a8852690d8 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/migrationcentersettings/getasset/SyncGetAsset.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.samples; + +// [START migrationcenter_v1_generated_MigrationCenterSettings_GetAsset_sync] +import com.google.cloud.migrationcenter.v1.MigrationCenterSettings; +import java.time.Duration; + +public class SyncGetAsset { + + public static void main(String[] args) throws Exception { + syncGetAsset(); + } + + public static void syncGetAsset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MigrationCenterSettings.Builder migrationCenterSettingsBuilder = + MigrationCenterSettings.newBuilder(); + migrationCenterSettingsBuilder + .getAssetSettings() + .setRetrySettings( + migrationCenterSettingsBuilder + .getAssetSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + MigrationCenterSettings migrationCenterSettings = migrationCenterSettingsBuilder.build(); + } +} +// [END migrationcenter_v1_generated_MigrationCenterSettings_GetAsset_sync] diff --git a/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/stub/migrationcenterstubsettings/getasset/SyncGetAsset.java b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/stub/migrationcenterstubsettings/getasset/SyncGetAsset.java new file mode 100644 index 000000000000..87e3e69fc867 --- /dev/null +++ b/java-migrationcenter/samples/snippets/generated/com/google/cloud/migrationcenter/v1/stub/migrationcenterstubsettings/getasset/SyncGetAsset.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.migrationcenter.v1.stub.samples; + +// [START migrationcenter_v1_generated_MigrationCenterStubSettings_GetAsset_sync] +import com.google.cloud.migrationcenter.v1.stub.MigrationCenterStubSettings; +import java.time.Duration; + +public class SyncGetAsset { + + public static void main(String[] args) throws Exception { + syncGetAsset(); + } + + public static void syncGetAsset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MigrationCenterStubSettings.Builder migrationCenterSettingsBuilder = + MigrationCenterStubSettings.newBuilder(); + migrationCenterSettingsBuilder + .getAssetSettings() + .setRetrySettings( + migrationCenterSettingsBuilder + .getAssetSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + MigrationCenterStubSettings migrationCenterSettings = migrationCenterSettingsBuilder.build(); + } +} +// [END migrationcenter_v1_generated_MigrationCenterStubSettings_GetAsset_sync] diff --git a/pom.xml b/pom.xml index 567604e333e4..0d2c38e9ad8c 100644 --- a/pom.xml +++ b/pom.xml @@ -110,6 +110,7 @@ java-maps-routing java-mediatranslation java-memcache + java-migrationcenter java-monitoring-dashboards java-monitoring-metricsscope java-monitoring diff --git a/versions.txt b/versions.txt index cc43485e0802..25130c9f1a0c 100644 --- a/versions.txt +++ b/versions.txt @@ -650,3 +650,6 @@ proto-google-maps-mapsplatformdatasets-v1:0.7.0:0.8.0-SNAPSHOT grpc-google-maps-mapsplatformdatasets-v1:0.7.0:0.8.0-SNAPSHOT proto-google-cloud-discoveryengine-v1:0.14.0:0.15.0-SNAPSHOT grpc-google-cloud-discoveryengine-v1:0.14.0:0.15.0-SNAPSHOT +google-cloud-migrationcenter:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-migrationcenter-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-migrationcenter-v1:0.0.0:0.0.1-SNAPSHOT From 7e883458679a6dc11495e13e203cb272b7b8d1f5 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 8 Jun 2023 02:00:12 +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 --- java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml | 2 +- java-migrationcenter/google-cloud-migrationcenter/pom.xml | 4 ++-- java-migrationcenter/pom.xml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml b/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml index 256931b1793a..6748ea98ff57 100644 --- a/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml +++ b/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.cloud diff --git a/java-migrationcenter/google-cloud-migrationcenter/pom.xml b/java-migrationcenter/google-cloud-migrationcenter/pom.xml index daf32030c684..98287a6c5554 100644 --- a/java-migrationcenter/google-cloud-migrationcenter/pom.xml +++ b/java-migrationcenter/google-cloud-migrationcenter/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.cloud @@ -110,4 +110,4 @@ test - \ No newline at end of file + diff --git a/java-migrationcenter/pom.xml b/java-migrationcenter/pom.xml index ee949ec3b514..5950d2c5c299 100644 --- a/java-migrationcenter/pom.xml +++ b/java-migrationcenter/pom.xml @@ -50,4 +50,5 @@ proto-google-cloud-migrationcenter-v1 google-cloud-migrationcenter-bom - + +